summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKarel Zak2012-01-26 14:27:09 +0100
committerKarel Zak2012-01-26 14:27:09 +0100
commit07919b7b5b3f40ca1af9f0076bc25c512603f473 (patch)
tree649d91f49673ca9df4063db57e26bb398f791e2a /tests
parentlibmount: fix buffer overflow and leaks in tests (diff)
downloadkernel-qcow2-util-linux-07919b7b5b3f40ca1af9f0076bc25c512603f473.tar.gz
kernel-qcow2-util-linux-07919b7b5b3f40ca1af9f0076bc25c512603f473.tar.xz
kernel-qcow2-util-linux-07919b7b5b3f40ca1af9f0076bc25c512603f473.zip
tests: call valgrind from libmount utils and update tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ts/libmount/update44
-rwxr-xr-xtests/ts/libmount/utils32
2 files changed, 38 insertions, 38 deletions
diff --git a/tests/ts/libmount/update b/tests/ts/libmount/update
index 333605aa9..3a989dddb 100755
--- a/tests/ts/libmount/update
+++ b/tests/ts/libmount/update
@@ -30,30 +30,30 @@ rm -f $LIBMOUNT_MTAB
> $LIBMOUNT_MTAB
ts_init_subtest "mtab-mount"
-$TESTPROG --add /dev/sda1 /mnt/foo ext3 "rw,bbb,ccc,fff=FFF,ddd,noexec"
-$TESTPROG --add /dev/sdb1 /mnt/bar ext3 "gg=G,ffff=f,ro,noatime"
-$TESTPROG --add /dev/sda2 /mnt/bar ext3 "rw,noatime"
-$TESTPROG --add /dev/sda1 /mnt/gogo ext3 "rw,noatime,nosuid"
-$TESTPROG --add none /proc proc defaults
+ts_valgrind $TESTPROG --add /dev/sda1 /mnt/foo ext3 "rw,bbb,ccc,fff=FFF,ddd,noexec"
+ts_valgrind $TESTPROG --add /dev/sdb1 /mnt/bar ext3 "gg=G,ffff=f,ro,noatime"
+ts_valgrind $TESTPROG --add /dev/sda2 /mnt/bar ext3 "rw,noatime"
+ts_valgrind $TESTPROG --add /dev/sda1 /mnt/gogo ext3 "rw,noatime,nosuid"
+ts_valgrind $TESTPROG --add none /proc proc defaults
cp $LIBMOUNT_MTAB $TS_OUTPUT # save the mtab aside
ts_finalize_subtest # checks the mtab
ts_init_subtest "mtab-move"
-$TESTPROG --move /mnt/foo /mnt/newfoo
-$TESTPROG --move /mnt/bar /mnt/newbar
+ts_valgrind $TESTPROG --move /mnt/foo /mnt/newfoo
+ts_valgrind $TESTPROG --move /mnt/bar /mnt/newbar
cp $LIBMOUNT_MTAB $TS_OUTPUT # save the mtab aside
ts_finalize_subtest # checks the mtab
ts_init_subtest "mtab-remount"
-$TESTPROG --remount /mnt/newfoo "ro,noatime"
-$TESTPROG --remount /mnt/bar "rw,atime,nosuid"
+ts_valgrind $TESTPROG --remount /mnt/newfoo "ro,noatime"
+ts_valgrind $TESTPROG --remount /mnt/bar "rw,atime,nosuid"
cp $LIBMOUNT_MTAB $TS_OUTPUT # save the mtab aside
ts_finalize_subtest # checks the mtab
ts_init_subtest "mtab-umount"
-$TESTPROG --remove /mnt/bar
-$TESTPROG --remove /mnt/gogo
-$TESTPROG --remove /proc
+ts_valgrind $TESTPROG --remove /mnt/bar
+ts_valgrind $TESTPROG --remove /mnt/gogo
+ts_valgrind $TESTPROG --remove /proc
cp $LIBMOUNT_MTAB $TS_OUTPUT # save the mtab aside
ts_finalize_subtest # checks the mtab
@@ -68,28 +68,28 @@ rm -f $LIBMOUNT_UTAB
> $LIBMOUNT_UTAB
ts_init_subtest "utab-mount"
-$TESTPROG --add /dev/sda1 /mnt/foo ext3 "rw,bbb,ccc,fff=FFF,ddd,noexec"
-$TESTPROG --add /dev/sdb1 /mnt/bar ext3 "ro,user"
-$TESTPROG --add /dev/sda2 /mnt/xyz ext3 "rw,loop=/dev/loop0,uhelper=hal"
-$TESTPROG --add none /proc proc "rw,user"
+ts_valgrind $TESTPROG --add /dev/sda1 /mnt/foo ext3 "rw,bbb,ccc,fff=FFF,ddd,noexec"
+ts_valgrind $TESTPROG --add /dev/sdb1 /mnt/bar ext3 "ro,user"
+ts_valgrind $TESTPROG --add /dev/sda2 /mnt/xyz ext3 "rw,loop=/dev/loop0,uhelper=hal"
+ts_valgrind $TESTPROG --add none /proc proc "rw,user"
cp $LIBMOUNT_UTAB $TS_OUTPUT # save the mtab aside
ts_finalize_subtest # checks the mtab
ts_init_subtest "utab-move"
-$TESTPROG --move /mnt/bar /mnt/newbar
-$TESTPROG --move /mnt/xyz /mnt/newxyz
+ts_valgrind $TESTPROG --move /mnt/bar /mnt/newbar
+ts_valgrind $TESTPROG --move /mnt/xyz /mnt/newxyz
cp $LIBMOUNT_UTAB $TS_OUTPUT # save the mtab aside
ts_finalize_subtest # checks the mtab
ts_init_subtest "utab-remount"
-$TESTPROG --remount /mnt/newbar "ro,noatime"
-$TESTPROG --remount /mnt/newxyz "rw,user"
+ts_valgrind $TESTPROG --remount /mnt/newbar "ro,noatime"
+ts_valgrind $TESTPROG --remount /mnt/newxyz "rw,user"
cp $LIBMOUNT_UTAB $TS_OUTPUT # save the mtab aside
ts_finalize_subtest # checks the mtab
ts_init_subtest "utab-umount"
-$TESTPROG --remove /mnt/newbar
-$TESTPROG --remove /proc
+ts_valgrind $TESTPROG --remove /mnt/newbar
+ts_valgrind $TESTPROG --remove /proc
cp $LIBMOUNT_UTAB $TS_OUTPUT # save the mtab aside
ts_finalize_subtest # checks the mtab
diff --git a/tests/ts/libmount/utils b/tests/ts/libmount/utils
index fbd63593b..d425400ad 100755
--- a/tests/ts/libmount/utils
+++ b/tests/ts/libmount/utils
@@ -13,67 +13,67 @@ TESTPROG="$TS_HELPER_LIBMOUNT_UTILS"
[ -x $TESTPROG ] || ts_skip "test not compiled"
ts_init_subtest "match-fstype"
-$TESTPROG --match-fstype ext3 "ext2,ext3,cifs" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --match-fstype ext3 "ext2,ext3,cifs" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "match-fstype-neg"
-$TESTPROG --match-fstype cifs "ext2,ext3,nocifs" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --match-fstype cifs "ext2,ext3,nocifs" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "match-fstype-neg2"
-$TESTPROG --match-fstype cifs "noext2,ext3,cifs" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --match-fstype cifs "noext2,ext3,cifs" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "match-options"
-$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ccc" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ccc" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "match-options-list"
-$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ccc,aaa,ddd" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ccc,aaa,ddd" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "match-options-neg"
-$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "noxxx" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "noxxx" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "match-options-neg-list"
-$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ddd,noaaa" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ddd,noaaa" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "match-options-neg-list2"
-$TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "noxxx,ccc,aaa" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "noxxx,ccc,aaa" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "starts-with"
-$TESTPROG --starts-with "AAAbbbCCC" "AAA" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --starts-with "AAAbbbCCC" "AAA" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "ends-with"
-$TESTPROG --ends-with "AAAbbbCCC" "CCC" &> $TS_OUTPUT
+ts_valgrind $TESTPROG --ends-with "AAAbbbCCC" "CCC" &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "mountpoint"
-$TESTPROG --mountpoint /proc &> $TS_OUTPUT
+ts_valgrind $TESTPROG --mountpoint /proc &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "mountpoint-subdir"
-$TESTPROG --mountpoint /proc/sys/kernel &> $TS_OUTPUT
+ts_valgrind $TESTPROG --mountpoint /proc/sys/kernel &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "mountpoint-root"
-$TESTPROG --mountpoint / &> $TS_OUTPUT
+ts_valgrind $TESTPROG --mountpoint / &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "fs-root"
-$TESTPROG --fs-root /proc &> $TS_OUTPUT
+ts_valgrind $TESTPROG --fs-root /proc &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "fs-root-subdir"
-$TESTPROG --fs-root /proc/sys/kernel &> $TS_OUTPUT
+ts_valgrind $TESTPROG --fs-root /proc/sys/kernel &> $TS_OUTPUT
ts_finalize_subtest
ts_init_subtest "fs-root-subdir2"
-$TESTPROG --fs-root /etc &> $TS_OUTPUT
+ts_valgrind $TESTPROG --fs-root /etc &> $TS_OUTPUT
ts_finalize_subtest
ts_finalize