2017-07-03 03:27:03 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. ./functions.sh
|
|
|
|
|
2017-07-16 00:46:38 +03:00
|
|
|
echo "NFSv${VERS} Basic valgrind leak check for nfs_fstat64()."
|
2017-07-03 03:27:03 +03:00
|
|
|
|
|
|
|
start_share
|
|
|
|
|
|
|
|
mkdir "${TESTDIR}/subdir"
|
|
|
|
mkdir "${TESTDIR}/subdir2"
|
|
|
|
|
|
|
|
|
|
|
|
echo -n "test nfs_fstat64() (1) ... "
|
|
|
|
touch "${TESTDIR}/fstat1"
|
2017-07-16 00:46:38 +03:00
|
|
|
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_fstat "${TESTURL}/?version=${VERS}" "." /fstat1 >/dev/null 2>&1 || failure
|
2017-07-03 03:27:03 +03:00
|
|
|
success
|
|
|
|
|
|
|
|
echo -n "test nfs_fstat64() (2) ... "
|
2017-07-16 00:46:38 +03:00
|
|
|
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_fstat "${TESTURL}/?version=${VERS}" "." fstat1 >/dev/null 2>&1 || failure
|
2017-07-03 03:27:03 +03:00
|
|
|
success
|
|
|
|
|
|
|
|
echo -n "test nfs_fstat64() (3) ... "
|
|
|
|
touch "${TESTDIR}/subdir/fstat3"
|
2017-07-16 00:46:38 +03:00
|
|
|
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_fstat "${TESTURL}/?version=${VERS}" "." /subdir/fstat3 >/dev/null 2>&1 || failure
|
2017-07-03 03:27:03 +03:00
|
|
|
success
|
|
|
|
|
|
|
|
echo -n "test nfs_fstat64() (4) ... "
|
2017-07-16 00:46:38 +03:00
|
|
|
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_fstat "${TESTURL}/?version=${VERS}" "." subdir/fstat3 >/dev/null 2>&1 || failure
|
2017-07-03 03:27:03 +03:00
|
|
|
success
|
|
|
|
|
|
|
|
echo -n "test nfs_fstat64() (5) ... "
|
2017-07-16 00:46:38 +03:00
|
|
|
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_fstat "${TESTURL}/?version=${VERS}" "subdir2" ../subdir/fstat3 >/dev/null 2>&1 || failure
|
2017-07-03 03:27:03 +03:00
|
|
|
success
|
|
|
|
|
|
|
|
echo -n "test nfs_fstat64() (6) ... "
|
2017-07-16 00:46:38 +03:00
|
|
|
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_fstat "${TESTURL}/?version=${VERS}" "subdir2" ../../subdir/fstat3 2>/dev/null || expr $? != 99 >/dev/null || failure
|
2017-07-03 03:27:03 +03:00
|
|
|
success
|
|
|
|
|
|
|
|
|
|
|
|
stop_share
|
|
|
|
|
|
|
|
exit 0
|