From: Masatake YAMATO Date: Sat, 2 Sep 2023 17:40:41 +0000 (+0900) Subject: tests: (lsfd::mkfds-unix-dgram) don't depend on the number of whitespaces in the... X-Git-Tag: v2.40-rc1~253^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c699c6e6925999f936acabaf493e80b85fd14558;p=thirdparty%2Futil-linux.git tests: (lsfd::mkfds-unix-dgram) don't depend on the number of whitespaces in the output Signed-off-by: Masatake YAMATO --- diff --git a/tests/expected/lsfd/mkfds-unix-dgram b/tests/expected/lsfd/mkfds-unix-dgram index 9576cefe24..dfd91e6724 100644 --- a/tests/expected/lsfd/mkfds-unix-dgram +++ b/tests/expected/lsfd/mkfds-unix-dgram @@ -1,6 +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 +3 SOCK state=connected\x20path=test_mkfds-unix-dgram\x20type=dgram connected dgram 0 test_mkfds-unix-dgram +4 SOCK state=connected\x20type=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 +3 SOCK state=connected\x20path=@test_mkfds-unix-dgram\x20type=dgram connected dgram 0 @test_mkfds-unix-dgram +4 SOCK state=connected\x20type=dgram connected dgram 0 ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0 diff --git a/tests/ts/lsfd/mkfds-unix-dgram b/tests/ts/lsfd/mkfds-unix-dgram index 79e475a133..45a0b2da0d 100755 --- a/tests/ts/lsfd/mkfds-unix-dgram +++ b/tests/ts/lsfd/mkfds-unix-dgram @@ -35,7 +35,7 @@ make_state_connected() { # The first one is for rewriting NAME column. # The second one is for rewriting STATE column. - lsfd_make_state_connected | sed -e 's/unconnected/ connected/' + lsfd_make_state_connected | sed -e 's/unconnected/connected/' } { @@ -43,6 +43,7 @@ make_state_connected() path=test_mkfds-unix-dgram ; } if read -r -u "${MKFDS[0]}" PID; then ${TS_CMD_LSFD} -n \ + -r \ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \ -p "${PID}" -Q "${EXPR}" | make_state_connected echo 'ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': ${PIPESTATUS[0]} @@ -56,6 +57,7 @@ make_state_connected() abstract=true ; } if read -r -u "${MKFDS[0]}" PID; then ${TS_CMD_LSFD} -n \ + -r \ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \ -p "${PID}" -Q "${EXPR}" | make_state_connected echo 'ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': $?