summaryrefslogtreecommitdiffstats
path: root/tests/expected/misc
Commit message (Collapse)AuthorAgeFilesLines
* tests: use subtests for mountpoint(1)Karel Zak2019-08-074-9/+6Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mountpoint: add --nofollow optionSami Kerola2019-08-021-0/+9
| | | | | | | | | | 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: update setarch testKarel Zak2018-02-011-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: mbsencode - removed emoji, added control unicode characterVaclav Dolezal2018-01-114-4/+4
| | | | | | | 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-104-0/+40
| | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* tests: add more tests for line(1)Ruediger Meier2017-06-141-0/+18
| | | | 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-1/+1
| | | | | | | | 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: use stdbuf when stderr and stdout is randomly orderedRuediger Meier2017-06-011-1/+1
| | | | | | glibc seems to flush stdout before stderr. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add flock testsKarel Zak2016-10-317-0/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: move getopt to separate directoryKarel Zak2016-04-2230-98/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: don't depend on GNU md5sumRuediger Meier2016-04-131-2/+2
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: improve setarch tests, regarding --uname-2.6 issuesRuediger Meier2016-03-243-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* setarch: add "exec" message to --verboseRuediger Meier2016-03-221-0/+1
| | | | | | Also we don't need fflush() in non-verbose case. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: don't skip case "output undefined"Ruediger Meier2016-03-072-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-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update swapfile outputKarel Zak2016-01-261-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add some line testsRuediger Meier2015-12-031-0/+6
| | | | | | regarding e03f29b6 ... Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: fix swaplabel test for 9a83b03cRuediger Meier2015-01-261-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Revert "tests: simplify and update swaplabel test"Ruediger Meier2015-01-261-2/+2
| | | | | | | | | | 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-087-0/+20
| | | | | | | | 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-0824-0/+88
| | | | | | | | | | 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-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setarch: flush output streams before execRuediger Meier2014-05-221-0/+11
| | | | | | | | | | | | | | | | | | | This fixes the following (non-deterministic) discrepancy: $ setarch x86_64 -RFZLvXBIST3 --uname-2.6 echo success Switching on READ_IMPLIES_EXEC. Switching on ADDR_LIMIT_32BIT. Switching on SHORT_INODE. Switching on WHOLE_SECONDS. Switching on STICKY_TIMEOUTS. Switching on ADDR_LIMIT_3GB. Switching on UNAME26. success $ setarch x86_64 -RFZLvXBIST3 --uname-2.6 echo success &> /tmp/bla; cat /tmp/bla success Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: swaplabel needs to respect pagesizeRuediger Meier2014-03-151-2/+2
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: check swaplabel, and perform more swapon boundary testsSami Kerola2014-03-121-0/+6
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: update ionice testKarel Zak2014-02-171-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rev: stop adding new line at the end when input does not have itSami Kerola2013-06-071-1/+3
| | | | | | | | | | 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: use checksum to detect rev(1) consistencyKarel Zak2013-03-051-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add whereis(1) checkSami Kerola2013-01-251-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add fallocate(1) checkSami Kerola2013-01-251-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add setarch(8) checkSami Kerola2013-01-251-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add setsid(1) checkSami Kerola2013-01-251-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add line(1) checkSami Kerola2013-01-251-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add ionice(1) checkSami Kerola2013-01-241-0/+9
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add ul(1) checkSami Kerola2013-01-241-0/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add mcookie(1) checkSami Kerola2013-01-241-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add getopt(1) checkSami Kerola2013-01-241-0/+9
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add rev(1) checkSami Kerola2013-01-241-0/+1
| | | | | | | Fairly lenghty input line tries to ensure realloc segment in code is hit at least once. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* This adds a second parameter to size_to_human_string() to return aFrancesco Cosoleto2011-05-261-26/+26
| | | | | | | | | | | | | | | string with a different format based on the following flags: SIZE_SUFFIX_1LETTER = "1K" SIZE_SUFFIX_3LETTER = "1KiB", SIZE_SUFFIX_SPACE = "1 KiB" or "1 K" [kzak@redhat.com: - rename flags to SIZE_SUFFIX_* format, - fix suffix[] buffer size - add 3 letter version to the test] Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: [strutils] avoid integer overflow on large valuesDave Reisner2011-02-151-26/+26
| | | | | | | | | | | | | | This is visible on a 2TB disk via lsblk, where a large partition incorrectly displays as 1.171798692T instead of 1.8T. This is corrected by using a uint64_t type instead of a simple int -- consistant with the type used in lsblk.c to represent the raw size in bytes. [kzak@redhat.com: - add EiB support - add size_to_human_string() to regression tests] Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix strtosize() testKarel Zak2011-01-031-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: added tests against strtosizeYann Droneaud2010-03-311-0/+7
| | | | | | | - test empty string, white spaces - test hexadecimal Signed-off-by: Yann Droneaud <yann@droneaud.fr>
* lib: add strtosize() functionKarel Zak2010-03-301-0/+23
This function int strtosize(const char *str, uintmax_t *res) supports {K,M,G,T,E,P}iB and {K,M,G,T,E,P}B suffixes. Signed-off-by: Karel Zak <kzak@redhat.com>