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
36 TESTFILE=$testdir/lock_file
38 # Grab a port which is hopefully unused
39 if [ $$ -gt 1024 -a $$ -lt 32000 ]; then
41 elif [ $$ -lt 1024 ]; then
43 elif [ $$ -gt 32000 ]; then
44 PORT=$(($$%30000+1024))
48 src/locktest -p $PORT $TESTFILE > $testdir/server.out 2>&1 &
53 src/locktest -p $PORT -h localhost $TESTFILE > $testdir/client.out 2>&1
55 if [ $result -eq 0 ]; then
58 echo "Client reported failure ($result)"