4 # lock test created from CXFSQA test lockfile_simple
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 echo "QA output created by $seq"
18 status=1 # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # get standard environment, filters and checks
30 # real QA test starts here
31 _supported_fs xfs udf nfs
37 TESTFILE=$testdir/lock_file
39 # Grab a port which is hopefully unused
40 if [ $$ -gt 1024 -a $$ -lt 32000 ]; then
42 elif [ $$ -lt 1024 ]; then
44 elif [ $$ -gt 32000 ]; then
45 PORT=$(($$%30000+1024))
49 src/locktest -p $PORT $TESTFILE > $testdir/server.out 2>&1 &
54 src/locktest -p $PORT -h localhost $TESTFILE > $testdir/client.out 2>&1
56 if [ $result -eq 0 ]; then
59 echo "Client reported failure ($result)"