summaryrefslogtreecommitdiffstats
path: root/tests/ts/lsfd/column-name
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
commit8bb05ac73a5b448b339ce0bc8d396c82c459b47f (patch)
tree1fdda006866bca20d41cb206767ea5241e36852f /tests/ts/lsfd/column-name
parentAdding debian version 2.39.3-11. (diff)
downloadutil-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.tar.xz
util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ts/lsfd/column-name')
-rwxr-xr-xtests/ts/lsfd/column-name20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/ts/lsfd/column-name b/tests/ts/lsfd/column-name
index 5dc491a..8bf8f42 100755
--- a/tests/ts/lsfd/column-name
+++ b/tests/ts/lsfd/column-name
@@ -60,15 +60,31 @@ for C in ro-regular-file pidfd socketpair; do
}
echo "$C"':ASSOC,KNAME,NAME': ${PIPESTATUS[0]}
- kill -CONT "${PID}"
+ echo DONE >&"${MKFDS[1]}"
fi
} > "$TS_OUTPUT" 2>&1
wait "${MKFDS_PID}"
- if [ "$C-$?" == "pidfd-$ENOSYS" ]; then
+ if [ "$C-$?" == "pidfd-$TS_EXIT_NOTSUPP" ]; then
ts_skip_subtest "pidfd_open(2) is not available"
continue
fi
ts_finalize_subtest
done
+C=make-regular-file
+ts_init_subtest deleted-file
+{
+ target=tmp-column-name
+ coproc MKFDS { "$TS_HELPER_MKFDS" $C $FD file=tmp-column-name delete=1; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n -o DELETED,NAME -p "${PID}" -Q "${EXPR}" |
+ sed -e 's#.*/\([^/]\+\)#\1#'
+ echo "$C: DELETED,NAME: " ${PIPESTATUS[0]}
+
+ echo DONE >&"${MKFDS[1]}"
+ fi
+} > "$TS_OUTPUT" 2>&1
+wait "${MKFDS_PID}"
+ts_finalize_subtest
+
ts_finalize