summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'tests-mount' of https://github.com/rudimeier/util-linuxKarel Zak2014-05-164-4/+27
|\ | | | | | | | | | | | | | | * 'tests-mount' of https://github.com/rudimeier/util-linux: tests: use ts_mount for cramfs tests: ts_mount knows which fs is expected tests: ts_mount validates error message tests, add function ts_mount
| * tests: use ts_mount for cramfsRuediger Meier2014-05-162-2/+2
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: ts_mount knows which fs is expectedRuediger Meier2014-05-162-2/+4
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: ts_mount validates error messageRuediger Meier2014-05-161-3/+9
| | | | | | | | | | | | | | Skip only if mount reports a non-empty fs which is not available in /proc/filesystems. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests, add function ts_mountRuediger Meier2014-05-162-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to generalize mounts similar to how we do it already in minix/mkfs. Currently most of our other checks just fail if "fs not supported". Note that the new function checks a bit stronger than before in minix/mkfs. It respects mount's return value and stderr goes to $TS_OUTPUT too. It's a bit ugly that we write to $TS_OUTPUT from inside of the function. But if the caller would do it then we couldn't ts_skip and the whole function would be pointless. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: check for mkfs.ext{2,3,4}Ruediger Meier2014-05-1527-0/+29
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: consolidate some checks for commandsRuediger Meier2014-05-158-22/+21Star
| | | | | | | | | | | | | | | | | | | | | | Use ts_check_prog for mdadm, readelf, file, ntpdate, bc (mdadm was not always checked so far). There are some positive side-effects. We are using always $PATH now instead of randomly hardcoded /usr/bin, /sbin, etc. If we ever want to change this again, we should do this generically in ts_init. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: add function ts_check_progRuediger Meier2014-05-151-0/+5
|/ | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Merge branch 'travis-root-checks-v2' of https://github.com/rudimeier/util-linuxKarel Zak2014-05-1449-148/+217
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'travis-root-checks-v2' of https://github.com/rudimeier/util-linux: travis-ci: enable root checks travis-ci: minor cleanup and speedup tests: introduce TS_CMD_UUIDGEN (never use installed one) tests, don't write TS_DEVICE to stdout anymore tests: ts_scsi_debug_init must not run in a subshell tests: cleanup ts_scsi_debug_init tests: some more tests need loop support tests: ts_device_init requires loop support tests: use ts_check_losetup in losetup test tests: add function ts_check_losetup tests: ts_device_init remove useless error handling
| * tests: introduce TS_CMD_UUIDGEN (never use installed one)Ruediger Meier2014-05-135-4/+10
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests, don't write TS_DEVICE to stdout anymoreRuediger Meier2014-05-131-1/+0Star
| |
| * tests: ts_scsi_debug_init must not run in a subshellRuediger Meier2014-05-1317-130/+146
| | | | | | | | | | | | | | | | | | | | | | 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: cleanup ts_scsi_debug_initRuediger Meier2014-05-131-6/+7
| | | | | | | | | | | | | | | | Sort out global and local vars. Now we set TS_DEVICE globally to be use later. Skip really quiet if modprobe fails. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: some more tests need loop supportRuediger Meier2014-05-132-0/+2
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: ts_device_init requires loop supportRuediger Meier2014-05-1328-1/+28
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: use ts_check_losetup in losetup testRuediger Meier2014-05-131-0/+9
| | | | | | | | | | | | | | In losetup test we have to handle the special case that ts_check_losetup requires a working losetup binary. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: add function ts_check_losetupRuediger Meier2014-05-131-0/+12
| | | | | | | | | | | | Unfortunately losetup -f does not return an error nowadays. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: ts_device_init remove useless error handlingRuediger Meier2014-05-121-7/+4Star
| | | | | | | | | | | | | | Don't know why we should deinit the empty string. This patch prepares further refactoring or error handling. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: add .BE hexdump test results (from s390)Karel Zak2014-05-1423-0/+707
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests, script/race is known to failRuediger Meier2014-05-131-0/+4
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: script/race would work with variable loop countRuediger Meier2014-05-132-2/+10
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: ipcs/limits2 is known to failRuediger Meier2014-05-131-0/+5
| | | | | | | | | | | | | | See github issue #51, comment 2 https://github.com/karelzak/util-linux/issues/51 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: fix hexdump for big endianRuediger Meier2014-05-132-1/+32
| | | | | | | | | | | | | | | | For now endianess dependent subtests have undefined output on BE systems until sombody re-checks this and provides expected output files with .BE suffix. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests, add missing output for hexdumpRuediger Meier2014-05-132-0/+41
| | | | | | | | | | | | One file was missing and one was too much. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: fix hexdump, add ts_finalizeRuediger Meier2014-05-131-0/+2
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: fix "KNOWN FAILED" for subtestsRuediger Meier2014-05-131-15/+12Star
|/ | | | | | | | | It didn't worked for tests with subtests. Here we consolidate both cases which fixes the issue by the way. This is basically a rewrite of 7641ccec. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* cytune: remove from util-linuxSami Kerola2014-05-1219-19/+0Star
| | | | | | | | | | | Assumption is there are not many who need this tool. Whom ever they might be the recommendation is to use the command from old util-linux release. Second reason to removal is difficulty to test hardware specific command when none of the active project members does not seem to have such. Basically the command has reached dead end what comes to maintainability of it. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: check /proc availability, and go-around if it is incompleteSami Kerola2014-05-121-13/+17
| | | | | | | | | | | | | | | | | | Unavailability of /proc is fatal for kill, and continuing with the test in that case does not make sense as it will only mean false positive errors. Where /proc/<pid>/status file(s) does not exist the check will perform opportunistic sleep with assumption the test_sigreceive will be ready to be killed if it has some time to init. [kzak@redhat.com: - remove dependence on gawk, just use shell - fix typo in "test /proc"] CC: Ruediger Meier <sweet_f_a@gmx.de> Reference: https://travis-ci.org/rudimeier/util-linux/jobs/24561058 Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'tests-features' of https://github.com/rudimeier/util-linuxKarel Zak2014-05-122-8/+44
|\ | | | | | | | | | | | | | | | | | | * 'tests-features' of https://github.com/rudimeier/util-linux: tests: style Makefile and make output tests: allow to add or override test suite options tests: add exit case "KNOWN FAILED" tests: fix var names tests: allow test options to be overridden by env tests: call ts_init_env as early as possible
| * tests: style Makefile and make outputRuediger Meier2014-05-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | We break long lines and make output sill looks nice with and without V=1. As a side effect we can now run make TS_COMMAND="true" to do nothing but building all check_PROGRAMS. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: allow to add or override test suite optionsRuediger Meier2014-05-121-1/+2
| | | | | | | | | | | | | | | | | | Now we can do something like this make check TS_OPTS="--fake --parallel=32" Note we still always set --parallel but the last one wins. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: add exit case "KNOWN FAILED"Ruediger Meier2014-05-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | Now we can mark tests as known to be broken without bothering users with exit failure. In the build log this "KNOWN FAILED" may be interpreted as TODO ;) The main advantage of "known-fail" instead of just skipping is that we will still find the test diff. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: fix var namesRuediger Meier2014-05-101-2/+5
| | | | | | | | | | | | | | Translate "." and "-" to "_". We assume that nobody will add completely stupid test file names. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: allow test options to be overridden by envRuediger Meier2014-05-101-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specially for automated builds the user may want to have some fine granulated influence like export TS_OPT_libmount_verbose="yes" export TS_OPT_ipcs_fake="yes" export TS_OPT_ipcs_limits2_fake="no" if <big endian> then export TS_OPT_hexdump_fake="yes" fi make check Even for interactive developers this could be useful for example to debug just one particuar test while having a regular run with stress: TS_OPT_script_verbose="yes" \ TS_OPT_script_memcheck="yes" \ ../tests/run.sh --parallel=256 --srcdir=.. --builddir=. --nonroot Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: call ts_init_env as early as possibleRuediger Meier2014-05-101-7/+8
| | | | | | | | | | | | | | Soon we want to use some env vars within ts_has_option(). That's why we move some lines to make this possible. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | last: avoid leading "-" before "no logout"Ruediger Meier2014-05-101-1/+1
| | | | | | | | | | | | This affects option --time-format=notime. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: add test case for last -time-format=fullRuediger Meier2014-05-082-2/+22
|/ | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* column: inform user when multibyte conversion error occursSami Kerola2014-05-072-0/+31
| | | | | | | | | The column(1) read input until conversion error, and used incomplete input when outputing, that made at least me to wonder where the rest disappeared without explanation. IMHO it is better to fail immediately rather than do only half of the task. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: fix kill problemsRuediger Meier2014-05-064-12/+14
| | | | | | | | | | | | | There were several failures (missing tmp files, missing pids) on travis build farm which I couldn't track down completely. Here we fix some possible issues: - mktemp -u is unsafe, maybe even in practice if there is a bad random generator - make sure that mktemp does not give us pure integer filnames which would not work for "kill by-name" - avoid using trap, could be that it removed tmp files on wrong signals Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: kill_functions.sh needs gawk (skip if sourced)Ruediger Meier2014-05-061-1/+4
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add kill_functions.sh to avoid duplicate codeKarel Zak2014-04-285-65/+43Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: check kill all user processesSami Kerola2014-04-263-1/+72
| | | | | CC: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: check kill print pid optionSami Kerola2014-04-262-0/+70
| | | | | CC: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: check various ways to specify kill signalSami Kerola2014-04-262-0/+78
| | | | | CC: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: check kill is converting signals names correctlySami Kerola2014-04-263-0/+76
| | | | | CC: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add signal receiver programSami Kerola2014-04-263-0/+180
| | | | | | | Target to kill with a check that will be written later. CC: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: update Py parse mountinfo testKarel Zak2014-04-231-0/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: rely on ts_init_py onlyKarel Zak2014-04-231-2/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update fdisk sun testKarel Zak2014-04-231-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add fdisk 'f' command MBR testKarel Zak2014-04-232-0/+156
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>