diff options
Diffstat (limited to 'tests/ts/lsfd/column-name')
-rwxr-xr-x | tests/ts/lsfd/column-name | 20 |
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 |