summaryrefslogtreecommitdiffstats
path: root/tests/ts/libmount/context
Commit message (Collapse)AuthorAgeFilesLines
* tests: (libmount) make X-* and x-* more robustKarel Zak2019-07-151-3/+4
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/818 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix grep expressions for devicesRuediger Meier2018-03-191-1/+1
| | | | | | | | | | ts_is_mounted "/dev/loop1" returned true if /dev/loop17 was mounted. A very annoying source of sporadic failures since many years. This issue became more visible since running the checks in parallel, which increases the probability to get bigger loop device numbers. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add wierd sleep for libmount/contextRuediger Meier2018-03-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I still don't understand why this helps to fix these tests on my system. udevadm settle had no positive effect. Adding the sleeps before "is_mounted" also didn't fixed that, that's amazing!? Below the test log, very often seen on my system since a long time: -------------------- util-linux regression tests -------------------- For development purpose only. Don't execute on production system! kernel: 4.4.104-39-default libmount: context: [01] mount-by-devname ... OK libmount: context: [02] umount-by-devname ... OK libmount: context: [03] mount-by-label ... OK libmount: context: [04] umount-by-mountpoint ... OK libmount: context: [05] mount-by-uuid ... FAILED (libmount/context-mount-by-uuid) libmount: context: [06] mount-flags ... FAILED (libmount/context-mount-flags) libmount: context: [07] mount-loopdev ... OK libmount: context: [08] x-mount.mkdir ... OK libmount: context: [09] X-mount.mkdir ... OK libmount: context ... FAILED (2 from 9 sub-tests) --------------------------------------------------------------------- 1 tests of 17 FAILED --------------------------------------------------------------------- rudi@zappa:~/devel/util-linux/build> cat tests/diff/libmount/context-mount-by-uuid --- /home/rudi/devel/util-linux/tests/expected/libmount/context-mount-by-uuid 2017-07-03 12:20:24.144845538 +0200 +++ /home/rudi/devel/util-linux/build/tests/output/libmount/context-mount-by-uuid 2018-01-24 00:42:18.549444408 +0100 @@ -1,2 +1,3 @@ successfully mounted -successfully umounted +failed to umount +FAILED [rc=16]/dev/sdb1 still mounted rudi@zappa:~/devel/util-linux/build> cat tests/diff/libmount/context-mount-flags --- /home/rudi/devel/util-linux/tests/expected/libmount/context-mount-flags 2017-07-03 12:20:24.148845497 +0200 +++ /home/rudi/devel/util-linux/build/tests/output/libmount/context-mount-flags 2018-01-24 00:42:18.725442931 +0100 @@ -1,5 +1,5 @@ +test_mount_context: failed to mount: Device or resource busy +FAILED [rc=16]rw,relatime successfully mounted -ro,nosuid,noexec -successfully mounted -rw,nosuid,noexec +rw,relatime successfully umounted Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: rename ts_valgrind to ts_runKarel Zak2017-11-231-11/+11
| | | | | | | Let's make our tests more generic, so we can later hide more stuff into ts_run call. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add --mountpoint to findmnt callsKarel Zak2017-03-311-2/+2
| | | | | | ... if necessary to make things more robust. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: revert X-* and x-* meaningKarel Zak2016-12-091-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: consolidate rmmod scsi_debugRuediger Meier2016-10-211-2/+0Star
| | | | | | | | | - auto cleanup on test exit - Add smart timeout: Newer openSUSE systems on OBS failed to rmmod almost always. udevadm settle does not seem to have any affect. - now tests will fail if rmmod fails Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: make tests more portable due to mtabKarel Zak2016-04-151-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: remove USE_LIBMOUNT_FORCE_MOUNTINFOKarel Zak2016-04-151-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: don't use system's mount commandsRuediger Meier2016-03-131-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: no more sleep, udevadm settle onlyRuediger Meier2016-01-051-1/+0Star
| | | | | | This seems to work nowadays and saves 37s. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: skip nonroot before checking for progs in PATHRuediger Meier2015-12-101-1/+2
| | | | | | | | | | The least annoying and most useful order is this one: 1. check for compiled UL commands 2. check for root 3. check for loop support 4. check for external progs Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Merge branch 'tests-refactor-loop-cleanup' of ↵Karel Zak2015-04-221-1/+1
|\ | | | | | | | | | | | | | | | | | | | | https://github.com/rudimeier/util-linux * 'tests-refactor-loop-cleanup' of https://github.com/rudimeier/util-linux: tests: never use -o pipefail tests: loop tests, don't call ts_die() with DEVICE parameter tests: scsi_debug tests, don't call ts_die() with DEVICE parameter tests: introduce TS_LOOP_DEVS for cleanup tests: introduce ts_cleanup_on_exit()
| * tests: scsi_debug tests, don't call ts_die() with DEVICE parameterRuediger Meier2015-04-141-1/+1
| | | | | | | | | | | | This was almost useless anyway. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: config.h lives in build directoryRuediger Meier2015-04-221-1/+1
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: make libmount context tests sensitive to USE_LIBMOUNT_FORCE_MOUNTINFOKarel Zak2015-04-141-21/+29
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: check for mkfs.ext{2,3,4}Ruediger Meier2014-05-151-0/+2
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: introduce TS_CMD_UUIDGEN (never use installed one)Ruediger Meier2014-05-131-1/+3
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: ts_scsi_debug_init must not run in a subshellRuediger Meier2014-05-131-4/+5
| | | | | | | | | | | ts_skip and ts_die won't work from subshell. Now we simply use TS_DEVICE which is globally set in that function. I've made sure that we never change TS_DEVICE variable after we've got it. So we could use it again for cleanup on exit in ts_{finalize,die,skip} functions. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: check commands needed for running a test existSami Kerola2014-03-071-1/+6
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: avoid executing dirname(1) commandSami Kerola2014-02-171-1/+1
| | | | | | Bash parameter expansion does the same thing. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: consolidate scsi_debug usageKarel Zak2013-04-121-17/+13Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: use udevadm settle rather than sleepKarel Zak2013-04-121-3/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: add support for x-mount.mkdir[=<mode>] optionOndrej Oprala2013-01-091-0/+10
| | | | | | | | | If the target directory (mountpoint) does not exist then mount(8) will create it before mount.<type> is executed or mount(2) syscall is called. Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add valgrind to libmount context testsKarel Zak2012-01-261-11/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add loopdev libmount testKarel Zak2011-09-291-0/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* grammar fixesDavidlohr Bueso2011-08-151-5/+5
| | | | | | Correct grammar from "cannot found" to "cannot find". Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* tests: add -o remount to libmount testsKarel Zak2011-07-251-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix libmount testKarel Zak2011-02-091-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: skip non-compiled libmount testsKarel Zak2011-01-251-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: minor fixesKarel Zak2011-01-031-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: improve libmount context mount and umount testKarel Zak2011-01-031-0/+111
Signed-off-by: Karel Zak <kzak@redhat.com>