summaryrefslogtreecommitdiffstats
path: root/tests/ts/libmount
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtests/ts/libmount/optlist67
-rwxr-xr-xtests/ts/libmount/optstr8
-rwxr-xr-xtests/ts/libmount/update1
-rwxr-xr-xtests/ts/libmount/update-py1
4 files changed, 73 insertions, 4 deletions
diff --git a/tests/ts/libmount/optlist b/tests/ts/libmount/optlist
new file mode 100755
index 0000000..8499496
--- /dev/null
+++ b/tests/ts/libmount/optlist
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="options string"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command $TS_HELPER_LIBMOUNT_OPTLIST
+
+TESTPROG="$TS_HELPER_LIBMOUNT_OPTLIST"
+
+ts_init_subtest "append"
+ts_run $TESTPROG --append-str "aaa,bbb=BBB,context=\"foo,bar,gogo\",ccc" "ddd" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "append-value"
+ts_run $TESTPROG --append-str "aaa,bbb=BBB,ccc" "ddd=DDD" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "append-empty-value"
+ts_run $TESTPROG --append-str "aaa,bbb=BBB,ccc" "ddd=" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "prepend"
+ts_run $TESTPROG --prepend-str "aaa,bbb=BBB,ccc" "ddd" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "prepend-list"
+ts_run $TESTPROG --prepend-str "aaa,bbb=BBB,ccc" "ddd,eee=EEE,fff" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "prepend-value"
+ts_run $TESTPROG --prepend-str "aaa,bbb=BBB,ccc" "ddd=DDD" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "prepend-empty-value"
+ts_run $TESTPROG --prepend-str "aaa,bbb=BBB,ccc" "ddd=" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "set"
+ts_run $TESTPROG --set-str "aaa,bbb=BBB,ccc" "new,data,for,list" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "get-str"
+ts_run $TESTPROG --get-str "aaa,bbb=BBB,ccc,defaults" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "get-str-linux"
+ts_run $TESTPROG --get-str "noexec,noauto,user,defaults" linux &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "get-str-user"
+ts_run $TESTPROG --get-str "noexec,noauto,user,defaults" user &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "get-flg-linux"
+ts_run $TESTPROG --get-flg "noexec,noauto,user,defaults" linux &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "get-flg-user"
+ts_run $TESTPROG --get-flg "noexec,noauto,user,defaults" user &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/libmount/optstr b/tests/ts/libmount/optstr
index 26d9b73..979517e 100755
--- a/tests/ts/libmount/optstr
+++ b/tests/ts/libmount/optstr
@@ -8,9 +8,9 @@ TS_DESC="options string"
. "$TS_TOPDIR"/functions.sh
ts_init "$*"
-TESTPROG="$TS_HELPER_LIBMOUNT_OPTSTR"
+ts_check_test_command $TS_HELPER_LIBMOUNT_OPTSTR
-[ -x $TESTPROG ] || ts_skip "test not compiled"
+TESTPROG="$TS_HELPER_LIBMOUNT_OPTSTR"
ts_init_subtest "append"
ts_run $TESTPROG --append "aaa,bbb=BBB,context=\"foo,bar,gogo\",ccc" "ddd" &> $TS_OUTPUT
@@ -28,6 +28,10 @@ ts_init_subtest "prepend"
ts_run $TESTPROG --prepend "aaa,bbb=BBB,ccc" "ddd" &> $TS_OUTPUT
ts_finalize_subtest
+ts_init_subtest "prepend-list"
+ts_run $TESTPROG --prepend "aaa,bbb=BBB,ccc" "ddd,eee=EEE,fff" &> $TS_OUTPUT
+ts_finalize_subtest
+
ts_init_subtest "prepend-value"
ts_run $TESTPROG --prepend "aaa,bbb=BBB,ccc" "ddd" "DDD" &> $TS_OUTPUT
ts_finalize_subtest
diff --git a/tests/ts/libmount/update b/tests/ts/libmount/update
index ba93e0b..b8f7488 100755
--- a/tests/ts/libmount/update
+++ b/tests/ts/libmount/update
@@ -7,7 +7,6 @@ TS_DESC="tab update"
. "$TS_TOPDIR"/functions.sh
ts_init "$*"
-ts_skip_nonroot
TESTPROG="$TS_HELPER_LIBMOUNT_UPDATE"
diff --git a/tests/ts/libmount/update-py b/tests/ts/libmount/update-py
index bfb8441..b4450c4 100755
--- a/tests/ts/libmount/update-py
+++ b/tests/ts/libmount/update-py
@@ -8,7 +8,6 @@ TS_DESC="tab update-py"
. "$TS_TOPDIR"/functions.sh
ts_init "$*"
ts_init_py libmount
-ts_skip_nonroot
if [ "$TS_ENABLE_ASAN" == "yes" -o "$TS_ENABLE_UBSAN" == "yes" ]; then
TS_KNOWN_FAIL="yes"