summaryrefslogtreecommitdiffstats
path: root/tests/ts/misc
Commit message (Collapse)AuthorAgeFilesLines
* tests: use subtests for mountpoint(1)Karel Zak2019-08-071-4/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mountpoint: add --nofollow optionSami Kerola2019-08-021-0/+27
| | | | | | | | | | The no follow option will allow user to distinct mount points from symbolic links pointing to them. Arguably this is pretty pedantic option, mounting a device or bind mount to a directory via symlink does not have or cause any issues. Addresses: https://github.com/karelzak/util-linux/issues/832 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add missing ts_check_test_command callKarel Zak2019-03-051-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add missing ts_check_test_command callsKarel Zak2019-03-041-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: make sure TS_HELPER_MBSENCODE compiledKarel Zak2019-03-011-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: use pgrep instead of ps --ppid ...Ruediger Meier2018-02-161-5/+2Star
| | | | | | | The usage looks a bit cleaner, and I guess that pgrep(1) is available on the same machines where "ps --ppid" would work (procps-ng). Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: mark mbsencode as KNOWN_FAILVaclav Dolezal2018-01-111-0/+3
| | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* tests: mbsencode - test for HAVE_WIDECHARVaclav Dolezal2018-01-111-8/+26
| | | | | | Test only safe-ascii as it should behave in the same way. Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* tests: mbsencode - removed emoji, added control unicode characterVaclav Dolezal2018-01-111-1/+1
| | | | | | | Emojis are apparently too recent to be reliably recognised as printable on test machines. Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* tests: add tests for encode functions from lib/mbsalign.cVaclav Dolezal2018-01-101-0/+62
| | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* tests: add more tests for line(1)Ruediger Meier2017-06-141-4/+25
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Revert "tests: use stdbuf when stderr and stdout is randomly ordered"Ruediger Meier2017-06-011-2/+1Star
| | | | | | | | stdbuf does not seem to work reliable. Failed on travis/OSX This reverts commit 398b3148bedee936ee0b012b3b6e82b20547f218. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: handle non glibc error message for fallocateRuediger Meier2017-06-011-3/+2Star
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: use stdbuf when stderr and stdout is randomly orderedRuediger Meier2017-06-011-1/+2
| | | | | | glibc seems to flush stdout before stderr. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: check for ps --ppidKarel Zak2017-05-301-0/+3
| | | | | Reported-by: Assaf Gordon <assafgordon@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: check for timeout progKarel Zak2016-11-031-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: wait for flock background processRuediger Meier2016-11-021-0/+10
| | | | | | | Maybe we should add a --daemonize option to flock to cover this use case. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add flock testsKarel Zak2016-10-311-0/+95
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: ignore redundant slashesKarel Zak2016-08-081-34/+34
| | | | | | | | | | | | | | | ///aaa/bbb and /aaa/bbb/ are the same paths. This is important especially with NFS where number of slashes are not the same in the /proc/self/mountinfo and fstab or utab. The regular URI is euler://tmp but /proc contains euler:/tmp Reported-by: Ales Novak <alnovak@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: move getopt to separate directoryKarel Zak2016-04-223-305/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: don't depend on GNU md5sumRuediger Meier2016-04-131-2/+3
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: improve setarch tests, regarding --uname-2.6 issuesRuediger Meier2016-03-241-8/+66
| | | | | | | | | | | | | | | | | | | | | | | | Add some more tests: * error handling "unknown arch" and "unknown command" * "noop" test with host arch and no other options * all options except --uname-2.6 * --uname-2.6 whithout any other options but handle fatal glibc error "kernel too old" (with debug output) * add a "real" --uname-2.6 test which validates uname(1) output Note the "kernel too old" cases are systems where glibc was configured to support only kernels > 3.0. On some archs (e.g. x86) --uname-2.6 still works with such glibc because 2.6.39 had all needed features on board (e.g. vdso). See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806911 Some people reported segfaults (after execvp) but I can only reproduce it on arm* and aarch64 qemu-user-space builds. We don't need to fix our tests for such broken systems where also many other tests fail currently. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: ignore setarch on sparcKarel Zak2016-03-171-0/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: improve getopt loop error caseRuediger Meier2016-03-071-6/+7
| | | | | | | Avoid exit 1 in test scripts. Simplify and complete redirection to TS_OUPUT. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: getopt2, add function gnu_getopt_clean()Ruediger Meier2016-03-071-0/+36
| | | | | | This makes the test compatible to OpenBSD, OSX and musl libc. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: don't skip case "output undefined"Ruediger Meier2016-03-071-19/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | Treat missing expected files as empty and let the test fail if there is non-empty output. Expected output may be missing in these cases: 1. forgot to commit the file after changing/adding a (sub)test 2. a bug in a test where we do tricks with TS_EXPECTED 3. and most notable if ts_die() is called before a subtest is initialized, e.g. in ts_scsi_debug_init() I always wondered why we don't treat this as FAILED. Now we do so, ts_finalize and ts_gen_diff looks much cleaner now. The change discovers that tests with subtest were ignoring the "non-sub" expected files which had to be fixed. BTW we removed any zero sized files. Moreover now we respect diff's return value. In past all test succeeded when diff was not able to write to diffdir, e.g. when running tests as normal user after they run as root. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: make swaplabel test more robustKarel Zak2016-01-261-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update swapfile outputKarel Zak2016-01-261-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add some line testsRuediger Meier2015-12-031-0/+11
| | | | | | regarding e03f29b6 ... Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: fix getopt for old glibcRuediger Meier2015-03-261-3/+3
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: fix swaplabel test for 9a83b03cRuediger Meier2015-01-261-1/+2
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Revert "tests: simplify and update swaplabel test"Ruediger Meier2015-01-261-2/+6
| | | | | | | | | | After mkswap refactoring we have still a "minimal swap size" wich depend on PAGE_SIZE. Next commit will fix the test for output changes made in 9a83b03c. This reverts commit b4d27255f24cddbdf3480ca0988dada340abe2d3. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add more getopt testsSami Kerola2014-12-081-0/+63
| | | | | | | | After importing Frodo's tests I ran coverage to see if something had remained unchecked, and there were couple tests that could be done. CC: Frodo Looijaard <frodo@frodo.looijaard.name> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: copy test-suite from Frodo Looijaard's getoptSami Kerola2014-12-081-0/+176
| | | | | | | | | | The test cases and their names are the same, but the surrounding testing facility with Frodo's svn and util-linux are pretty different so this is not exactly 1:1 copy. Reference: svn://svn.frodo.looijaard.name/public/getopt/trunk/tests CC: Frodo Looijaard <frodo@frodo.looijaard.name> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: simplify and update swaplabel testKarel Zak2014-11-101-6/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: swaplabel needs to respect pagesizeRuediger Meier2014-03-151-5/+13
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: try hard to create swaplabel's test imageRuediger Meier2014-03-141-5/+13
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: check swaplabel, and perform more swapon boundary testsSami Kerola2014-03-121-0/+44
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: cleanup fallocateKarel Zak2014-03-121-4/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests, skip fallocate for unsupported filesystemsRuediger Meier2014-03-111-2/+10
|
* tests: check commands needed for running a test existSami Kerola2014-03-0710-3/+19
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: avoid executing dirname(1) commandSami Kerola2014-02-1711-11/+11
| | | | | | Bash parameter expansion does the same thing. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: stop adding new line at the end when input does not have itSami Kerola2013-06-071-0/+2
| | | | | | | | | | When the rev(1) is executed twice outcome is expected to be exactly what it was originally. That includes not adding new line at the end of the output. The oneliner below demonstrates earlier issue. $ printf "abc\n123" | rev | rev Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: make line(1) optionalKarel Zak2013-04-101-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: move fallocate test fileKarel Zak2013-03-121-3/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: use checksum to detect rev(1) consistencyKarel Zak2013-03-051-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add whereis(1) checkSami Kerola2013-01-251-0/+28
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add fallocate(1) checkSami Kerola2013-01-251-0/+25
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add setarch(8) checkSami Kerola2013-01-251-0/+23
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add setsid(1) checkSami Kerola2013-01-251-0/+23
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>