diff options
author | Karel Zak | 2016-12-09 15:11:31 +0100 |
---|---|---|
committer | Karel Zak | 2016-12-09 15:36:14 +0100 |
commit | 0a14cc8bcc151e03c8979ed1ff4a3bee9672365b (patch) | |
tree | 5f72c2484435b556ddec93bd162e9e5f5dedbd9d /tests/ts/libmount/context | |
parent | Merge branch doc_fixes (diff) | |
download | kernel-qcow2-util-linux-0a14cc8bcc151e03c8979ed1ff4a3bee9672365b.tar.gz kernel-qcow2-util-linux-0a14cc8bcc151e03c8979ed1ff4a3bee9672365b.tar.xz kernel-qcow2-util-linux-0a14cc8bcc151e03c8979ed1ff4a3bee9672365b.zip |
libmount: revert X-* and x-* meaning
Let's hope this is last change necessary to cleanup x-* usage:
x-* persistent option, stored in utab, available for umount, etc.
X-* fstab comment only
mount(8) supports x-mount.mkdir= as well as newly recommended X-mount.mkdir=
Advantages:
* less invasive
* does not require exception for x-systemd
* does not require rename x-initrd to X-initrd
The systemd and dracut users will get the new (=fixed) functionality without a
change in fstab configuration. This is the primary goal.
Disadvantages:
* not 100% compatible libmount behavior, x-* options have not been
previously stored in utab. The API is the same, options will be still
available, but on x-* libmount will write to /run/mount/utab. For now
it seems only systemd uses x-*, and they like this behavior, so...
Addresses: https://github.com/systemd/systemd/pull/4515
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts/libmount/context')
-rwxr-xr-x | tests/ts/libmount/context | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/ts/libmount/context b/tests/ts/libmount/context index ebb244110..2d85dbb59 100755 --- a/tests/ts/libmount/context +++ b/tests/ts/libmount/context @@ -23,9 +23,6 @@ LABEL=libmount-test UUID=$($TS_CMD_UUIDGEN) MOUNTPOINT="$TS_MOUNTPOINT" -TS_NOEXIST="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-noex" -[ -d $TS_NOEXIST ] && rmdir $TS_NOEXIST - [ -x $TESTPROG ] || ts_skip "test not compiled" ts_log "Init device" @@ -147,7 +144,11 @@ is_mounted $MOUNTPOINT && echo "$MOUNTPOINT still mounted" >> $TS_OUTPUT 2>&1 ts_finalize_subtest +# deprecated ts_init_subtest "x-mount.mkdir" +TS_NOEXIST="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-noex" +[ -d $TS_NOEXIST ] && rmdir $TS_NOEXIST + $TS_CMD_MOUNT -o x-mount.mkdir --bind $MOUNTPOINT $TS_NOEXIST >> $TS_OUTPUT 2>&1 && echo "successfully mounted" >> $TS_OUTPUT ts_finalize_subtest @@ -155,5 +156,17 @@ ts_finalize_subtest $TS_CMD_UMOUNT $TS_NOEXIST rmdir $TS_NOEXIST + +ts_init_subtest "X-mount.mkdir" +TS_NOEXIST="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-noex" +[ -d $TS_NOEXIST ] && rmdir $TS_NOEXIST + +$TS_CMD_MOUNT -o X-mount.mkdir --bind $MOUNTPOINT $TS_NOEXIST >> $TS_OUTPUT 2>&1 && + echo "successfully mounted" >> $TS_OUTPUT +ts_finalize_subtest + +$TS_CMD_UMOUNT $TS_NOEXIST +rmdir $TS_NOEXIST + ts_log "...done." ts_finalize |