Commit graph

17 commits

Author SHA1 Message Date
Masatake YAMATO
7155e836de tests: wrap $TS_{TOPDIR,SELF} in "." cmdline with double quote chars
The command lines used for this change:

  $ cd tests/ts
  $ sed  -i -e 's|. $TS_SELF/|. "$TS_SELF"/|'  $(grep --exclude='*~' -lr -e '^\. \$TS_SELF/')
  $ sed -i -e 's|. $TS_TOPDIR/functions.sh|. "$TS_TOPDIR"/functions.sh|'  $(grep --exclude='*~' -lr -e '^\. \$TS_TOPDIR/functions.sh')

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2022-11-23 16:09:48 +09:00
Karel Zak
4b9e393796 tests: don't print mount hins on terminal
Signed-off-by: Karel Zak <kzak@redhat.com>
2022-10-25 11:04:20 +02:00
Karel Zak
8839d98089 tests: migrate from ext3 to ext2
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-26 11:11:14 +01:00
Karel Zak
cbf858aa08 tests: split stdout and stderr
* add $TS_ERRLOG for script stderr output
* add optional $TS_EXPECTED_ERR which points to expected/*/*.err

This change allows to keep track about stderr output from our commands
(already found bug in sfdisk...).

We do not have to depend on fragile stdout vs. stderr order (due to
different buffering semantic in different libc, etc.).

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-08-30 15:50:07 +02:00
Ruediger Meier
ee6c0ca65b tests: skip nonroot before checking for progs in PATH
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>
2015-12-10 19:05:25 +01:00
Ruediger Meier
f1849be96a tests: loop tests, don't call ts_die() with DEVICE parameter
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-04-14 13:18:43 +02:00
Ruediger Meier
cbae7931c8 tests: introduce TS_LOOP_DEVS for cleanup
We are maintaining an array TS_LOOP_DEVS to de-initialize devices
always on exit. Until now there was no cleanup in ts_skip().

The downside is that we can't execute ts_device_init() in a subshell
anymore. The device is returned via global variable TS_LODEV, similar
like we do already in ts_scsi_debug_init().

Tests which don't use ts_device_init() to create loop devices may use
ts_register_loop_device() to get them cleaned up later.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-04-14 13:18:42 +02:00
Ruediger Meier
bb3df8218b tests: some more mount error handling
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-19 17:12:15 +01:00
Karel Zak
0009f510cb findmnt: add --mountpoint command line option
The current --target <path> implementation check the <path> elements in
reverse order to get the mountpoint. The feature may be inwanted in
some cases when we really want to check for mountpoint specified by
the <path>. The new option "--mountpoint <path>" allows to be strict.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-19 12:12:21 +01:00
Ruediger Meier
8930be5a22 tests: check for mkfs.ext{2,3,4}
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-15 12:51:24 +02:00
Ruediger Meier
a5b45f2f34 tests: ts_device_init requires loop support
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-13 17:37:19 +02:00
Sami Kerola
2f79154639 tests: check commands needed for running a test exist
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-07 11:52:57 +01:00
Karel Zak
65acdc8734 build-sys: remove deprecated-mount/
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-05 13:19:19 +01:00
Sami Kerola
e130ce53ce tests: avoid executing dirname(1) command
Bash parameter expansion does the same thing.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-02-17 13:55:41 +01:00
Karel Zak
d426ddbd5f tests: make mount tests backwardly compatible with deprecated-mount/
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-25 11:07:05 +02:00
Karel Zak
a3ab5f52ce tests: add/improve mount shared-subtree tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-15 14:25:23 +01:00
Karel Zak
ee99c9cb37 tests: add tests for mount --make-* stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-01 12:30:14 +01:00