summaryrefslogtreecommitdiffstats
path: root/tests/ts/libmount/update-py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:42:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:42:50 +0000
commit8cb83eee5a58b1fad74c34094ce3afb9e430b5a4 (patch)
treea9b2e7baeca1be40eb734371e3c8b11b02294497 /tests/ts/libmount/update-py
parentInitial commit. (diff)
downloadutil-linux-8cb83eee5a58b1fad74c34094ce3afb9e430b5a4.tar.xz
util-linux-8cb83eee5a58b1fad74c34094ce3afb9e430b5a4.zip
Adding upstream version 2.33.1.upstream/2.33.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ts/libmount/update-py')
-rwxr-xr-xtests/ts/libmount/update-py32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/ts/libmount/update-py b/tests/ts/libmount/update-py
new file mode 100755
index 0000000..66f1754
--- /dev/null
+++ b/tests/ts/libmount/update-py
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="tab update-py"
+
+. $TS_TOPDIR/functions.sh
+ts_init "$*"
+ts_init_py libmount
+ts_skip_nonroot
+
+if [ -f "$ASAN_SYMBOLIZER_PATH" ]; then
+ TS_KNOWN_FAIL="yes"
+fi
+
+TESTPROG="$TS_HELPER_PYLIBMOUNT_UPDATE"
+[ -x $TESTPROG ] || ts_die "test script missing"
+
+#
+# fstab - replace
+#
+export LIBMOUNT_FSTAB=$TS_OUTPUT.fstab
+rm -f $LIBMOUNT_FSTAB
+cp "$TS_SELF/files/fstab.comment" $LIBMOUNT_FSTAB
+
+ts_init_subtest "fstab-replace"
+$PYTHON $TESTPROG --replace "LABEL=foo" "/mnt/foo" >/dev/null 2>&1
+cp $LIBMOUNT_FSTAB $TS_OUTPUT # save the fstab aside
+ts_finalize_subtest #checks the fstab
+
+ts_finalize