2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
7 # lock test created from CXFSQA test lockfile_simple
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
20 kill $locktest_pid2 > /dev/null 2>&1
21 kill $locktest_pid1 > /dev/null 2>&1
24 # get standard environment, filters and checks
28 # real QA test starts here
32 _require_test_fcntl_advisory_locks
34 TESTFILE=$TEST_DIR/lock_file
37 src/locktest $TESTFILE 2>&1 > $TEST_DIR/server.out &
42 PORT=$(cat $TEST_DIR/server.out | grep "^server port: " | awk '{print $3}')
44 echo "Could not get server port"
49 src/locktest -p $PORT -h localhost $TESTFILE 2>&1 > $TEST_DIR/client.out
52 if [ $result -eq 0 ]; then
56 echo "Client reported failure ($result)"