summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: fix minix testKarel Zak2015-08-037-11/+15
| | | | | | | | | - run the test with UID=0 only. The minix FS inode contains UID and GID, so the final image checksum depends on user... - always use subtest name for the images Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add fsck.minix checksSami Kerola2015-08-0312-0/+160
| | | | | | | The debian bug was fixed in commit 730ae9c89971, and the rest are about having test coverity for various file name lenghts and minix fs versions. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add way to control mkfs.minix time stampsSami Kerola2015-08-031-0/+1
| | | | | | | Needed in order to create reproducable file systems image files, so that out come of mkfs.minix can be checksum'ed. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tasts: add logger octet counting testKarel Zak2015-07-292-0/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'test-fixes' of https://github.com/rudimeier/util-linuxKarel Zak2015-07-281-3/+0Star
|\
| * 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: update build-sys testsKarel Zak2015-07-2418-349/+364
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add udevadm settleKarel Zak2015-07-241-0/+2
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add fullpath tests to rename/subdirAndreas Henriksson2015-06-252-0/+33
| | | | Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* Merge branch 'script'Karel Zak2015-06-2512-4/+180
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: (25 commits) script: add note to BUGS man page section script: fix EOF problems script: improve poll debugging script: cleanup signals usage script: debug poll() results script: add support for SCRIPT_DEBUG= script: remove magic constants from poll code script: rename control struct members script: close timingfp also when -e tests: add scriptreplay test script: move timing file opening close to use of it script: add noreturn function attributes script: use gettime_monotonic() to get timing file timestamps script: use correct input type, move comment, and so on script: replace strftime() workaround with CFLAGS = -Wno-format-y2k script: move do_io() content to small functions script: add 'Script started' line always to capture file script: remove io vs signal race script: merge doinput() and output() functions to do_io() script: use poll() rather than select() ...
| * Merge branch 'script3' of git://github.com/kerolasa/lelux-utiliteetit into ↵Karel Zak2015-06-1612-4/+180
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | script * 'script3' of git://github.com/kerolasa/lelux-utiliteetit: tests: add scriptreplay test script: move timing file opening close to use of it script: add noreturn function attributes script: use gettime_monotonic() to get timing file timestamps script: use correct input type, move comment, and so on script: replace strftime() workaround with CFLAGS = -Wno-format-y2k script: move do_io() content to small functions script: add 'Script started' line always to capture file script: remove io vs signal race script: merge doinput() and output() functions to do_io() script: use poll() rather than select() script: use signalfd() to catch signals script: add struct script_control and remove global variables script: remove function prototypes tests: check script options work as expected tests: add script output buffering race check
| | * tests: add scriptreplay testSami Kerola2015-06-083-0/+48
| | | | | | | | | | | | 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-067-0/+103
| | | | | | | | | | | | | | | | | | | | | 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-062-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | 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: always kill helperRuediger Meier2015-06-161-7/+7
|/ / | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: add JSON sfdisk dumpsKarel Zak2015-06-154-0/+45
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: update fdisk BSDKarel Zak2015-06-111-2/+0Star
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: fix January 1753 week number printoutSami Kerola2015-05-182-0/+62
| | | | | | | | | | | | | | | Earlier output was clearly broken. $ cal -w 1 1753 January 1753 Su Mo Tu We Th Fr Sa 51 1 2 3 4 5 6 52 7 8 9 10 11 12 13 52 14 15 16 17 18 19 20 52 21 22 23 24 25 26 27 52 28 29 30 31 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Merge branch 'test-fixes' of https://github.com/rudimeier/util-linuxKarel Zak2015-05-132-0/+6
|\ | | | | | | | | | | * 'test-fixes' of https://github.com/rudimeier/util-linux: tests: fix kill/all_processes tests: add $top_builddir to $PATH
| * tests: fix kill/all_processesRuediger Meier2015-05-081-0/+3
| | | | | | | | | | | | We have to wait for the killed helper. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: add $top_builddir to $PATHRuediger Meier2015-05-081-0/+3
| | | | | | | | | | | | | | | | | | | | Since we have dropped some more hardcoded search paths we should make sure that our tested binaries would use the right helpers from our build directory. See 07b51567 and follow-up commits. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: update lscpu tests (due to CPU flags in output)Karel Zak2015-05-137-0/+7
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add hexdump from GPTKarel Zak2015-05-112-0/+1111
|/ | | | | | | | * use hardcoded UUIDs for partitions in sfdisk GPT test * output hexdump of the GPT header (it would be possible to use MD5 sum, but from hexdump it's more obvious where is problem) Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) add API for raw partition attributesMichael Marineau2015-05-055-0/+78
| | | | | | | | | | | | | | | | | The existing APIs can only toggle individual bits or get and set bits in a complex text representation, making it impractical to use libfdisk for manipulating the GPT partition attribute field in more complex ways such as updating a value that is multiple bits wide. For example priority based partition selection originally designed for ChromeOS includes two integer values that are 4-bits wide. http://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Trusting-the-GPT [kzak@redhat.com: - add new symbols to .sym file and docs - remove unused variables from test program] Signed-off-by: Michael Marineau <michael.marineau@coreos.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: add commentKarel Zak2015-04-241-0/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: add pid, tid and idx back to objectKarel Zak2015-04-241-5/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: make objdump more robustKarel Zak2015-04-241-4/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: fix includeKarel Zak2015-04-241-2/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: don't exit on failed pthread_create()Karel Zak2015-04-241-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: don't exit on failed pthread_create()Karel Zak2015-04-241-8/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: improve readabilityKarel Zak2015-04-241-64/+82
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: cleanup counters namesKarel Zak2015-04-241-35/+35
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: cleanup pid usageKarel Zak2015-04-241-25/+23Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: cleanup used typesKarel Zak2015-04-241-74/+71Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: err messages, argv[] parsing and another cleanupsKarel Zak2015-04-242-198/+132Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add uuidd test programHuschaam Hussain2015-04-242-0/+362
| | | | | References: https://bugzilla.redhat.com/show_bug.cgi?id=678306 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix sfdisk GPT testKarel Zak2015-04-233-4/+4
| | | | | | | The test uses too large last partition, libfdisk checks this problem now. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk resize tests for GPTKarel Zak2015-04-2315-1/+359
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk resize regression tests for MBRKarel Zak2015-04-2216-0/+482
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'tests-refactor-loop-cleanup' of ↵Karel Zak2015-04-2256-315/+211Star
|\ | | | | | | | | | | | | | | | | | | | | 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: never use -o pipefailRuediger Meier2015-04-2148-85/+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: loop tests, don't call ts_die() with DEVICE parameterRuediger Meier2015-04-1425-114/+114
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: scsi_debug tests, don't call ts_die() with DEVICE parameterRuediger Meier2015-04-144-6/+6
| | | | | | | | | | | | This was almost useless anyway. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: introduce TS_LOOP_DEVS for cleanupRuediger Meier2015-04-1431-105/+80Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * tests: introduce ts_cleanup_on_exit()Ruediger Meier2015-04-141-5/+11
| | | | | | | | | | | | | | | | | | | | ts_cleanup_on_exit() is always called on exit, e.g. after ts_skip, ts_die, ts_finalize ... A first usage example is the cleanup of TS_SUID_PROGS which is now also done on ts_skip. Later we want to fix some left loop devices. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: config.h lives in build directoryRuediger Meier2015-04-222-2/+2
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: add old dump for sfdiskKarel Zak2015-04-166-2/+83
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: fix logger device pathname too longRuediger Meier2015-04-143-3/+9
| | | | | | | | | | | | | | $TS_OUTDIR may be too long for sockaddr_un.sun_path. Noticed on travis in distcheck. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | Merge branch 'tests-logger' of https://github.com/rudimeier/util-linuxKarel Zak2015-04-149-33/+135
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'tests-logger' of https://github.com/rudimeier/util-linux: travis: install socat >= 1.7.2 tests: add subtests for invalid logger devive tests: logger/errors does not use --no-act tests: logger, validate written socket data tests: logger with socat device tests: simplify common logger options logger: --stderr and --no-act turn "auto-errors" on