]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (test_mkfds::mkfds-multiplexing) make the output of ts_skip_subtest visible
authorMasatake YAMATO <yamato@redhat.com>
Mon, 14 Aug 2023 19:11:50 +0000 (04:11 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Mon, 11 Sep 2023 22:19:00 +0000 (07:19 +0900)
tests/ts/lsfd/mkfds-multiplexing

index 86753f5574cb7b9a8a1596501a57e20fc7d6c4c5..8cc7f31c09807959adbb0b24bd66f82b142ef52c 100755 (executable)
@@ -41,14 +41,16 @@ for multiplexer in pselect6 select poll ppoll; do
 
     {
        coproc MKFDS { "$TS_HELPER_MKFDS" -w "$multiplexer" multiplexing {10..22}; }
-       if read -r -u "${MKFDS[0]}" PID; then
-           if ! cat /proc/"${PID}"/syscall > /dev/null 2>&1; then
-               kill -CONT "${PID}"
-               wait "${MKFDS_PID}"
-               ts_skip_subtest "cannot open /proc/${PID}/syscall"
-               continue
-           fi
+    } > "$TS_OUTPUT" 2>&1
 
+    if read -r -u "${MKFDS[0]}" PID; then
+       if ! cat /proc/"${PID}"/syscall > /dev/null 2>&1; then
+           kill -CONT "${PID}"
+           wait "${MKFDS_PID}"
+           ts_skip_subtest "cannot open /proc/${PID}/syscall"
+           continue
+       fi
+       {
            "${TS_CMD_LSFD}" -n -o ASSOC,XMODE -p "${PID}" -Q '(FD >= 10) && (FD <= 22)'
            echo "[$multiplexer] ASSOC,XMODE: $?"
 
@@ -58,8 +60,8 @@ for multiplexer in pselect6 select poll ppoll; do
            fi
 
            echo DONE >&"${MKFDS[1]}"
-       fi
-    } > "$TS_OUTPUT" 2>&1
+       } >> "$TS_OUTPUT" 2>&1
+    fi
 
     wait "${MKFDS_PID}"
     ts_finalize_subtest