diff --git a/tests/test_0201_mkdir_valgrind.sh b/tests/test_0201_mkdir_valgrind.sh new file mode 100755 index 00000000..d7d481e0 --- /dev/null +++ b/tests/test_0201_mkdir_valgrind.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +. ./functions.sh + +echo "mkdir test with valgrind" + +echo -n "Testing mkdir on root of share ... " +libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_mkdir "${TESTURL}/testdir" >/dev/null 2>&1 || failure +success + +echo -n "Testing rmdir on root of share ... " +libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_rmdir "${TESTURL}/testdir" >/dev/null 2>&1 || failure +success + +exit 0 diff --git a/tests/test_0300_cat_basic.sh b/tests/test_0300_cat_basic.sh index f401c66e..bbc46bf6 100755 --- a/tests/test_0300_cat_basic.sh +++ b/tests/test_0300_cat_basic.sh @@ -4,8 +4,7 @@ echo "basic cat test" -# This test depends on the file CAT existing on the share used for testing -# TODO: should create the file first +../utils/smb2-cp ./prog_cat.c "${TESTURL}/CAT" echo -n "Testing prog_cat on root of share/CAT ... " ./prog_cat "${TESTURL}/CAT" > /dev/null || failure diff --git a/tests/test_0301_cat_valgrind.sh b/tests/test_0301_cat_valgrind.sh index 6b201118..27d6fcf5 100755 --- a/tests/test_0301_cat_valgrind.sh +++ b/tests/test_0301_cat_valgrind.sh @@ -4,8 +4,7 @@ echo "basic cat test with valgrind" -# This test depends on the file CAT existing on the share used for testing -# TODO: should create the file first +../utils/smb2-cp ./prog_cat.c "${TESTURL}/CAT" echo -n "Testing prog_cat on root of share/CAT ... " libtool --mode=execute valgrind --leak-check=full --error-exitcode=1 ./prog_cat "${TESTURL}/CAT" >/dev/null 2>&1 || failure diff --git a/tests/test_0302_cat_valgrind_socket_error.sh b/tests/test_0302_cat_valgrind_socket_error.sh index def4d022..ba7e1d0b 100755 --- a/tests/test_0302_cat_valgrind_socket_error.sh +++ b/tests/test_0302_cat_valgrind_socket_error.sh @@ -4,8 +4,7 @@ echo "basic cat test with valgrind and session errors" -# This test depends on the file CAT existing on the share used for testing -# TODO: should create the file first +../utils/smb2-cp ./prog_cat.c "${TESTURL}/CAT" NUM_CALLS=`libtool --mode=execute strace ./prog_cat "${TESTURL}/CAT" 2>&1 >/dev/null | grep readv |wc -l`