TESTS: Split the leak checks tests out based on function

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
libnfs-4.0.0-vitalif
Ronnie Sahlberg 2017-07-03 07:39:50 +10:00
parent 6ea6002e08
commit abf2f7fc70
9 changed files with 367 additions and 216 deletions

View File

@ -0,0 +1,63 @@
#!/bin/sh
. ./functions.sh
echo "basic valgrind leak check for nfs_mkdir()/nfs_rmdir()"
start_share
mkdir "${TESTDIR}/subdir"
mkdir "${TESTDIR}/subdir2"
echo -n "Test nfs_mkdir() (1) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_mkdir "${TESTURL}/" "." /mkdir1 2>/dev/null || failure
success
echo -n "Test nfs_rmdir() (2) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rmdir "${TESTURL}/" "." /mkdir1 2>/dev/null || failure
success
echo -n "Test nfs_mkdir() (3) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_mkdir "${TESTURL}/" "." mkdir3 2>/dev/null || failure
success
echo -n "Test nfs_rmdir() (4) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rmdir "${TESTURL}/" "." mkdir3 2>/dev/null || failure
success
echo -n "Test nfs_mkdir() (5) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_mkdir "${TESTURL}/" "." /subdir/mkdir5 2>/dev/null || failure
success
echo -n "Test nfs_rmdir() (6) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rmdir "${TESTURL}/" "." /subdir/mkdir5 2>/dev/null || failure
success
echo -n "Test nfs_mkdir() (7) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_mkdir "${TESTURL}/" "." subdir/mkdir7 2>/dev/null || failure
success
echo -n "Test nfs_rmdir() (8) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rmdir "${TESTURL}/" "." subdir/mkdir7 2>/dev/null || failure
success
echo -n "Test nfs_mkdir() (9) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_mkdir "${TESTURL}/" "subdir" ../subdir2/mkdir9 2>/dev/null || failure
success
echo -n "Test nfs_rmdir() (10) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rmdir "${TESTURL}/" "subdir" ../subdir2/mkdir9 2>/dev/null || failure
success
echo -n "Test nfs_mkdir() (11) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_mkdir "${TESTURL}/" "subdir" ../../subdir2/mkdir9 2>/dev/null || expr $? != 99 >/dev/null || failure
success
echo -n "Test nfs_rmdir() (12) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rmdir "${TESTURL}/" "subdir" ../../subdir2/mkdir12 2>/dev/null || expr $? != 99 >/dev/null || failure
success
stop_share
exit 0

View File

@ -0,0 +1,45 @@
#!/bin/sh
. ./functions.sh
echo "basic valgrind leak check for nfs_unlink()"
start_share
mkdir "${TESTDIR}/subdir"
mkdir "${TESTDIR}/subdir2"
echo -n "test nfs_unlink() (1) ... "
touch "${TESTDIR}/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "." /unlink 2>/dev/null || failure
success
echo -n "test nfs_unlink() (2) ... "
touch "${TESTDIR}/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "." unlink 2>/dev/null || failure
success
echo -n "test nfs_unlink() (3) ... "
touch "${TESTDIR}/subdir/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "." /subdir/unlink 2>/dev/null || failure
success
echo -n "test nfs_unlink() (4) ... "
touch "${TESTDIR}/subdir/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "." subdir/unlink 2>/dev/null || failure
success
echo -n "test nfs_unlink() (5) ... "
touch "${TESTDIR}/subdir2/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "subdir" ../subdir2/unlink 2>/dev/null || failure
success
echo -n "test nfs_unlink() (6) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "subdir" ../../subdir2/unlink 2>/dev/null || expr $? != 99 >/dev/null || failure
success
stop_share
exit 0

View File

@ -1,74 +0,0 @@
#!/bin/sh
. ./functions.sh
echo "basic symlink test"
start_share
mkdir "${TESTDIR}/subdir"
mkdir "${TESTDIR}/subdir2"
echo -n "Create a symlink from a root path (absolute) ... "
./prog_symlink "${TESTURL}/" "." kangabanga /abslink || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/abslink" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink from a root path (relative) ... "
./prog_symlink "${TESTURL}/" "." kangabanga rellink || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/rellink" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink from a nested path (absolute) ... "
./prog_symlink "${TESTURL}/" "." kangabanga /subdir/abslink || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/subdir/abslink" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink from a nested path (relative) ... "
./prog_symlink "${TESTURL}/" "." kangabanga subdir/rellink || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/subdir/rellink" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink from a nested path (relative) ... "
./prog_symlink "${TESTURL}/" "/subdir" kangabanga locallink || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/subdir/locallink" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink in a parent directory (relative) ... "
./prog_symlink "${TESTURL}/" "/subdir" kangabanga ../link3 || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/link3" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink in a different directory (relative) ... "
./prog_symlink "${TESTURL}/" "/subdir" kangabanga ../subdir2/link4 || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/subdir2/link4" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink outside the share (relative) ... "
./prog_symlink "${TESTURL}/" "/subdir" kangabanga ../../link5 2>/dev/null && failure
success
stop_share
exit 0

View File

@ -0,0 +1,74 @@
#!/bin/sh
. ./functions.sh
echo "basic symlink test"
start_share
mkdir "${TESTDIR}/subdir"
mkdir "${TESTDIR}/subdir2"
echo -n "Create a symlink in root (abs) (1) ... "
./prog_symlink "${TESTURL}/" "." kangabanga /symlink1 || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/symlink1" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink in root (rel) (2) ... "
./prog_symlink "${TESTURL}/" "." kangabanga symlink2 || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/symlink2" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink from a subdir (abs) (3) ... "
./prog_symlink "${TESTURL}/" "." kangabanga /subdir/symlink3 || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/subdir/symlink3" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink from a subdir (rel) (4) ... "
./prog_symlink "${TESTURL}/" "." kangabanga subdir/symlink4 || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/subdir/symlink4" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink from a subdir (rel) (5) ... "
./prog_symlink "${TESTURL}/" "/subdir" kangabanga symlink5 || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/subdir/symlink5" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink in a parent directory (rel) (6) ... "
./prog_symlink "${TESTURL}/" "/subdir" kangabanga ../symlink6 || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/symlink6" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink from different cwd (rel) (7) ... "
./prog_symlink "${TESTURL}/" "/subdir" kangabanga ../subdir2/symlink7 || failure
success
echo -n "Verify the link ... "
ls -l "${TESTDIR}/subdir2/symlink7" | egrep "\-> kangabanga$" >/dev/null || failure
success
echo -n "Create a symlink outside the share (rel) (8) ... "
./prog_symlink "${TESTURL}/" "/subdir" kangabanga ../../symlink8 2>/dev/null && failure
success
stop_share
exit 0

View File

@ -0,0 +1,47 @@
#!/bin/sh
. ./functions.sh
echo "basic valgrind leak check for nfs_symlink()"
start_share
mkdir "${TESTDIR}/subdir"
mkdir "${TESTDIR}/subdir2"
echo -n "Test nfs_symlink() (1) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_symlink "${TESTURL}/" "." kangabanga /symlink1 2>/dev/null || failure
success
echo -n "Test nfs_symlink() (2) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_symlink "${TESTURL}/" "." kangabanga symlink2 2>/dev/null || failure
success
echo -n "Test nfs_symlink() (3) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_symlink "${TESTURL}/" "." kangabanga /subdir/symlink3 2>/dev/null || failure
success
echo -n "Test nfs_symlink() (4) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_symlink "${TESTURL}/" "." kangabanga subdir/symlink4 2>/dev/null || failure
success
echo -n "Test nfs_symlink() (5) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_symlink "${TESTURL}/" "/subdir" kangabanga symlink5 2>/dev/null || failure
success
echo -n "Test nfs_symlink() (6) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_symlink "${TESTURL}/" "/subdir" kangabanga ../symlink6 2>/dev/null || failure
success
echo -n "Test nfs_symlink() (7) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_symlink "${TESTURL}/" "/subdir" kangabanga ../subdir2/symlink7 2>/dev/null || failure
success
echo -n "Test nfs_symlink() (8) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_symlink "${TESTURL}/" "/subdir" kangabanga ../../symlink8 2>/dev/null || expr $? != 99 >/dev/null || failure
success
stop_share
exit 0

View File

@ -0,0 +1,75 @@
#!/bin/sh
. ./functions.sh
echo "basic valgrind leak check for nfs_rename()"
start_share
mkdir "${TESTDIR}/subdir"
mkdir "${TESTDIR}/subdir2"
echo -n "test nfs_rename() (1) ... "
echo "kangabanga" > "${TESTDIR}/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /testfile /renamed1 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (2) ... "
echo "kangabanga" > "${TESTDIR}/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." testfile /renamed2 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (3) ... "
echo "kangabanga" > "${TESTDIR}/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." testfile renamed3 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (4) ... "
echo "kangabanga" > "${TESTDIR}/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /testfile renamed4 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (5) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /subdir/testfile /subdir/renamed5 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (6) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." subdir/testfile /subdir/renamed6 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (7) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." subdir/testfile subdir/renamed7 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (8) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /subdir/testfile subdir/renamed8 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (9) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /subdir/testfile subdir2/renamed9 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (10) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "subdir" ./testfile ../subdir2/renamed10 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() (11) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rename "${TESTURL}/" "subdir" ../../testfile ../subdir2/renamed11 >/dev/null 2>&1 || expr $? != 99 >/dev/null || failure
success
echo -n "test nfs_rename() (12) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rename "${TESTURL}/" "subdir" ./testfile ../../subdir2/renamed12 >/dev/null 2>&1 || expr $? != 99 >/dev/null || failure
success
stop_share
exit 0

View File

@ -0,0 +1,61 @@
#!/bin/sh
. ./functions.sh
echo "basic valgrind leak check for nfs_link()"
start_share
mkdir "${TESTDIR}/subdir"
mkdir "${TESTDIR}/subdir2"
echo "kangabanga" > "${TESTDIR}/testfile"
echo -n "test nfs_link() (1) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." /testfile /link1 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() (2) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." /testfile link2 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() (3) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." testfile /link3 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() (4) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." testfile link4 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() (5) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." /testfile /subdir/link5 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() (6) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." /subdir/link5 subdir2/link6 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() (7) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." subdir/link5 /subdir2/link7 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() (8) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." subdir2/link7 /subdir/link8 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() (9) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "subdir2" link7 ../subdir/link9 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() (10) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "subdir2" ../../link7 ../subdir/link10 2>/dev/null || expr $? != 99 >/dev/null || failure
success
echo -n "test nfs_link() (11) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "subdir2" link7 ../../subdir/link11 2>/dev/null || expr $? != 99 >/dev/null || failure
success
stop_share
exit 0

View File

@ -13,11 +13,12 @@ mkdir "${TESTDIR}/subdir"
mkdir "${TESTDIR}/subdir2"
echo -n "Create a chrdev in the root (abs) (1)... "
./prog_mknod "${TESTURL}/?uid=0" "." /mknod1 020775 0x1234 || failure
./prog_mknod "${TESTURL}/?uid=0" "." /mknod1 020755 0x1234 || failure
success
echo -n "Stat the node ... "
./prog_stat "${TESTURL}/mknod1" > "${TESTDIR}/output" || failure
success
echo -n "Testing nfs_mode and verify it is a CHRDEV ... "
grep "nfs_mode:20755" "${TESTDIR}/output" >/dev/null || failure

View File

@ -56,147 +56,6 @@ echo -n "test nfs_fstat64() for memory leaks ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_fstat "${TESTURL}/file.99" >/dev/null 2>&1 || failure
success
echo -n "test nfs_symlink()/nfs_readlink() for memory leaks ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_symlink "${TESTURL}/" "." kangabanga /symlink >/dev/null 2>&1 || failure
success
echo -n "test nfs_symlink()/nfs_readlink() for memory leaks (2) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_symlink "${TESTURL}/" "." kangabanga /subdir/symlink >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (1) ... "
echo "kangabanga" > "${TESTDIR}/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /testfile /renamed1 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (2) ... "
echo "kangabanga" > "${TESTDIR}/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." testfile /renamed2 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (3) ... "
echo "kangabanga" > "${TESTDIR}/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." testfile renamed3 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (4) ... "
echo "kangabanga" > "${TESTDIR}/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /testfile renamed4 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (5) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /subdir/testfile /subdir/renamed5 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (6) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." subdir/testfile /subdir/renamed6 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (7) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." subdir/testfile subdir/renamed7 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (8) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /subdir/testfile subdir/renamed8 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (9) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "." /subdir/testfile subdir2/renamed9 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (10) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rename "${TESTURL}/" "subdir" ./testfile ../subdir2/renamed10 >/dev/null 2>&1 || failure
success
echo -n "test nfs_rename() for memory leaks (11) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rename "${TESTURL}/" "subdir" ../../testfile ../subdir2/renamed11 >/dev/null 2>&1 || expr $? != 99 >/dev/null || failure
success
echo -n "test nfs_rename() for memory leaks (12) ... "
echo "kangabanga" > "${TESTDIR}/subdir/testfile"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_rename "${TESTURL}/" "subdir" ./testfile ../../subdir2/renamed12 >/dev/null 2>&1 || expr $? != 99 >/dev/null || failure
success
echo -n "Testing nfs_unlink for memory leaks (1) ... "
touch "${TESTDIR}/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "." /unlink 2>/dev/null || failure
success
echo -n "Testing nfs_unlink for memory leaks (2) ... "
touch "${TESTDIR}/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "." unlink 2>/dev/null || failure
success
echo -n "Testing nfs_unlink for memory leaks (3) ... "
touch "${TESTDIR}/subdir/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "." /subdir/unlink 2>/dev/null || failure
success
echo -n "Testing nfs_unlink for memory leaks (4) ... "
touch "${TESTDIR}/subdir/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "." subdir/unlink 2>/dev/null || failure
success
echo -n "Testing nfs_unlink for memory leaks (5) ... "
touch "${TESTDIR}/subdir2/unlink"
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "subdir" ../subdir2/unlink 2>/dev/null || failure
success
echo -n "Testing nfs_unlink for memory leaks (6) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_unlink "${TESTURL}/" "subdir" ../../subdir2/unlink 2>/dev/null || expr $? != 99 >/dev/null || failure
success
echo "kangabanga" > "${TESTDIR}/testfile"
echo -n "test nfs_link() for memory leaks (1) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." /testfile /link1 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() for memory leaks (2) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." /testfile link2 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() for memory leaks (3) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." testfile /link3 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() for memory leaks (4) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." testfile link4 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() for memory leaks (5) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." /testfile /subdir/link5 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() for memory leaks (6) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." /subdir/link5 subdir2/link6 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() for memory leaks (7) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." subdir/link5 /subdir2/link7 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() for memory leaks (8) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "." subdir2/link7 /subdir/link8 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() for memory leaks (9) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "subdir2" link7 ../subdir/link9 >/dev/null 2>&1 || failure
success
echo -n "test nfs_link() for memory leaks (10) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "subdir2" ../../link7 ../subdir/link10 2>/dev/null || expr $? != 99 >/dev/null || failure
success
echo -n "test nfs_link() for memory leaks (11) ... "
libtool --mode=execute valgrind --leak-check=full --error-exitcode=99 ./prog_link "${TESTURL}/" "subdir2" link7 ../../subdir/link11 2>/dev/null || expr $? != 99 >/dev/null || failure
success
stop_share