]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (lsfd::mkfds-unix-dgram) don't depend on the number of whitespaces in the...
authorMasatake YAMATO <yamato@redhat.com>
Sat, 2 Sep 2023 17:40:41 +0000 (02:40 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Sun, 3 Sep 2023 21:16:25 +0000 (06:16 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/expected/lsfd/mkfds-unix-dgram
tests/ts/lsfd/mkfds-unix-dgram

index 9576cefe24dc028c2f410ad470a0eace7a145d96..dfd91e6724d521f3e07c587b0fbe56f2e02f9fc6 100644 (file)
@@ -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
index 79e475a13316f8e7576047e2d9bec23fd1d267c3..45a0b2da0d887ed87bdaa0e6174d637abae67f40 100755 (executable)
@@ -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': $?