2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Red Hat Inc. All Rights Reserved.
7 # POSIX requires that record locks are preserved across an execve(2). But
8 # there's bug that record locks are released if process is multithreaded at the
9 # time that execve is called.
11 # Fixed by patch from Jeff Layton:
12 # locks: change POSIX lock ownership on execve when files_struct is displaced
15 seqres=$RESULT_DIR/$seq
16 echo "QA output created by $seq"
20 status=1 # failure is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
29 # get standard environment, filters and checks
33 # remove previous $seqres.full before test
36 # real QA test starts here
40 _require_test_program "t_locks_execve"
42 # prepare a 4k testfile in TEST_DIR
43 $XFS_IO_PROG -f -c "pwrite -S 0xFF 0 4096" \
44 $TEST_DIR/t_lock_execve_file >> $seqres.full 2>&1
46 $here/src/t_locks_execve $TEST_DIR/t_lock_execve_file
49 echo "Silence is golden"