summaryrefslogtreecommitdiffstats
path: root/tests/ts/script
Commit message (Collapse)AuthorAgeFilesLines
* tests: remove debug stuff from ts/script/optionsKarel Zak2018-05-141-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* script: add the -o/--output-limit option. Fix race test.Fred Mora2018-05-142-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | When script is used on a host with a relatively small free disk space, it is sometimes desirable to limit the size of the captured output. This can now be enforced with the --output-limit option. The --output-limit option lets the user specify a maximum size. The program uses the size parsing from strutils and thus supports the usual multiplicative suffixes (kiB, KB, MiB, MB, etc.). After the specified number of bytes have been written to the output file, the script program will terminate the child process. Due to buffering, the size of the output file might exceed the specified limit. This limit also does not include the start and done messages. The race test was throwing an error dur to a variable being "" in some cases. Quoting the variable in the equal test took care of that test. [kzak@redhat.com: - use done() to stop script - count also timing file - remove unnamed member initialization in ctl struct - add to bash-completion] Signed-off-by: Fred Mora <fmora@datto.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: mark script race test as "known fail"Karel Zak2016-03-091-0/+4
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/296 Signed-off-by: Karel Zak <kzak@redhat.com>
* Revert "tests: start script/race test only when --force specified"Ruediger Meier2015-07-281-3/+0Star
| | | | | | | | | This reverts commit 8ba3f35e07f736a0165669ac787b016b4311eb29. This test is not too slow anymore and BTW since last script refactoring it does work now even on slow/heavy-loaded systems. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add scriptreplay testSami Kerola2015-06-081-0/+38
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* script: remove io vs signal raceSami Kerola2015-06-081-4/+0Star
| | | | | | | | | | | | Make do_io() to run poll() until all streams are empty. This should remove the signal from child versus io handling race for good. Addresses: https://github.com/karelzak/util-linux/pull/62 Addresses: https://bugs.launchpad.net/bugs/264967 Addresses: https://bugs.debian.org/305808 CC: Wolfgang Richter <wolf@cs.cmu.edu> CC: Ruediger Meier <ruediger.meier@ga-group.nl> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: check script options work as expectedSami Kerola2015-06-061-0/+60
| | | | | | | Options --flush and --timing remain unchecked, as I do not have an idea how to check them reliably. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add script output buffering race checkSami Kerola2015-06-061-0/+26
| | | | | | | | Regression check to a fix by Stanislav Brabec. Reference: 0b285b84b2f14339fd86857244654ba25fac7d73 CC: Stanislav Brabec <sbrabec@suse.cz> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: never use -o pipefailRuediger Meier2015-04-211-2/+0Star
| | | | | | | | | | | | | | | | | | | It was hard to find out that pipefail was the reason why our test-suite could have random failures for aribtrary tests, for example the ones which are using ts_device_has_uuid() or ts_mount(). Bash's pipefall option is evil! It may return error for such a simple line like this one $ echo -e "xxx\nyyy" | grep -q "xxx" because the left echo command will get SIGPIPE when grep exits after the first match. So the command line above could return an error eventhough it does exactly what we want. This patch removes any pipefail from our tests. The funny thing is that I couldn't find any case where we relied on this feature anyway. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: start script/race test only when --force specifiedKarel Zak2015-03-191-0/+3
| | | | | | | The test generates 1000 processes and it seems too invasive for test/build machines and containers. 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-131-1/+9
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: check commands needed for running a test existSami Kerola2014-03-071-0/+2
| | | | | 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>
* rename util-linux-ng back to util-linuxKarel Zak2010-11-301-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: cleanup ts/scriptKarel Zak2009-02-111-4/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add support for subdirs to basic test functionsKarel Zak2009-02-111-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: create subdirs for test scriptsKarel Zak2009-02-111-0/+37
Signed-off-by: Karel Zak <kzak@redhat.com>