summaryrefslogtreecommitdiffstats
path: root/tests/ts/libmount/update-py
blob: b4450c48760252f3cccb65929c579257edcb0f60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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

if [ "$TS_ENABLE_ASAN" == "yes" -o "$TS_ENABLE_UBSAN" == "yes" ]; 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