2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
7 # ftruncate test, modified from CXFSQA tests cxfs_ftrunc and cxfs_trunc
10 _begin_fstest other pnfs
12 # Import common functions.
15 # real QA test starts here
23 TESTDIR=$TEST_DIR/ftrunc
24 TESTFILE=$TESTDIR/ftrunc.tmp
26 [ -d $TESTDIR ] && rm -r $TESTDIR
29 # ftrunc must be run as a mortal user.
35 # don't use $here/src/ftrunc, as we're running it as a regular user, and $here
36 # may contain path component that a regular user doesn't have search permission
37 su $qa_user -c "./src/ftrunc -f $TESTFILE"
39 if [ "$?" != "0" ]; then
40 echo src/ftrunc returned non 0 status!
43 $here/src/trunc -f $TESTFILE
44 if (test $? -eq 0 ) then