diff options
Diffstat (limited to '')
39 files changed, 300 insertions, 0 deletions
diff --git a/tests/expected/lsfd/column-ainodeclass-inotify b/tests/expected/lsfd/column-ainodeclass-inotify new file mode 100644 index 0000000..f93e19e --- /dev/null +++ b/tests/expected/lsfd/column-ainodeclass-inotify @@ -0,0 +1,2 @@ + 3 UNKN inotify +inotify:ASSOC,STTYPE,AINODECLASS: 0 diff --git a/tests/expected/lsfd/column-ainodeclass-pidfd b/tests/expected/lsfd/column-ainodeclass-pidfd new file mode 100644 index 0000000..269cea5 --- /dev/null +++ b/tests/expected/lsfd/column-ainodeclass-pidfd @@ -0,0 +1,2 @@ + 3 UNKN pidfd +pidfd:ASSOC,STTYPE,AINODECLASS: 0 diff --git a/tests/expected/lsfd/column-kthread b/tests/expected/lsfd/column-kthread new file mode 100644 index 0000000..db81a93 --- /dev/null +++ b/tests/expected/lsfd/column-kthread @@ -0,0 +1,6 @@ +COMMAND PID USER MODE TYPE NAME KTHREAD +systemd 1 root --- DIR / 0 +systemd 1 root --- DIR / 0 +kthreadd 2 root --- DIR / 1 +kthreadd 2 root --- DIR / 1 +0 diff --git a/tests/expected/lsfd/column-name-pidfd b/tests/expected/lsfd/column-name-pidfd new file mode 100644 index 0000000..49abe81 --- /dev/null +++ b/tests/expected/lsfd/column-name-pidfd @@ -0,0 +1,2 @@ + 3 anon_inode:[pidfd] pid=1 comm= nspid=1 +pidfd:ASSOC,KNAME,NAME: 0 diff --git a/tests/expected/lsfd/column-name-ro-regular-file b/tests/expected/lsfd/column-name-ro-regular-file new file mode 100644 index 0000000..446a916 --- /dev/null +++ b/tests/expected/lsfd/column-name-ro-regular-file @@ -0,0 +1,2 @@ + 3 /etc/passwd /etc/passwd +ro-regular-file:ASSOC,KNAME,NAME: 0 diff --git a/tests/expected/lsfd/column-name-socketpair b/tests/expected/lsfd/column-name-socketpair new file mode 100644 index 0000000..bd94e56 --- /dev/null +++ b/tests/expected/lsfd/column-name-socketpair @@ -0,0 +1,2 @@ + 3 socket:[INODENUM] state=connected type=dgram +socketpair:ASSOC,KNAME,NAME: 0 diff --git a/tests/expected/lsfd/column-type-inotify b/tests/expected/lsfd/column-type-inotify new file mode 100644 index 0000000..69588d9 --- /dev/null +++ b/tests/expected/lsfd/column-type-inotify @@ -0,0 +1,2 @@ + 3 UNKN inotify +inotify:ASSOC,STTYPE,TYPE: 0 diff --git a/tests/expected/lsfd/column-type-pidfd b/tests/expected/lsfd/column-type-pidfd new file mode 100644 index 0000000..a3278d2 --- /dev/null +++ b/tests/expected/lsfd/column-type-pidfd @@ -0,0 +1,2 @@ + 3 UNKN pidfd +pidfd:ASSOC,STTYPE,TYPE: 0 diff --git a/tests/expected/lsfd/column-type-ro-regular-file b/tests/expected/lsfd/column-type-ro-regular-file new file mode 100644 index 0000000..63b4356 --- /dev/null +++ b/tests/expected/lsfd/column-type-ro-regular-file @@ -0,0 +1,2 @@ + 3 REG REG +ro-regular-file:ASSOC,STTYPE,TYPE: 0 diff --git a/tests/expected/lsfd/column-type-socketpair b/tests/expected/lsfd/column-type-socketpair new file mode 100644 index 0000000..22a61b7 --- /dev/null +++ b/tests/expected/lsfd/column-type-socketpair @@ -0,0 +1,2 @@ + 3 SOCK UNIX +socketpair:ASSOC,STTYPE,TYPE: 0 diff --git a/tests/expected/lsfd/mkfds-directory b/tests/expected/lsfd/mkfds-directory new file mode 100644 index 0000000..fd7f293 --- /dev/null +++ b/tests/expected/lsfd/mkfds-directory @@ -0,0 +1,12 @@ + 3 r-- DIR directory / +ASSOC,MODE,TYPE,FLAGS,NAME: 0 +PID[RUN]: 0 +PID[STR]: 0 +INODE[RUN]: 0 +INODE[STR]: 0 +UID[RUN]: 0 +UID[STR]: 0 +USER[RUN]: 0 +USER[STR]: 0 +NLINK[RUN]: 0 +NLINK[STR]: 0 diff --git a/tests/expected/lsfd/mkfds-mapped-packet-socket b/tests/expected/lsfd/mkfds-mapped-packet-socket new file mode 100644 index 0000000..7c1b503 --- /dev/null +++ b/tests/expected/lsfd/mkfds-mapped-packet-socket @@ -0,0 +1,8 @@ + PACKET +SOCK.PROTONAME: 0 +type=raw protocol=all iface=lo raw PACKET lo all +NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL: 0 + PACKET +SOCK.PROTONAME: 0 +type=dgram protocol=all iface=lo dgram PACKET lo all +NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL: 0 diff --git a/tests/expected/lsfd/mkfds-netlink-groups b/tests/expected/lsfd/mkfds-netlink-groups new file mode 100644 index 0000000..ad50da1 --- /dev/null +++ b/tests/expected/lsfd/mkfds-netlink-groups @@ -0,0 +1,3 @@ + 3 NETLINK protocol=sock_diag lport= groups=5 raw sock_diag 5 +ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,NETLINK.PROTOCOL,NETLINK.GROUPS: 0 +LPORT: OK diff --git a/tests/expected/lsfd/mkfds-netlink-protocol b/tests/expected/lsfd/mkfds-netlink-protocol new file mode 100644 index 0000000..df3dce7 --- /dev/null +++ b/tests/expected/lsfd/mkfds-netlink-protocol @@ -0,0 +1,3 @@ + 3 NETLINK protocol=sock_diag lport= raw sock_diag 0 +ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,NETLINK.PROTOCOL: 0 +LPORT: OK diff --git a/tests/expected/lsfd/mkfds-netns b/tests/expected/lsfd/mkfds-netns new file mode 100644 index 0000000..4b4c0ac --- /dev/null +++ b/tests/expected/lsfd/mkfds-netns @@ -0,0 +1,4 @@ + net +NAME_FD == NAME_NS: 0 +NAME_FD == net:[INO_FD]: 0 +NAME_FD == net:[INO_NS]: 0 diff --git a/tests/expected/lsfd/mkfds-pidfd b/tests/expected/lsfd/mkfds-pidfd new file mode 100644 index 0000000..3f7edbb --- /dev/null +++ b/tests/expected/lsfd/mkfds-pidfd @@ -0,0 +1,2 @@ + 3 UNKN anon_inodefs pid=1 comm=systemd nspid=1 systemd 1 +ASSOC,STTYPE,SOURCE,NAME,PIDFD.COMM,PIDFD.PID: 0 diff --git a/tests/expected/lsfd/mkfds-ping-ping b/tests/expected/lsfd/mkfds-ping-ping new file mode 100644 index 0000000..cad42b1 --- /dev/null +++ b/tests/expected/lsfd/mkfds-ping-ping @@ -0,0 +1,4 @@ + 3 PING state=established id=9999 laddr=127.0.0.1 raddr=127.0.0.1 established dgram 127.0.0.1 127.0.0.1 9999 +ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET.LADDR,INET.RADDR,PING.ID: 0 + 3 PING state=close id=9999 laddr=127.0.0.1 close dgram 127.0.0.1 0.0.0.0 9999 +ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET.LADDR,INET.RADDR,PING.ID: 0 diff --git a/tests/expected/lsfd/mkfds-ping-ping6 b/tests/expected/lsfd/mkfds-ping-ping6 new file mode 100644 index 0000000..3ef9730 --- /dev/null +++ b/tests/expected/lsfd/mkfds-ping-ping6 @@ -0,0 +1,4 @@ + 3 PINGv6 state=established id=9999 laddr=::1 raddr=::1 established dgram ::1 ::1 9999 +ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET6.LADDR,INET6.RADDR,PING.ID: 0 + 3 PINGv6 state=close id=9999 laddr=::1 close dgram ::1 :: 9999 +ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET6.LADDR,INET6.RADDR,PING.ID: 0 diff --git a/tests/expected/lsfd/mkfds-pipe-no-fork b/tests/expected/lsfd/mkfds-pipe-no-fork new file mode 100644 index 0000000..390b8a3 --- /dev/null +++ b/tests/expected/lsfd/mkfds-pipe-no-fork @@ -0,0 +1,13 @@ + 3 r-- FIFO pipefs + 4 -w- FIFO pipefs wronly,nonblock +ASSOC,MODE,TYPE,SOURCE,FLAGS: 0 +PID[RUN]: 0 +PID[STR]: 0 +NAMES[RUN]: 0 +NAMES[STR]: 0 +INODES[RUN]: 0 +INODES[STR]: 0 +ENDPOINTS[RUN]: 0 +ENDPOINTS[STR]: 0 +ASSOC,ENDPOINTS (JSON): 0 +EXPECTED_LSFD_ENDPOINTS_JSON == LSFD_ENDPOINTS_JSON diff --git a/tests/expected/lsfd/mkfds-raw b/tests/expected/lsfd/mkfds-raw new file mode 100644 index 0000000..e8bc41a --- /dev/null +++ b/tests/expected/lsfd/mkfds-raw @@ -0,0 +1,2 @@ + 3 RAW state=established protocol=5 laddr=127.0.0.1 raddr=127.0.0.2 established raw 127.0.0.1 127.0.0.2 5 +ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET.LADDR,INET.RADDR,RAW.PROTOCOL: 0 diff --git a/tests/expected/lsfd/mkfds-raw6 b/tests/expected/lsfd/mkfds-raw6 new file mode 100644 index 0000000..a813a37 --- /dev/null +++ b/tests/expected/lsfd/mkfds-raw6 @@ -0,0 +1,2 @@ + 3 RAWv6 state=established protocol=5 laddr=::1 raddr=::ffff:127.0.0.1 established raw ::1 ::ffff:127.0.0.1 5 +ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET6.LADDR,INET6.RADDR,RAW.PROTOCOL: 0 diff --git a/tests/expected/lsfd/mkfds-ro-block-device b/tests/expected/lsfd/mkfds-ro-block-device new file mode 100644 index 0000000..3b2fe07 --- /dev/null +++ b/tests/expected/lsfd/mkfds-ro-block-device @@ -0,0 +1,13 @@ + 3 r-- BLK 0 loop blk +ASSOC,MODE,TYPE,,POS,,BLKDRV,DEVTYPE: 0 +NAME[RUN]: 0 +NAME[STR]: 0 +SOURCE[RUN]: 0 +SOURCE[STR]: 0 +MAJ_MIN[RUN]: 0 +MAJ_MIN[STR]: 0 +RDEV[RUN]: 0 +RDEV[STR]: 0 +DEV[RUN]: 0 +STAT[RUN]: 0 +DEVNUM[STR]: 0 diff --git a/tests/expected/lsfd/mkfds-ro-regular-file b/tests/expected/lsfd/mkfds-ro-regular-file new file mode 100644 index 0000000..092f40b --- /dev/null +++ b/tests/expected/lsfd/mkfds-ro-regular-file @@ -0,0 +1,15 @@ +ABC 3 r-- REG /etc/passwd 1 +COMMAND,ASSOC,MODE,TYPE,NAME,POS: 0 +PID[RUN]: 0 +PID[STR]: 0 +INODE[RUN]: 0 +INODE[STR]: 0 +UID[RUN]: 0 +UID[STR]: 0 +USER[RUN]: 0 +USER[STR]: 0 +SIZE[RUN]: 0 +SIZE[STR]: 0 +DEV[RUN]: 0 +STAT[RUN]: 0 +DEVNUM[STR]: 0 diff --git a/tests/expected/lsfd/mkfds-rw-character-device b/tests/expected/lsfd/mkfds-rw-character-device new file mode 100644 index 0000000..00423f4 --- /dev/null +++ b/tests/expected/lsfd/mkfds-rw-character-device @@ -0,0 +1,5 @@ + 3 rw- CHR /dev/zero mem:5 0 1:5 mem char 1:5 +ASSOC,MODE,TYPE,NAME,SOURCE,POS,MAJ:MIN,CHRDRV,DEVTYPE,RDEV: 0 +DEV[RUN]: 0 +STAT[RUN]: 0 +DEVNUM[STR]: 0 diff --git a/tests/expected/lsfd/mkfds-socketpair b/tests/expected/lsfd/mkfds-socketpair new file mode 100644 index 0000000..a015353 --- /dev/null +++ b/tests/expected/lsfd/mkfds-socketpair @@ -0,0 +1,3 @@ + 3 rw- SOCK sockfs UNIX + 4 rw- SOCK sockfs UNIX +ASSOC,MODE,STTYPE,SOURCE,SOCK.PROTONAME: 0 diff --git a/tests/expected/lsfd/mkfds-symlink b/tests/expected/lsfd/mkfds-symlink new file mode 100644 index 0000000..ab10159 --- /dev/null +++ b/tests/expected/lsfd/mkfds-symlink @@ -0,0 +1,2 @@ + 3 --- LINK /dev/stdin nofollow,path +ASSOC,MODE,TYPE,NAME,FLAGS: 0 diff --git a/tests/expected/lsfd/mkfds-tcp b/tests/expected/lsfd/mkfds-tcp new file mode 100644 index 0000000..dfec0ae --- /dev/null +++ b/tests/expected/lsfd/mkfds-tcp @@ -0,0 +1,4 @@ + 3 TCP SOCK state=listen laddr=127.0.0.1:34567 listen stream 1 127.0.0.1 0.0.0.0 127.0.0.1:34567 34567 0.0.0.0:0 0 + 4 TCP SOCK state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 established stream 0 127.0.0.1 127.0.0.1 127.0.0.1:23456 23456 127.0.0.1:34567 34567 + 5 TCP SOCK state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456 established stream 0 127.0.0.1 127.0.0.1 127.0.0.1:34567 34567 127.0.0.1:23456 23456 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,TCP.LADDR,TCP.LPORT,TCP.RADDR,TCP.RPORT: 0 diff --git a/tests/expected/lsfd/mkfds-tcp6 b/tests/expected/lsfd/mkfds-tcp6 new file mode 100644 index 0000000..26b6039 --- /dev/null +++ b/tests/expected/lsfd/mkfds-tcp6 @@ -0,0 +1,4 @@ + 3 TCPv6 SOCK state=listen laddr=[::1]:34567 listen stream 1 ::1 :: [::1]:34567 34567 [::]:0 0 + 4 TCPv6 SOCK state=established laddr=[::1]:23456 raddr=[::1]:34567 established stream 0 ::1 ::1 [::1]:23456 23456 [::1]:34567 34567 + 5 TCPv6 SOCK state=established laddr=[::1]:34567 raddr=[::1]:23456 established stream 0 ::1 ::1 [::1]:34567 34567 [::1]:23456 23456 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,TCP.LADDR,TCP.LPORT,TCP.RADDR,TCP.RPORT: 0 diff --git a/tests/expected/lsfd/mkfds-udp b/tests/expected/lsfd/mkfds-udp new file mode 100644 index 0000000..58ce260 --- /dev/null +++ b/tests/expected/lsfd/mkfds-udp @@ -0,0 +1,24 @@ + 3 UDP SOCK state=close laddr=127.0.0.1:34567 close dgram 0 127.0.0.1 0.0.0.0 127.0.0.1:34567 34567 0.0.0.0:0 0 + 4 UDP SOCK state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 established dgram 0 127.0.0.1 127.0.0.1 127.0.0.1:23456 23456 127.0.0.1:34567 34567 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0 + 3 UDP SOCK 0 +ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0 +NAME pattern match: OK + 4 UDP SOCK established dgram 0 127.0.0.1 127.0.0.1 127.0.0.1:34567 34567 +ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.RADDR,UDP.RPORT: 0 +LADDR/LPORT pattern match: OK + 3 UDP SOCK state=close laddr=127.0.0.1:34567 close dgram 0 127.0.0.1 0.0.0.0 127.0.0.1:34567 34567 0.0.0.0:0 0 + 4 UDP SOCK state=close laddr=127.0.0.1:23456 close dgram 0 127.0.0.1 0.0.0.0 127.0.0.1:23456 23456 0.0.0.0:0 0 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0 + 3 UDP-Lite SOCK state=close laddr=127.0.0.1:34567 close dgram 0 127.0.0.1 0.0.0.0 127.0.0.1:34567 34567 0.0.0.0:0 0 + 4 UDP-Lite SOCK state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 established dgram 0 127.0.0.1 127.0.0.1 127.0.0.1:23456 23456 127.0.0.1:34567 34567 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0 + 3 UDP-Lite SOCK 0 +ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0 +NAME pattern match: OK + 4 UDP-Lite SOCK established dgram 0 127.0.0.1 127.0.0.1 127.0.0.1:34567 34567 +ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDPLite.RADDR,UDPLite.RPORT: 0 +LADDR/LPORT pattern match: OK + 3 UDP-Lite SOCK state=close laddr=127.0.0.1:34567 close dgram 0 127.0.0.1 0.0.0.0 + 4 UDP-Lite SOCK state=close laddr=127.0.0.1:23456 close dgram 0 127.0.0.1 0.0.0.0 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0 diff --git a/tests/expected/lsfd/mkfds-udp6 b/tests/expected/lsfd/mkfds-udp6 new file mode 100644 index 0000000..e29797b --- /dev/null +++ b/tests/expected/lsfd/mkfds-udp6 @@ -0,0 +1,24 @@ + 3 UDPv6 SOCK state=close laddr=[::1]:34567 close dgram 0 ::1 :: [::1]:34567 34567 [::]:0 0 + 4 UDPv6 SOCK state=established laddr=[::1]:23456 raddr=[::1]:34567 established dgram 0 ::1 ::1 [::1]:23456 23456 [::1]:34567 34567 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0 + 3 UDPv6 SOCK 0 +ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0 +NAME pattern match: OK + 4 UDPv6 SOCK established dgram 0 ::1 ::1 [::1]:34567 34567 +ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDP.RADDR,UDP.RPORT: 0 +LADDR/LPORT pattern match: OK + 3 UDPv6 SOCK state=close laddr=[::1]:34567 close dgram 0 ::1 :: [::1]:34567 34567 [::]:0 0 + 4 UDPv6 SOCK state=close laddr=[::1]:23456 close dgram 0 ::1 :: [::1]:23456 23456 [::]:0 0 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0 + 3 UDPLITEv6 SOCK state=close laddr=[::1]:34567 close dgram 0 ::1 :: [::1]:34567 34567 [::]:0 0 + 4 UDPLITEv6 SOCK state=established laddr=[::1]:23456 raddr=[::1]:34567 established dgram 0 ::1 ::1 [::1]:23456 23456 [::1]:34567 34567 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0 + 3 UDPLITEv6 SOCK 0 +ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0 +NAME pattern match: OK + 4 UDPLITEv6 SOCK established dgram 0 ::1 ::1 [::1]:34567 34567 +ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDPLite.RADDR,UDPLite.RPORT: 0 +LADDR/LPORT pattern match: OK + 3 UDPLITEv6 SOCK state=close laddr=[::1]:34567 close dgram 0 ::1 :: [::1]:34567 34567 [::]:0 0 + 4 UDPLITEv6 SOCK state=close laddr=[::1]:23456 close dgram 0 ::1 :: [::1]:23456 23456 [::]:0 0 +ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0 diff --git a/tests/expected/lsfd/mkfds-unix-dgram b/tests/expected/lsfd/mkfds-unix-dgram new file mode 100644 index 0000000..b8fd9d4 --- /dev/null +++ b/tests/expected/lsfd/mkfds-unix-dgram @@ -0,0 +1,6 @@ + 3 SOCK state=connected path=test_mkfds-unix-dgram type=dgram connected dgram 0 test_mkfds-unix-dgram + 4 SOCK state=connected type=dgram connected dgram 0 +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 + 3 SOCK state=connected path=@test_mkfds-unix-dgram type=dgram connected dgram 0 @test_mkfds-unix-dgram + 4 SOCK state=connected type=dgram connected dgram 0 +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 diff --git a/tests/expected/lsfd/mkfds-unix-in-netns-dgram b/tests/expected/lsfd/mkfds-unix-in-netns-dgram new file mode 100644 index 0000000..c33dd9a --- /dev/null +++ b/tests/expected/lsfd/mkfds-unix-in-netns-dgram @@ -0,0 +1,6 @@ + 5 SOCK state=unconnected path=test_mkfds-unix-dgram-ns type=dgram unconnected dgram 0 test_mkfds-unix-dgram-ns +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 +the netns for the dgram socket is extracted as expectedly + 5 SOCK state=unconnected path=@test_mkfds-unix-dgram-ns type=dgram unconnected dgram 0 @test_mkfds-unix-dgram-ns +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 +the netns for the abstract dgram socket is extracted as expectedly diff --git a/tests/expected/lsfd/mkfds-unix-in-netns-seqpacket b/tests/expected/lsfd/mkfds-unix-in-netns-seqpacket new file mode 100644 index 0000000..1f70061 --- /dev/null +++ b/tests/expected/lsfd/mkfds-unix-in-netns-seqpacket @@ -0,0 +1,6 @@ + 5 SOCK state=listen path=test_mkfds-unix-seqpacket-ns type=seqpacket listen seqpacket 1 test_mkfds-unix-seqpacket-ns +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 +the netns for the seqpacket socket is extracted as expectedly + 5 SOCK state=listen path=@test_mkfds-unix-seqpacket-ns type=seqpacket listen seqpacket 1 @test_mkfds-unix-seqpacket-ns +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 +the netns for the abstract seqpacket socket is extracted as expectedly diff --git a/tests/expected/lsfd/mkfds-unix-in-netns-stream b/tests/expected/lsfd/mkfds-unix-in-netns-stream new file mode 100644 index 0000000..fd09105 --- /dev/null +++ b/tests/expected/lsfd/mkfds-unix-in-netns-stream @@ -0,0 +1,6 @@ + 5 SOCK state=listen path=test_mkfds-unix-stream-ns listen stream 1 test_mkfds-unix-stream-ns +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 +the netns for the stream socket is extracted as expectedly + 5 SOCK state=listen path=@test_mkfds-unix-stream-ns listen stream 1 @test_mkfds-unix-stream-ns +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 +the netns for the abstract stream socket is extracted as expectedly diff --git a/tests/expected/lsfd/mkfds-unix-stream b/tests/expected/lsfd/mkfds-unix-stream new file mode 100644 index 0000000..c2e64a7 --- /dev/null +++ b/tests/expected/lsfd/mkfds-unix-stream @@ -0,0 +1,32 @@ + 3 SOCK state=listen path=test_mkfds-unix-stream listen stream 1 test_mkfds-unix-stream + 4 SOCK state=connected connected stream 0 + 5 SOCK state=connected path=test_mkfds-unix-stream connected stream 0 test_mkfds-unix-stream +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 + 3 SOCK state=listen path=@test_mkfds-unix-stream-abs listen stream 1 @test_mkfds-unix-stream-abs + 4 SOCK state=connected connected stream 0 + 5 SOCK state=connected path=@test_mkfds-unix-stream-abs connected stream 0 @test_mkfds-unix-stream-abs +(abs) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 + 3 SOCK state=listen path=test_mkfds-unix-stream-shutdown listen stream 1 test_mkfds-unix-stream-shutdown + 4 SOCK state=connected connected stream 0 + 5 SOCK state=connected path=test_mkfds-unix-stream-shutdown connected stream 0 test_mkfds-unix-stream-shutdown +(shutdown) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 + 3 SOCK state=listen path=test_mkfds-unix with spaces stream listen stream 1 test_mkfds-unix with spaces stream + 4 SOCK state=connected connected stream 0 + 5 SOCK state=connected path=test_mkfds-unix with spaces stream connected stream 0 test_mkfds-unix with spaces stream +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 + 3 SOCK state=listen path=test_mkfds-unix-seqpacket type=seqpacket listen seqpacket 1 test_mkfds-unix-seqpacket + 4 SOCK state=connected type=seqpacket connected seqpacket 0 + 5 SOCK state=connected path=test_mkfds-unix-seqpacket type=seqpacket connected seqpacket 0 test_mkfds-unix-seqpacket +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 + 3 SOCK state=listen path=@test_mkfds-unix-seqpacket-abs listen stream 1 @test_mkfds-unix-seqpacket-abs + 4 SOCK state=connected connected stream 0 + 5 SOCK state=connected path=@test_mkfds-unix-seqpacket-abs connected stream 0 @test_mkfds-unix-seqpacket-abs +(abs) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 + 3 SOCK state=listen path=test_mkfds-unix-seqpacket-shutdown type=seqpacket listen seqpacket 1 test_mkfds-unix-seqpacket-shutdown + 4 SOCK state=connected type=seqpacket connected seqpacket 0 + 5 SOCK state=connected path=test_mkfds-unix-seqpacket-shutdown type=seqpacket connected seqpacket 0 test_mkfds-unix-seqpacket-shutdown +(shutdown) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 + 3 SOCK state=listen path=test_mkfds-unix with spaces seqpacket type=seqpacket listen seqpacket 1 test_mkfds-unix with spaces seqpacket + 4 SOCK state=connected type=seqpacket connected seqpacket 0 + 5 SOCK state=connected path=test_mkfds-unix with spaces seqpacket type=seqpacket connected seqpacket 0 test_mkfds-unix with spaces seqpacket +ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 diff --git a/tests/expected/lsfd/option-filter-broken-exp b/tests/expected/lsfd/option-filter-broken-exp new file mode 100644 index 0000000..8c14f22 --- /dev/null +++ b/tests/expected/lsfd/option-filter-broken-exp @@ -0,0 +1,7 @@ +lsfd: error: empty filter expression +lsfd: error: empty filter expression +lsfd: error: unbalanced parenthesis: ) +lsfd: error: unexpected token: garbage after OP2 +lsfd: error: bool expression is expected: FD +lsfd: unknown column: NOSUCHCOLUMN +lsfd: error: no such column: NOSUCHCOLUMN diff --git a/tests/expected/lsfd/option-inet b/tests/expected/lsfd/option-inet new file mode 100644 index 0000000..cebfded --- /dev/null +++ b/tests/expected/lsfd/option-inet @@ -0,0 +1,46 @@ +# --inet + 3 TCP state=listen laddr=127.0.0.1:34567 + 4 TCP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 + 5 TCP state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456 + 3 TCPv6 state=listen laddr=[::1]:34567 + 4 TCPv6 state=established laddr=[::1]:23456 raddr=[::1]:34567 + 5 TCPv6 state=established laddr=[::1]:34567 raddr=[::1]:23456 + 3 UDP state=close laddr=127.0.0.1:34567 + 4 UDP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 + 3 UDPLITEv6 state=close laddr=[::1]:34567 + 4 UDPLITEv6 state=established laddr=[::1]:23456 raddr=[::1]:34567 +# --inet=4 + 3 TCP state=listen laddr=127.0.0.1:34567 + 4 TCP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 + 5 TCP state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456 + 3 UDP state=close laddr=127.0.0.1:34567 + 4 UDP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 +# --inet=6 + 3 TCPv6 state=listen laddr=[::1]:34567 + 4 TCPv6 state=established laddr=[::1]:23456 raddr=[::1]:34567 + 5 TCPv6 state=established laddr=[::1]:34567 raddr=[::1]:23456 + 3 UDPLITEv6 state=close laddr=[::1]:34567 + 4 UDPLITEv6 state=established laddr=[::1]:23456 raddr=[::1]:34567 +# -i + 3 TCP state=listen laddr=127.0.0.1:34567 + 4 TCP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 + 5 TCP state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456 + 3 TCPv6 state=listen laddr=[::1]:34567 + 4 TCPv6 state=established laddr=[::1]:23456 raddr=[::1]:34567 + 5 TCPv6 state=established laddr=[::1]:34567 raddr=[::1]:23456 + 3 UDP state=close laddr=127.0.0.1:34567 + 4 UDP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 + 3 UDPLITEv6 state=close laddr=[::1]:34567 + 4 UDPLITEv6 state=established laddr=[::1]:23456 raddr=[::1]:34567 +# -i4 + 3 TCP state=listen laddr=127.0.0.1:34567 + 4 TCP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 + 5 TCP state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456 + 3 UDP state=close laddr=127.0.0.1:34567 + 4 UDP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 +# -i6 + 3 TCPv6 state=listen laddr=[::1]:34567 + 4 TCPv6 state=established laddr=[::1]:23456 raddr=[::1]:34567 + 5 TCPv6 state=established laddr=[::1]:34567 raddr=[::1]:23456 + 3 UDPLITEv6 state=close laddr=[::1]:34567 + 4 UDPLITEv6 state=established laddr=[::1]:23456 raddr=[::1]:34567 diff --git a/tests/expected/lsfd/option-pid b/tests/expected/lsfd/option-pid new file mode 100644 index 0000000..f05aa57 --- /dev/null +++ b/tests/expected/lsfd/option-pid @@ -0,0 +1,13 @@ +QOUT: 0 +POUT[--pid=1 PID]: 0 +EQ[--pid=1 PID]: 0 +POUT[--pid=PID 1]: 0 +EQ[--pid=PID 1]: 0 +POUT[--pid=1,PID]: 0 +EQ[--pid=1,PID]: 0 +POUT[--pid=PID,1]: 0 +EQ[--pid=PID,1]: 0 +POUT[-p 1 --pid=PID]: 0 +EQ[-p 1 --pid=PID]: 0 +POUT[-p PID --pid=1]: 0 +EQ[-p PID --pid=1]: 0 diff --git a/tests/expected/lsfd/option-summary b/tests/expected/lsfd/option-summary new file mode 100644 index 0000000..4e96f55 --- /dev/null +++ b/tests/expected/lsfd/option-summary @@ -0,0 +1,3 @@ + 10 GROUP + 3 PASSWD + 13 PROC |