summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* partx: document -d vs. --nr and fix testHEADmasterKarel Zak2019-08-211-2/+7
| | | | | | | | | | The commit ab025087f91b66ee8e23a16bc49eb0d9bd421d65 has disabled error message, but unfortunately it keeps wrong return code. This has been fixed by commit 53ae7d60cfeacd4e87bfe6fcc015b58b78ef4555. This commit add hit about it to docs and fix regression test too. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: Skip fdisk/mbr-nondos-mode on Sparc as unsupportedKarel Zak2019-08-192-194/+2Star
| | | | | | | | | The test has been originally designed as usable on sparc, but now we use it for many features which are MBR specific. Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Co-Author: Anatoly Pugachev <matorola@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update fdisk outputKarel Zak2019-08-081-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: use subtests for mountpoint(1)Karel Zak2019-08-075-13/+12Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mountpoint: add --nofollow optionSami Kerola2019-08-022-0/+36
| | | | | | | | | | 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>
* column: fix outputing empty column at the end of lineYousong Zhou2019-07-293-0/+10
| | | | | | | | | | | | | The following commands manifests the problem. In old versions before commit 4762ae9d60 ("column: use libsmartcols for --table"), both of them should output with 2 "|" echo '||' | column -o '|' -s '|' -t echo '|| ' | column -o '|' -s '|' -t Fixes: 4762ae9d60 ("column: use libsmartcols for --table") Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com> Reviewed-by: Sami Kerola <kerolasa@iki.fi>
* tests: (fdisk) update padding in outputKarel Zak2019-07-231-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: (libsmartcols) add padding testsKarel Zak2019-07-235-0/+89
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: cleanup and extend padding functionalityKarel Zak2019-07-232-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LIBSMARTCOLS_DEBUG_PADDING=on in the next examples forces libsmartcols print '.' as a padding char. See line "ffff" in the exmaples. * default output is to fill all except last cell $ LIBSMARTCOLS_DEBUG_PADDING=on ./sample-scols-fromfile --nlines 10 --width 80 --column tests/ts/libsmartcols/files/col-name --column tests/ts/libsmartcols/files/col-number --column tests/ts/libsmartcols/files/col-string --column tests/ts/libsmartcols/files/col-string tests/ts/libsmartcols/files/data-string tests/ts/libsmartcols/files/data-number tests/ts/libsmartcols/files/data-string-empty tests/ts/libsmartcols/files/data-string-empty 2> /dev/null NAME.. ......NUM STRINGS STRINGS aaaa.. ........0 aaaa... aaaa bbb... ......100 bbb.... bbb ccccc. .......21 ccccc.. ccccc dddddd ........3 dddddd. dddddd ee.... ......411 ee..... ee ffff.. .....5111 ....... gggggg 678993321 gggggg. gggggg hhh... ..7666666 hhh.... hhh * scols_table_enable_minout() minimizes output for tailing empty cells, example: $ LIBSMARTCOLS_DEBUG_PADDING=on ./sample-scols-fromfile --nlines 10 --minout --width 80 --column tests/ts/libsmartcols/files/col-name --column tests/ts/libsmartcols/files/col-number --column tests/ts/libsmartcols/files/col-string --column tests/ts/libsmartcols/files/col-string tests/ts/libsmartcols/files/data-string tests/ts/libsmartcols/files/data-number tests/ts/libsmartcols/files/data-string-empty tests/ts/libsmartcols/files/data-string-empty 2> /dev/null NAME.. ......NUM STRINGS STRINGS aaaa.. ........0 aaaa... aaaa bbb... ......100 bbb.... bbb ccccc. .......21 ccccc.. ccccc dddddd ........3 dddddd. dddddd ee.... ......411 ee..... ee ffff.. .....5111 gggggg 678993321 gggggg. gggggg hhh... ..7666666 hhh.... hhh * cleanup up scols_table_enable_maxout() use, example: $ LIBSMARTCOLS_DEBUG_PADDING=on ./sample-scols-fromfile --nlines 10 --maxout --width 80 --column tests/ts/libsmartcols/files/col-name --column tests/ts/libsmartcols/files/col-number --column tests/ts/libsmartcols/files/col-string --column tests/ts/libsmartcols/files/col-string tests/ts/libsmartcols/files/data-string tests/ts/libsmartcols/files/data-number tests/ts/libsmartcols/files/data-string-empty tests/ts/libsmartcols/files/data-string-empty 2> /dev/null NAME.............. ..................NUM STRINGS............ STRINGS............ aaaa.............. ....................0 aaaa............... aaaa............... bbb............... ..................100 bbb................ bbb................ ccccc............. ...................21 ccccc.............. ccccc.............. dddddd............ ....................3 dddddd............. dddddd............. ee................ ..................411 ee................. ee................. ffff.............. .................5111 ................... ................... gggggg............ ............678993321 gggggg............. gggggg............. hhh............... ..............7666666 hhh................ hhh................ Note that we cannot make scols_table_enable_minout() default because for example "column --table" is pretty commonly used with non-blank columns separator and in this case all cells has to be filled. $ echo -e "aa,b,ccc\na,,\naaa,bbb,ccc" | column --table --separator ',' --output-separator '|' aa |b |ccc a | | aaa|bbb|ccc Addresses: https://github.com/karelzak/util-linux/issues/826 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: (libmount) make X-* and x-* more robustKarel Zak2019-07-153-3/+4
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/818 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update build-sys outputKarel Zak2019-06-141-29/+29
| | | | | | It seems, no more libgcc_s... Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add asan build-sys testKarel Zak2019-05-291-0/+120
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: fix floating point exceptionSami Kerola2019-05-182-0/+76
| | | | | | | | | | | | | As the title tells this change indeed fixes floating point exception, but post processing as value overwrite feels a wrong. Possibly something in input is making cpu set count to go wrong, but I could not get my head around what could it be. Anyway avoiding division by zero seems better than crashing so lets do this atleast for now. Caused-by: e5f721132ec8b8c933a396d8dcb3efcb67854f13 Addresses: https://github.com/karelzak/util-linux/issues/788 Reported-by: Lars Wendler <polynomial-c@gentoo.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lscpu: remove extra space from field key nameSami Kerola2019-05-161-37/+37
| | | | | | | | | | | | | | | | | | | The extra space was more obvious in json output. But as the expected test output displays also the standard output can be effected by this change. $ lscpu --json | jq '.lscpu | .[].field' | grep ': ' "L1d cache: " "L1i cache: " "L2 cache: " "L3 cache: " "Vulnerability L1tf: " "Vulnerability Mds: " "Vulnerability Meltdown: " "Vulnerability Spec store bypass: " "Vulnerability Spectre v1: " "Vulnerability Spectre v2: " Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lscpu: move trailing null after removing characters from a stringSami Kerola2019-05-161-1/+1
| | | | | | | | | From the test input string ':' characters are removed: cat x86_64-epyc_7451/sys/devices/system/cpu/vulnerabilities/spectre_v2 Mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: build-sys updateKarel Zak2019-04-2918-395/+413
| | | | | | | | | | | | | * libblkid does not depend on libuuid anymore * libncurses depends on libdl due to $ ncursesw6-config --libs -lncursesw -ltinfo -ldl * new command hardlink (with dependence on libpcre2-8 * hwclock needs librt Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: auto-enable ASAN option if necessaryKarel Zak2019-04-241-1/+15
| | | | | | | | Let's detect ASAN LDFLAGS in top level Makefile to make sure we call tests with --memcheck-asan if build-system has been configured with --enable-asan. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix TS_ENABLE_ASAN usageKarel Zak2019-04-172-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: use TS_ENABLE_ASAN in tests to detect ASANKarel Zak2019-04-172-2/+2
| | | | | | It seems better to not use any random ASAN variable. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: ignore errors with enabled ASAN in python bindingsKarel Zak2019-04-155-3/+11
| | | | | | | temporary solution... as it ends with undefined symbol: __asan_option_detect_stack_use_after_return Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update lscpu due to 'Vulnerability' fieldsKarel Zak2019-04-111-32/+37
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add /mnt/test/foo^Mbar to mountinfo testsKarel Zak2019-04-087-0/+29
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/780 Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: add --cachesKarel Zak2019-03-191-2/+2
| | | | | | | | | | | | | | | $ lscpu -C NAME ONE-SIZE ALL-SIZE WAYS TYPE LEVEL L3 8M 8M 16 Unified 3 L2 256K 1M 8 Unified 2 L1i 32K 128K 8 Instruction 1 L1d 32K 128K 8 Data 1 The patch also updates extra caches (s390) output in lsblk summary to be compatible with output about normal caches. Addresses: https://github.com/karelzak/util-linux/issues/663 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update lscpu outputKarel Zak2019-03-198-25/+23Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: add 'Frequency boost'Karel Zak2019-03-151-0/+1
| | | | | | | | Show turbo boost status on platforms where is available a file /sys/devices/system/cpu/cpufreq/boost. Addresses: https://github.com/karelzak/util-linux/issues/755 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add missing ts_check_test_command callKarel Zak2019-03-051-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add --noskip-commandsKarel Zak2019-03-052-1/+10
| | | | | | | The default is SKIP missing commands on --use-system-commands, but with --noskip-commands the test will FAIL. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add missing TS_CMD_UMOUNT checkKarel Zak2019-03-041-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: (kill) do not use shell build-inKarel Zak2019-03-045-0/+25
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add --use-system-commandsKarel Zak2019-03-043-116/+147
| | | | | | | | | | | | | This change allows to use commands from $PATH rather than from $top_builddir. There two basic use cases: * check differences between installed and git version run.sh --use-system-command --show-diff * check system binaries by upstream tests (for example tests from src.rpm package) Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add missing ts_check_test_command callsKarel Zak2019-03-049-0/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'evelu-epyc' of https://github.com/ErwanAliasr1/util-linuxKarel Zak2019-03-042-0/+233
|\ | | | | | | | | * 'evelu-epyc' of https://github.com/ErwanAliasr1/util-linux: test: Adding AMD EPYC 7451 24-Core Processor
| * test: Adding AMD EPYC 7451 24-Core ProcessorErwan Velu2019-02-272-0/+233
| | | | | | | | | | | | | | This cpu is massively numa and have interesting cache organization. This will be useful to test & implement issue #663 Signed-off-by: Erwan Velu <e.velu@criteo.com>
* | tests: make sure TS_HELPER_MBSENCODE compiledKarel Zak2019-03-011-0/+2
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: use subtests in fdisk/mbr-nondos-modeKarel Zak2019-02-2715-268/+289
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add fdisk (dos) first sector dialog testKarel Zak2019-02-272-0/+65
|/ | | | | | | The test verifies that the "First sector" dialog offers relevant range in the begin of the device if the end of the device is already used. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_table_{find,insert,move}_fs()Karel Zak2019-02-212-0/+6
| | | | | | | | Add functions to insert FS into table to specified position and to move FS between two tables. Co-Author: Tim Hildering <hilderingt@posteo.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update fdisk outputsKarel Zak2019-02-122-6/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: (hardlink) update noregexKarel Zak2019-02-111-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: (hardlink) update summary outputKarel Zak2019-02-112-16/+12Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'hardlink' of https://github.com/rudimeier/util-linux into hardlinkKarel Zak2019-02-069-0/+226
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'hardlink' of https://github.com/rudimeier/util-linux: (25 commits) hardlink: add first simple tests hardlink: util-linux usage hardlink: fix compiler warnings hardlink: style indentations and license header hardlink: enable build with and without pcre2 fixes for the fixes temporal fix before re-patch (updates from Fedora repo) Update hardlink.1 Fixed version number, added changelog about Todd Lewis' patch exclude files via pcre Fixed 32 bit build with gcc7 (RH Bugzilla ID 1422989) spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); update FSF address at .c source file Revert "spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file" spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file Mention -f option in the man page do not allow to hardlink files across filesystems by default (#786719) (use -f option to override) fix possible buffer overflows, integer overflows, update man page fix URL and remove mmap() (#676962, #672917) - update docs to describe highest verbosity -vv option (#210816) - use dist Resolves: 210816 mostly spec cleanup ...
| * hardlink: add first simple testsRuediger Meier2018-11-159-0/+226
| | | | | | | | | | | | | | The test still fails without pcre2 and may also make problems on exotic file systems. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | col: improve error message, update regression testKarel Zak2019-02-051-1/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | Removed BlueStore VERSION information as it is gibberishKenneth Van Alstyne2018-12-181-1/+0Star
| |
* | Updated BlueStore expected resultKenneth Van Alstyne2018-12-171-0/+1
| |
* | Added BlueStore test imageKenneth Van Alstyne2018-12-172-0/+2
| |
* | tests: check for tar and {b,g}zipKarel Zak2018-12-112-0/+4
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: make lsns-netnsid portableKarel Zak2018-11-301-1/+25
| | | | | | | | | | | | | | | | | | It seems ip(8) link-show command does not provide link-netnsid in all cases (versions ?). Let's try to use "ip netns list-id" as fallback. This commit also add possibility to debug the script by $LOG variable. Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: enlarge backing file for fstab-btrfsKarel Zak2018-11-301-1/+1
| | | | | | | | | | | | It seems the new limit for Btrfs is 47MiB. Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add test images for drbd v08/v09Roland Kammerer2018-11-294-0/+10
| | | | | | | | | | | | | | This adds DRBD meta data images for DRBD versions 8 and 9, as well as the according expected output. Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>