diff --git a/tests/generic/504 b/tests/generic/504 index 21d86051..19c6a0e7 100755 --- a/tests/generic/504 +++ b/tests/generic/504 @@ -21,6 +21,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _cleanup() { + exec {test_fd}<&- cd / rm -f $tmp.* } @@ -45,9 +46,9 @@ tf_inode=$(stat -c %i $testfile) echo inode $tf_inode >> $seqres.full # Create new fd by exec -exec 9> $testfile +exec {test_fd}> $testfile # flock locks the fd then exits, we should see the lock info even the owner is dead -flock -x 9 +flock -x $test_fd cat /proc/locks >> $seqres.full # Checking