summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: utmpdump add subsecond accuracy testSami Kerola2016-06-273-0/+42
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: challenge utmpdump localization go-aroundSami Kerola2016-06-275-5/+5
| | | | | | | | The utmpdump timestamps are unambiguous, they always use UTC-0 regardless of localization. If thesse tests starts to fail after this change then the timezone forcing is not working. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: fix utmpdump timestamps to be in iso formatSami Kerola2016-06-269-44/+81
| | | | | | | | The utmpdump-circle is slightly modified to use old timestamp format as basis of conversion and to do cyclic conversion via new format. This is better from test coverage point of view. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lscpu: update s390-lpar-drawer testcaseHeiko Carstens2016-06-242-2/+1Star
| | | | | | | | | | | | | | | | I noticed that the "cpu" line within /proc/cpuinfo has a different meaning on powerpc and sparc than on s390. On s390 it represents the cpu number while on powerpc and sparc it represent the model name. Given that the s390 kernel patch which adds the "cpu" line to /proc/cpuinfo hasn't been merged into the kernel yet, I changed that line to "cpu number" to avoid the unnecessary conflict. Therefore this patch updates the testcase, which mainly changes the contents of /proc/cpuinfo. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lscpu: show additional caches (s390)Heiko Carstens2016-06-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | The Linux kernel exposes the cache topology via sysfs. However on virtualized machines like s390 the cache topology contains only cpu private caches. For shared caches it is not known which cpus share them. The hypervisor would have to update this information whenever a virtual cpu would be scheduled on a different physical cpu and make the guest aware of that change. Given that there is hardly any benefit, if it all, this isn't done. However it is still of interest to know about the non-private caches. Therefore this information is available via /proc/cpuinfo at least on s390. This patch adds additional lines to the summary output for all shared caches for which information can be found in /proc/cpuinfo, since we know these aren't exposed via sysfs. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lscpu: show machine type (s390)Heiko Carstens2016-06-244-0/+4
| | | | | | | | Show also the machine type within the lscpu output. With the machine type it is possible to identify the cpu generation and the supported features. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lscpu: show static and dynamic MHz (s390)Heiko Carstens2016-06-241-0/+2
| | | | | | | | | | | | | | | | s390 machines provide static and dynamic cpu mhz information via /proc/cpuinfo. The static cpu mhz is the normal cpu frequency a cpu is supposed to run with. The dynamic cpu mhz is the actual frequency a cpu is running with. This is usually the same as the static cpu mhz. Note that this values are different to the min/max mhz values available on other architecutes. The min/max values are unknown. This patch adds two new fields to the summary output which display these two values. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lscpu: fix typo in summary outputHeiko Carstens2016-06-241-1/+1
| | | | | | | The new drawer support did have a type in the summary output: it reported Drawers(s) instead of Drawer(s). Fix this. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lscpu: add s390 drawer testcaseHeiko Carstens2016-06-242-0/+35
| | | | | | | Add a new s390 testcase so we get some coverage for the new drawer cpu topology level. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* tests: fix for non-ncurses versionKarel Zak2016-06-094-0/+24
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: check for mount(8) in minix testKarel Zak2016-06-011-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: Fix typo RequiredPartiton -> RequiredPartitionSebastian Rasmussen2016-05-315-2/+1154
| | | | | | | | This typo fix is backwards compatible in that fdisk will accept both the GPT attribute RequiredPartition and RequiredPartiton with the typo. Update documentation and tests to all use the new attribute name. Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
* misc: Fix various typosSebastian Rasmussen2016-05-312-2/+2
| | | | | | | Fix various typos in error messages, warnings, debug strings, comments and names of static functions. Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
* tests: refresh cal(1) testKarel Zak2016-05-242-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: move getopt to separate directoryKarel Zak2016-04-2233-65/+40Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: make tests more portable due to mtabKarel Zak2016-04-158-41/+73
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: remove USE_LIBMOUNT_FORCE_MOUNTINFOKarel Zak2016-04-152-4/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: don't depend on GNU md5sumRuediger Meier2016-04-1311-10/+19
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: test_md5 prints md5sum onlyRuediger Meier2016-04-133-9/+9
| | | | | | | We want to to use it for other tests without depending on gnu md5sum and without cut or awk. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* colcrt: avoid the command getting hung [afl]Sami Kerola2016-04-134-1/+6
| | | | | | | Some inputs make getwc(3) not to progress file descriptor and neither to report EILSEQ. Detect such situation and skip the bad input. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: remove deprecated md5sum based fdisk/bsd testRuediger Meier2016-04-063-275/+3Star
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: fix fdisk/bsd for hppaRuediger Meier2016-04-061-1/+2
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add fdisk/bsd hexdump for alphaRuediger Meier2016-04-061-0/+217
| | | | | | | Taken from Debian build logs: https://buildd.debian.org/status/fetch.php?pkg=util-linux&arch=alpha&ver=2.28~rc2-1&stamp=1459443555 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add DM error target for blkidKarel Zak2016-03-302-0/+49
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: improve setarch tests, regarding --uname-2.6 issuesRuediger Meier2016-03-244-9/+84
| | | | | | | | | | | | | | | | | | | | | | | | 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: skip ipcs test which require /procRuediger Meier2016-03-211-0/+2
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: check for TS_HELPER_SYSINFO in swap testsKarel Zak2016-03-182-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: ignore setarch on sparcKarel Zak2016-03-171-0/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: fix memleak because of ambiguous tagsRuediger Meier2016-03-162-2/+2
| | | | | | | Now the first one of certain ambiguous tags wins. Alternatively to this patch we could have called free() before xstrdup(). Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* lscpu: use cpu and revision tag if availableRuediger Meier2016-03-164-3/+7
| | | | | | | | | | Avoid ifdef which does not work with --sysroot. Our existing test dumps produce even better output now for ppc and sparc. The logic moved to the printing section. CC: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add new fdisk bsd testKarel Zak2016-03-165-0/+992
| | | | | | | | | | | | | New BDS test based on hexdump, this commit provides: bsd_0_64.BE - generated on ppc64 bsd_0_64.LE - generated on ppc64le bsd_1_0.LE - generated on x86_64 bsd_1_0.BE - generated on s390 the last missing is Alpha where all is different :-) Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: mark old bsd fdisk test as deprecatedKarel Zak2016-03-162-8/+8
| | | | | | | | | | It seems better to use hexdump rather than md5sum, but it means that we have to gather hexdumps of the all possible BSD variants. For this purpose will be introduced a new bsd fdisk test and to verify the new hexdumps we can use this old test as both tests are exactly the same. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix fdisk/bsd for alphaRuediger Meier2016-03-161-1/+10
| | | | | | | | | | | | There are special __alpha__ ifdefs in libfdisk/src/bsd.c Regarding 565964a9 and a80886e9. BTW it was a bad idea to use md5sum. In case of failure it would be much easier to debug hexdump diffs. Now it's nearly impossible to collect all these exotic hexdumps. CC: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Merge branch 'travis-osx' of https://github.com/rudimeier/util-linuxKarel Zak2016-03-1410-89/+96
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'travis-osx' of https://github.com/rudimeier/util-linux: travis: add OSX build travis: switch to Ubuntu 14.04 Trusty build-sys: improve uuidd and script build conditions build-sys: use AC_PROG_MKDIR_P and remove a few gnuisms build-sys: add missing "not found" strings build-sys: fix again UL_SCANF_TYPE_MODIFIER tests: don't use system's mount commands tests: improve skipping of old btrfs-tools tests: remove invalid argument in libmount/debug tests: skip old socat silently misc: fix icc/clang compiler warnings misc: fix printf i386 compiler warnings
| * tests: don't use system's mount commandsRuediger Meier2016-03-135-11/+16
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: improve skipping of old btrfs-toolsRuediger Meier2016-03-135-72/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Older Linux distributions came with differently incomplete btrfs-tools 0.19+git versions (2009-2013). Old mkfs.btrfs needs minimum device size 256M. Note the most simple way to skip btrfs-tools < 3.14 would be btrfs property --help 2>&1 || ts_skip "btrfs too old" but I want to include 3.12 because of Ubuntu Trusty on travis. This patch partly reverts/rewrites the following commits: 7e604f3c - tests: don't skip case "output undefined" 076153f8 - tests: don't compare btrfs mount options 370d31f7 - tests: skip btrfs tests if version too old Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: remove invalid argument in libmount/debugRuediger Meier2016-03-131-2/+2
| | | | | | | | | | | | | | | | This was usually no problem because of unsafe strtoul(3) usage in test prog libmount/src/init.c. But musl's strtoul sets errno if no digit was found in the argument. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: skip old socat silentlyRuediger Meier2016-03-131-8/+9
| | | | | | | | | | | | | | I've seen enough logs with verbose socat output for now. Let's make it quiet. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: make libmount/lock optionalKarel Zak2016-03-141-0/+2
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update build-sys testsKarel Zak2016-03-1017-16/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'test-btrfs' of https://github.com/rudimeier/util-linuxKarel Zak2016-03-101-0/+4
|\
| * tests: skip btrfs tests if version too oldRuediger Meier2016-03-091-0/+4
| | | | | | | | | | | | | | | | Noticed on Debian 7 (Wheezy), btrfs-tools 0.19: btrfs inspect-internal: unknown token 'rootid' CC: Stanislav Brabec <sbrabec@suse.cz> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | sfdisk, fdisk: add fflush()Karel Zak2016-03-103-10/+10
|/ | | | | | | Let's add fflush(stdout) before we print to stderr to make output order more deterministic. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix non-working udevadm settle for scsi_debugRuediger Meier2016-03-091-2/+15
| | | | | | | | | | | We don't sleep anymore since 01b38917. This does not work on Debian 7 (wheezy)/linux-3.2. Is it the kernel's or udev's fault? We simmply add a better sleep again plus some todos for later improvements. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: hotfix, wait for scsi_debug partionRuediger Meier2016-03-091-1/+4
| | | | | | | Maybe we shouldn't use scsi_debug's num_parts=1 but fdisk to add a partion. This seems to work better with udevadm settle. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: don't use mkfs.btrfs option -fRuediger Meier2016-03-091-1/+1
| | | | | | | | btrfs-tools 0.19 does not have option -f but looks like we don't need it in this test. CC: Stanislav Brabec <sbrabec@suse.cz> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: ignore swapon warningsRuediger Meier2016-03-094-0/+12
| | | | | | | | | | | swapon/mkswap warns if system sets different permissions for loop devices. I saw this on Debian 7 (wheezy)/linux-3.2: mkswap: /dev/loop0: insecure permissions 1660, 0660 suggested. swapon: /dev/loop0: insecure permissions 1660, 0660 suggested. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: udevadm settle before losetup -dRuediger Meier2016-03-091-0/+4
| | | | | | | | | | | On Debian 7 (wheezy)/linux-3.2 we need "udevadm settle" between losetup and losetup -d in case that the backing file is a block device (scsi_debug). This issue is visible since: 7e604f3c tests: don't skip case "output undefined" Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: remove path name definitions that are unusedSami Kerola2016-03-092-26/+0Star
| | | | | | | | | | | | | | | | | | | | | | After this commit the following produces zero matches. $ for i in \ _PATH_DEV_TTY \ _PATH_INITTAB \ _PATH_MNTTAB_DIR \ _PATH_MOUNTED_LOCK \ _PATH_MOUNTED_TMP \ _PATH_RC \ _PATH_REBOOT \ _PATH_SECURE \ _PATH_SECURETTY \ _PATH_SHUTDOWN_CONF \ _PATH_SINGLE \ _PATH_UMOUNT \ _PATH_USERTTY do git grep $i; done Signed-off-by: Sami Kerola <kerolasa@iki.fi>