From: Karel Zak Date: Wed, 6 May 2026 11:28:16 +0000 (+0200) Subject: tests: add ts_finalize_subtest before continue in loops X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=1cb75f6705fe1042980d4dbd7df9bfe3d3ff3d1f;p=thirdparty%2Futil-linux.git tests: add ts_finalize_subtest before continue in loops In loops where ts_skip_subtest is called before continue, add ts_finalize_subtest to properly close the subtest block before skipping to the next iteration. Signed-off-by: Karel Zak --- diff --git a/tests/ts/lsfd/column-ainodeclass b/tests/ts/lsfd/column-ainodeclass index e95c91d78..e2f71323b 100755 --- a/tests/ts/lsfd/column-ainodeclass +++ b/tests/ts/lsfd/column-ainodeclass @@ -48,12 +48,14 @@ for C in pidfd inotify; do if [ "$C-$RC" == "pidfd-$TS_EXIT_NOTSUPP" ]; then ts_skip_subtest "pidfd_open(2) is not available" + ts_finalize_subtest continue fi STTYPE="$(head -n1 "$TS_OUTPUT" | awk '{print $2}')" if [ "$C-$STTYPE" == "pidfd-REG" ]; then ts_skip_subtest "pidfd is from pidfs instead of anon inode" + ts_finalize_subtest continue fi diff --git a/tests/ts/lsfd/column-name b/tests/ts/lsfd/column-name index 572d8e8a5..691895f0e 100755 --- a/tests/ts/lsfd/column-name +++ b/tests/ts/lsfd/column-name @@ -70,6 +70,7 @@ for C in ro-regular-file pidfd socketpair; do if [ "$C-$RC" == "pidfd-$TS_EXIT_NOTSUPP" ]; then ts_skip_subtest "pidfd_open(2) is not available" + ts_finalize_subtest continue fi diff --git a/tests/ts/lsfd/column-type b/tests/ts/lsfd/column-type index b0bdfc25e..225071a67 100755 --- a/tests/ts/lsfd/column-type +++ b/tests/ts/lsfd/column-type @@ -56,6 +56,7 @@ for C in ro-regular-file pidfd inotify socketpair; do if [ "$C-$RC" == "pidfd-$TS_EXIT_NOTSUPP" ]; then ts_skip_subtest "pidfd_open(2) is not available" + ts_finalize_subtest continue fi diff --git a/tests/ts/lsfd/column-xmode b/tests/ts/lsfd/column-xmode index e61668729..41a30f58b 100755 --- a/tests/ts/lsfd/column-xmode +++ b/tests/ts/lsfd/column-xmode @@ -151,6 +151,7 @@ for m in flock-sh posix-r- ofd-r-; do RC=$? if [ "$RC" == "$TS_EXIT_NOTSUPP" ]; then ts_skip_subtest "$m lock is not available" + ts_finalize_subtest continue fi ts_finalize_subtest @@ -187,6 +188,7 @@ for m in flock-ex posix--w posix-rw ofd--w ofd-rw lease-w; do RC=$? if [ "$RC" == "$TS_EXIT_NOTSUPP" ]; then ts_skip_subtest "$m lock is not available" + ts_finalize_subtest continue fi ts_finalize_subtest diff --git a/tests/ts/lsfd/mkfds-multiplexing b/tests/ts/lsfd/mkfds-multiplexing index 2b5795d61..7fcd932a9 100755 --- a/tests/ts/lsfd/mkfds-multiplexing +++ b/tests/ts/lsfd/mkfds-multiplexing @@ -38,6 +38,7 @@ for multiplexer in pselect6 select poll ppoll; do ts_init_subtest "${multiplexer}" if ! "$TS_HELPER_MKFDS" -W | grep -q "^$multiplexer\$"; then ts_skip_subtest "the multiplexer ${multiplexer} is not available" + ts_finalize_subtest continue fi @@ -52,6 +53,7 @@ for multiplexer in pselect6 select poll ppoll; do kill -CONT "${PID}" wait "${MKFDS_PID}" ts_skip_subtest "cannot open /proc/${PID}/syscall" + ts_finalize_subtest continue fi syscall_n=$(cut -f1 -d' ' <<< "$syscall_line") @@ -61,6 +63,7 @@ for multiplexer in pselect6 select poll ppoll; do kill -CONT "${PID}" wait "${MKFDS_PID}" ts_skip_subtest "incorrect syscall number in /proc/${PID}/syscall" + ts_finalize_subtest continue fi diff --git a/tests/ts/lsfd/mkfds-unix-in-netns b/tests/ts/lsfd/mkfds-unix-in-netns index 5f1e07046..8f25c5cb6 100755 --- a/tests/ts/lsfd/mkfds-unix-in-netns +++ b/tests/ts/lsfd/mkfds-unix-in-netns @@ -103,6 +103,7 @@ for t in stream dgram seqpacket; do } > "$TS_OUTPUT" 2>&1 if [ "$RC" == "$EPERM" ]; then ts_skip_subtest "unshare(2) is not permitted on this platform" + ts_finalize_subtest continue fi ts_finalize_subtest