Commit Graph

1422 Commits

Author SHA1 Message Date
Karel Zak 53121013eb tests: add mdraid libblkid test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-27 15:07:37 +02:00
Karel Zak d0127c336b tests: fix 'delete extended partition' checksum
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-22 14:56:42 +02:00
Zdenek Behan 13d70bac07 fdisk: add simple test for doslabel stuff
Initial tests/fdisk patch to test most of the doslabel-related stuff.
Coverage of dos-related functions is about 60%, does not test the
verify/fix-PT code.

[kzak@redhat.com: - fix test design to match to
                    output/expect/diff idea]

Signed-off-by: Zdenek Behan <rain@matfyz.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-19 16:19:32 +02:00
Karel Zak 35c636e13b tests: add functions for work withdisk images
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-19 16:13:09 +02:00
Karel Zak 20ad496324 build-sys: complete /libs to /shlibs rename
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-14 17:40:52 +02:00
Karel Zak 396b8c0f9f tests: fix -regex in run.sh
Reported-by: Scott James Remnant <scott@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-29 15:51:32 +02:00
Karel Zak d002b4ea38 blkid: add ZSF test
Thanks to Andreas Dilger.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-03 11:33:01 +02:00
Karel Zak bf9d81dbc8 tests: fix typo in lscpu test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-17 22:33:03 +01:00
Karel Zak 87f8158be4 tests: fix file name is too long (max 99) - gtar
gtar: util-linux-ng-2.15-rc1/tests/ts/lscpu/proc-dumps/i386-dellpe700/sys/devices/system/cpu/cpu1/topology/:
file name is too long (max 99); not dumped

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-17 22:25:44 +01:00
Karel Zak 0cd0dbd249 tests: disable blkid tests when blkid(8) is not compiled
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-16 14:03:03 +01:00
Karel Zak 22568e9a51 tests: remove obsolete stuff from Makefile.am
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-20 13:10:24 +01:00
Karel Zak 105960ab85 tests: refresh expected mount(8) outputs
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 23:40:17 +01:00
Karel Zak 84f513b699 tests: disable suid mount test
Unfortunately, libtool wrapper cannot be suid...

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 23:33:25 +01:00
Karel Zak ea7e2ccbd8 tests: refresh ipcs expected outputs
Unfortunately, the last rebase in the topic/blkid branch has removed
tailing white spaces. Grrr...

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 21:50:55 +01:00
Karel Zak d1ddc9fd7c tests: refresh cal(1) expected outputs
Unfortunately, the last rebase in the topic/blkid branch has removed
tailing white spaces. Grrr...

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 21:45:48 +01:00
Karel Zak 0f97843d69 tests: we needn't blkid.sh
after "libtoolization" we needn't extra blkid.sh wrapper

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 21:44:00 +01:00
Karel Zak 166fccd191 tests: chmod -x ts/lscpu/mk-input.sh
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 21:28:23 +01:00
Karel Zak 9c7d601359 tests: cleanup ts/md5
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 21:27:18 +01:00
Karel Zak 86aa0ee740 tests: cleanup ts/minix
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 21:19:47 +01:00
Karel Zak 1d7a6c78b8 tests: cleanup lscpu reg.tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 17:16:46 +01:00
Karel Zak bd8ef46347 tests: cleanup ts/cramfs/mkfs-endianness
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 16:48:20 +01:00
Karel Zak c62d7af2e5 tests: cleanup ts/cramfs/fsck-endianness
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 16:45:01 +01:00
Karel Zak 4ff901f6d5 tests: cleanup ts/bitops
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 16:34:34 +01:00
Karel Zak 355eceba7e tests: add fsck:ismounted reg.test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18 16:10:45 +01:00
Karel Zak b8d8ef729d tests: fix typo in low-probe test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:25 +01:00
Karel Zak ba837d3f0a blkid: add lvm2 reg.test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:25 +01:00
Karel Zak 95f6002d72 blkid: add GFS2 reg. test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:24 +01:00
Karel Zak f6528f78cc blkid: add reg.tests for HFS and HFS+
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:24 +01:00
Karel Zak 70605edc5d blkid: add vol_id call to blkid regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:24 +01:00
Karel Zak b164669042 blkid: add to reiser
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:24 +01:00
Karel Zak f38ac42666 blkid: add ocfs2 version
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:24 +01:00
Karel Zak 22632603a2 blkid: fix ..._strncpy_uuid
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:24 +01:00
Karel Zak 0b9fd855c9 blkid: add ddf raid regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:24 +01:00
Karel Zak 1fd27cbcbe blkid: add netware regression test
Thanks to Kay Sievers for the image and information.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:23 +01:00
Karel Zak dd9ef6f612 blkid: add hpfs regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:23 +01:00
Karel Zak 25c03e5b46 tests: remove unexpected exit from *_subtest functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:22 +01:00
Karel Zak 8df5195f1a tests: add libblkid regression tests (images from e2fsprogs)
- adds basic infrastructure for blkid regression tests
- imports test images from e2fsprogs (all tests PASS!:-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:22 +01:00
Karel Zak 425ca40aa2 tests: fix the final message for subtests
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:22 +01:00
Karel Zak 09888efe4c tests: add support for subtests
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:35:22 +01:00
Karel Zak 905d0b9b66 tests: move some generic stuff from ts_init() to a new ts_init_env()
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:32:58 +01:00
Karel Zak 1f94344954 tests: add "byte-order" to helpers/test_sysinfo
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:32:58 +01:00
Karel Zak c1b4c7fb49 tests: fix output string
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:32:58 +01:00
Karel Zak 43d1d9c749 tests: cleanup ts/mount
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:32:58 +01:00
Karel Zak 632830ccf2 tests: cleanup ts/swapon
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:32:58 +01:00
Karel Zak 0674bd0b90 tests: cleanup ts/script
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:32:58 +01:00
Karel Zak 4468cec52a tests: cleanup ts/paths
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:32:57 +01:00
Karel Zak 5f8b0c0eaf tests: cleanup ts/namei
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:32:57 +01:00
Karel Zak e56f9e472f tests: cleanup ts/look
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:30:48 +01:00
Karel Zak 37c28b42a6 tests: cleanup ts/login
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:30:48 +01:00
Karel Zak 1016b53f61 tests: cleanup ts/ipcs
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:30:48 +01:00
Karel Zak fb59721f62 tests: cleanup ts/hwclock
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:30:15 +01:00
root cbac71bdf8 tests: refresh and cleanup cramfs/mkfs
Signed-off-by: root <root@nb.net.home>
2009-02-11 23:30:15 +01:00
Karel Zak a8d3e93dc0 tests: cleanup ts/col scripts
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:30:15 +01:00
Karel Zak b319621a35 tests: cleanup ts/cal scripts
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:30:14 +01:00
Karel Zak a02f320d4b tests: fix TS_* paths
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:30:14 +01:00
Karel Zak a1be90bba4 tests: add ./run.sh <component>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:27:55 +01:00
Karel Zak d42bbae57d tests: add support for subdirs to basic test functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:27:55 +01:00
Karel Zak 1cec8fc9f2 tests: create expected/$(component)/$(testname)
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:21:52 +01:00
Karel Zak b8b7678d18 tests: remove input directory
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:21:52 +01:00
Karel Zak 8387a824b5 tests: create subdirs for test scripts
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:21:52 +01:00
Karel Zak 108cfeca72 fsck.minix: add regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-05 15:47:09 +00:00
Karel Zak 7ac99951a1 mkfs.minix: add regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-05 15:20:17 +00:00
Karel Zak 3ff2557c92 tests: check also for /dev/loop/X
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-04 22:38:34 +01:00
Signed-off-by: Roy Peled fbaec83bc0 mkfs.cramfs: add endianness support to cramfs tools
cramfs is an endianness dependent file system.  So far, the cramfs
utilities did not support cramfs images of different endianness than
the host machine.

A separate utility, cramfsswap, was required in order to change the
endianness of the image before and after using cramfs utilities. The
extra utility introduced extra maintenance and an additional step in
the process.

This patch adds endianness support to mkfs.cramfs and fsck.cramfs.
fsck.cramfs now automatically detects the image endianness, and can
work on images of either endianness.  mkfs.cramfs now accepts a new
optional parameter (-N) that allows creating the cramfs image in
either endianness.

Signed-off-by: Roy Peled <the.roy.peled@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-04 14:56:54 +01:00
Karel Zak 9775d40fff tests: add md5 regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-08 12:36:07 +01:00
Karel Zak 788a14403d tests: add MD5 regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-06 01:43:55 +01:00
Karel Zak 0112925a99 tests: add swabN() regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-05 16:27:19 +01:00
Américo Wang 7e37b8cc03 tests: remove useless return value checks in testing scripts
Signed-off-by: WANG Cong <wangcong@zeuux.org>
2008-11-20 10:02:03 +01:00
Karel Zak 4ea5676c44 tests: update namei reg.test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-19 13:38:01 +01:00
Américo Wang f0b561b632 tests: clean up the testing scripts
Do some cleanups to the testing scripts.

Signed-off-by: WANG Cong <wangcong@zeuux.org>
2008-11-19 13:17:08 +01:00
Karel Zak 7bfa31b953 tests: refresh Makefile.am (add missing lscpu tests)
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-22 14:01:44 +02:00
Karel Zak 5e8f283e90 tests: add lscpu(1) test for fullvirt. Xen x86_64
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-22 14:01:44 +02:00
Karel Zak 750e040e00 tests: add lscpu(1) test for paravirt. Xen i386
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-22 13:56:52 +02:00
Karel Zak 6c7bba315c tests: add mk-lscpu-input.sh
This script makes a copy from system /proc and /sys. The result is
useful for lscpu(1) regression tests.

Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-22 13:56:52 +02:00
Cai Qian c2abd9a0a5 lscpu: regression tests
This patch added regression tests for lscpu. It tests lscpu for 3
architecutres, i386, x86_64 and ia64, with data from 3 different
machines each.

Signed-off-by: Cai Qian <qcai@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-08-14 13:15:43 +02:00
Karel Zak 928e9f327f tests: detect libvolume_id when mount(8) is compiled
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-08-14 13:01:04 +02:00
maximilian attems d144727bc3 use getpagesize()
getpagesize() is said to be more portable than sysconf(_SC_PAGESIZE)
to anything Linux.

this patch helps klibc porting effort as the sysconf
multiplex API is not supported there.

also remove comment of the switch to sysconf in mkswap.c.

Signed-off-by: maximilian attems <max@stro.at>
2008-07-30 13:26:58 +02:00
James Youngman c4e1583799 build-sys: ignore a bunch of generated files, mostly binaries
Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-14 14:08:00 +02:00
James Youngman 8e0259728e login: rewrite is_local() to remove limits on line length
Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-14 13:12:14 +02:00
Karel Zak 9a52650c79 tests: add "sort" to cramfs test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-02-18 15:22:08 +01:00
Pádraig Brady ff87defc0d cal: fix weekday alignment for certain locales
For example this had too much padding: LANG=zh_CN.utf8 cal -j
while this had too little padding:     LANG=hu_HU.utf8 cal
This had invalid chars:                LANG=li_BE.utf8 cal
This had too few chars:                LANG=si_LK.utf8 cal

Note some locales may display with slightly worse alignment
(fa_IR.utf8 for example), but that is only because the terminal
is not merging the combining characters. This happens on
gnome-terminal-2.18.3-1.fc8 at least.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-01-17 02:21:53 +01:00
Karel Zak b7ea07e0c9 tests: redirect libblkid cache to BLKID_FILE
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-12-06 22:46:00 +01:00
Karel Zak 4e270e3f48 mount: cleanup usage of _PATH_*
The macros MOUNTED and MNTTAB are deprecated. This patch standardize
and consolidate all path macros and remove mount_paths.h.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 14:35:24 +01:00
Karel Zak 4d43977ffc include: add mount paths to pathnames.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 14:08:33 +01:00
Karel Zak 2f4564eac4 include: cleanup pathnames.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 13:17:16 +01:00
Karel Zak 1f5641f979 tests: add test for include/pathnames.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 12:52:59 +01:00
Karel Zak d00ed8911e tests: move test_bkdev to lib/
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 12:27:00 +01:00
Karel Zak 7df454fc9b tests: rename test_sysinfo, remove tailing white-spaces
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 12:11:51 +01:00
Karel Zak 83617e73e7 tests: add ts-mount-noncanonical
mount(8) shouldn't canonicalize SPEC path for cifs, smbfs, nfs, ...

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-21 01:42:23 +01:00
Stefan Krah 3738a48e08 lib: add blkdev.{c,h}
Now we duplicate BLK* ioctls on many places... This patch also
fix BLKGETSIZE64 usage in dependence on kernel version.

Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Stefan Krah <stefan@bytereef.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-07 12:37:30 +01:00
Karel Zak 32f7216b4c tests: use losetup -s
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-26 01:02:45 +02:00
Karel Zak ec3f45d33c tests: fix blkid cache usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-12 00:40:01 +02:00
Karel Zak fb241307d6 tests: exactly define a time format in ls -l output
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-11 14:52:40 +02:00
Pádraig Brady d7a92b8994 cal: add support for highlighting an arbitrary date
This is done by calling cal with the extra day parameter like:

cal 14 9 1752

Note the tests were updated to use the new syntax.

Note also that this patch changes the -y option
to always print a full year, even if a month or
the -[13] options are specified.
This matches the cal operation from bsdmainutils on debian
and also allows one to print a full year while
highlighting a particular date.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
2007-10-11 14:19:39 +02:00
Karel Zak cd5e23c56a tests: fix ULONG_MAX usage on 32bit machines
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-14 12:05:29 +02:00
Karel Zak c986042898 tests: add warning "For development purpose only."
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-08 00:42:29 +02:00
Karel Zak f8a9670f14 tests: add script(1) race condition test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-07 00:46:46 +02:00
Karel Zak 9645b5cbe9 build-sys: fix directories in EXTRA_DIST
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-26 15:21:50 +02:00
Karel Zak a2c6354ff7 tests: use $AWK based on configure results
The hardcoded "gawk" seems like a bad idea.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-23 15:07:13 +02:00
Karel Zak 93a024e4db tests: add license notices, change from gplv2-only to gplv2-or-later
The previous "gplv2-only" was copy&past mistake. This re-licensing is
correct -- there is not any other contributor to this code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-23 15:04:59 +02:00
Karel Zak 92f2c23e68 tests: add license notices, change from gplv2-only to gplv2-or-later
The previous "gplv2-only" was copy&past mistake. This re-licensing is
correct -- there is not any other contributor to this code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-23 14:31:14 +02:00
Mike Frysinger d6ca1ec176 tests: use relative paths when sourcing files
The "." command will search $PATH before $PWD if the argument
specified contains no path qualifiers which can cause problems if
you happen to have something in $PATH named the same.  The
attached patch changes all of the ".  <foo>" in the tests subdir.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2007-07-23 13:55:36 +02:00
Karel Zak db0aaaa6a8 build-sys: remove libtool
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-11 00:59:49 +02:00
Karel Zak fd71c65963 tests: remove dependence on helpers/libpreload-time.so
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-10 23:51:12 +02:00
Karel Zak d20b54c4bb tests: add mount /dev/symlink test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-15 21:32:45 +02:00
Karel Zak 1b5417aca1 tests: add support for suid programs
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-15 15:55:10 +02:00
Karel Zak b002d0212d tests: fix ts_fstab_add function
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-15 11:29:04 +02:00
Karel Zak 15ec3ddf19 tests: add cal -y test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12 13:26:05 +02:00
Karel Zak a150a4a4ee tests: add cal -3 test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12 13:05:00 +02:00
Karel Zak c99539b00f tests: add cal -1 test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12 13:01:53 +02:00
Karel Zak 1d9acab1c1 tests: pass all arguments to ts_init, add ts_has_option function
This patch:
	- replaces "$1" with "$*" for ts_init function
	- add ts_has_option function
	- removes some tailing white-spaces

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-11 14:45:32 +02:00
Karel Zak 1ea295bde5 tests: add mount by uuid with label in fstab
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-30 11:25:00 +02:00
Karel Zak f82448f83c tests: add mount by uuid with devname in fstab
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-30 11:24:06 +02:00
Karel Zak 6670cf6815 tests: add mount by label with uuid in fstab
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-30 11:24:06 +02:00
Karel Zak 47dd1e4471 tests: add mount by label with devname in fstab
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-30 11:24:06 +02:00
Karel Zak 1a7dcc4f80 tests: add mount by devname with uuid in fstab
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-30 11:24:06 +02:00
Karel Zak 8d946e7d27 tests: add mount by devname with label in fstab
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-30 11:23:56 +02:00
Karel Zak e38e975265 tests: add more variants to {mount,fstab}-by-{label,uuid,devname}
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-30 10:48:06 +02:00
Karel Zak 66822df31a tests: cleanup blkid cache after test device deinitialization
The libblkid reuses cached information when a cache entry is younger
than 2 secs. That's wrong, because util-linux tests use devices
more quickly.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-25 14:53:22 +02:00
Karel Zak 10e7d5c15f mount: use verbose mode instead debug mode
The patch:

  commit 61d9d2ff1c
  Date:   Wed Dec 27 23:35:56 2006 +0100

added debug mode to the mount command. It was mistake. It's better to
use old verbose mode instead a new debug mode. This patch transform
all staff from debug mode to to verbose mode.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-25 13:33:22 +02:00
Karel Zak 66ac2d1703 tests: add mount by devname from fstab
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-22 22:00:01 +02:00
Karel Zak 83ee8e469a tests: add mount by UUID from fstab test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-22 21:44:14 +02:00
Karel Zak 5715bd9e6a tests: add mount by label from fstab test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-22 18:39:17 +02:00
Karel Zak c98825acab tests: add support for fstab modification
The patch adds ts_fstab_add and ts_fstab_clean routines.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-22 18:38:49 +02:00
Karel Zak 16f2ab05ec tests: add mount by devname test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-22 11:46:32 +02:00
Karel Zak fcd313ee79 tests: add mount by LABEL test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-21 15:01:57 +02:00
Karel Zak f2e0e85a50 tests: fix Makefile.am (add missing tests)
The patch adds missing tests to Makefile.am.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-21 14:31:51 +02:00
Karel Zak d90af657b8 tests: add mount by UUID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-21 14:28:01 +02:00
Karel Zak 57a917d630 tests: add ts_log and --verbose support
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 15:34:28 +02:00
Karel Zak aaf2f7233c tests: "if [...]" clean up
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 15:00:22 +02:00
Karel Zak a94eb70b6b tests: add swapon by devname test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 14:00:21 +02:00
Karel Zak c903c4ad5a tests: add swapon by UUID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 13:54:43 +02:00
Karel Zak 3dfa278ea5 tests: simplify devices usage
The patch simplifies devices usage in the tests. The patch also improves
errors checking and reporting.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 13:49:15 +02:00
Karel Zak 3f5bda012d tests: add functions for label, uuid and fstype detection
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 13:09:12 +02:00
Karel Zak 064b8c3842 tests: code refactoring -- new ts_udev_loop_support function
The patch moves generic and duplicated code to a new
ts_udev_loop_support function.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 13:09:12 +02:00
Karel Zak df7e52d74b tests: code refactoring -- new ts_device_init function
The patch moves generic loop device (de)initialization code to
ts_device_init and ts_device_deinit functions.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 13:09:12 +02:00
Karel Zak 09892fb60a tests: code refactoring -- new ts_skip_nonroot function
The patch moves "if $UID != 0" test to a new function. That's better
than duplicate the code on many places.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 13:09:12 +02:00
Karel Zak 0f3e157555 tests: fix dependence on blkid
The util-linux-ng tests have to be useful with blkid and also with
volume_id.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-18 13:09:12 +02:00
Stepan Kasal 81c3ab2d60 build-sys: do not use wildcards in EXTRA_DIST
Wildcards in EXTRA_DIST break "make dist" for vpath build.
But plain directory names are ok.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:30 +02:00
Stepan Kasal 5ebc954d5f build-sys: amend .gitignore
Add several built files to .gitignore files.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:30 +02:00
Stepan Kasal caec351d67 build-sys: simplify "clean" in tests/Makefile.am
The construction with "distclean-local" does not seem necessary.
Moreover, Automake complains when "clean" is redefined.

Simply put the rm to "clean-local".

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Karel Zak 8d5807b942 tests: add mount -o remount test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 22:25:13 +02:00
Karel Zak e4a89b95ad tests: add mount --move test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 15:10:00 +02:00
Karel Zak e9998b33cc tests: refresh mtablock output in expected/ directory
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-05 00:34:28 +02:00
Matthias Koenig 0df2f5d5aa tests: add missing header
minor patch, which adds a missing string.h header to
mnt_test_sysinfo.c

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
2007-04-04 12:43:39 +02:00
Karel Zak 939a997de0 tests: enable mtablock test when uid=0 only
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-03 22:19:28 +02:00
Karel Zak dc8fdc57cd mount: fix mtab_lock
* the lock function uses F_SETLK / F_SETLKW as a conditional wait.
  It's more reliable and better for performance to close the
  MOUNTED_LOCK file in unlock_mtab(), otherwise concurrent process will
  be wait by while () { link() } loop instead on fcntl(F_SETLKW).

  Thanks to Jeff Moyer <moyer@redhat.com> who found the problem two
  year ago.

* when open(MOUNTED_LOCK) failed, we need to try everything again, but
  the original code didn't zeroize "we_created_lockfile" and the old
  version in particular case left lock_mtab() without locked /etc/mtab.
  This is nasty bug.

* the original locking code had bad performance due too long sleep
  (1s),  between attempts. Now we're more aggressive and we use
  5000ms. The result is that more processes is able to lock mtab in
  short time slice.

  Thanks to Peter Rockai <prockai@redhat.com> who found the problem
  and suggest a first version of the code with usleep.

* now we don't count number of attempts anymore, but we count sum of
  time which we spend in the mtab_lock(). The number of attempts is
  not important (and it also depends on CPU performance, load,
  scheduler, ...), the important thing is how long we spend with
  locking. Now time  limit is 30s.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-30 13:10:59 +02:00
Karel Zak 2cd72ac0e0 tests: add lock_mtab() performance and reliability test
The test starts concurrently many processes that use lock_mtab() as
lock for access to same file.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-28 18:43:03 +02:00
Karel Zak 61b2affd6e tests: make clean need to remove diffs and outputs
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-28 17:01:19 +02:00
Karel Zak ce11301210 tests: add test for /sbin/mount.<type> call
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-22 01:28:44 +01:00
Karel Zak 99c392d8ba hwclock: fix --systohc sets clock 0.5 seconds slow
quote from rh150493:

	The kernel code, when setting the BIOS clock notes that the clock time
	ticks to the next second 0.5 seconds after adjusting it  (see
	linux/arch/i386/kernel/time.c).

	hwclock --systohc sets the CMOS clock at the 1 second boundry and thus
	causes the clock to be wrong by 500ms each time it is reset.  If the
	clock is set every shutdown then the clock will have a reboot-count
	related drift as well as the natural drift problems of the clock. Note
	that this also mucks up the drift calculations, of course.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-20 00:32:37 +01:00
Karel Zak 51bc94930b tests: add hwclock systohc test
The test detects how "hwclock --systohc" untune the clock. Now the hwclock
command causes the hw clock to be wrong by 500ms each time it is reset.

The test resets the clock 10 times and result is 5 sec difference between NTP
and the clock. That's a bug... and it has to bee fixed in a next commit.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-20 00:08:49 +01:00
Karel Zak 05de812634 tests: add ts_ok and ts_failed
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-19 23:27:40 +01:00
Karel Zak 82640b11ba tests: add library for LD_PRELOAD to manipulate with time() in tests
The cal command generates output that depends on time(). For reliable
regression tests we need to use still same time. It seems that LD_PRELOAD is
pretty simple way.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-14 14:10:18 +01:00
Karel Zak ea6c190a66 login: add IPv6 support
This support includes:

   * non-PAM version supports IPv6 ranges in /etc/usertty
   * utmp records with IPv6 addresses

Based on patch by: Milan Zazrivec <mzazrivec@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-10 01:28:10 +01:00
Karel Zak 71562c1fdd login: add regression test for IP address checking code
The hnmatch() in checktty.c is checking IP addresses if the login util
is compiled without PAM support.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-09 14:56:18 +01:00
Karel Zak dab737cc42 look: fix problem with !isalnum() words
for example "$ look apple-pie"

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-06 13:14:52 +01:00
Karel Zak a17bead499 tests: add look test for words with separator
$ look apple-pie

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-06 13:04:25 +01:00
Karel Zak 40b115acc5 tests: add expected outputs for cramfs
The patch aslo reduce number of files and dirs in mkfs.cramfs tests.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-27 16:38:27 +01:00
Karel Zak 86ec1b63f9 tests: add mkfs.cramfs tests
This test shows that actual mkfs.cramfs is ugly due MAXENTRIES (100) limit.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-27 15:59:04 +01:00
Karel Zak b8d1314dc6 build-sys: fix README filenames and add missing files to EXTRA_DISTs
Also, the patch makes "make mrproper" more robust.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-08 12:38:25 +01:00
Karel Zak 061999ee0d mkswap: add regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-07 13:26:11 +01:00
Karel Zak 7ac3b5b8e3 Clean up pagesize/PAGE_SIZE usage.
Now all code in util-linux uses sysconf(_SC_PAGESIZE) that is standardized and
preferred way of querying page size. The asm/page.h file is not included to the
code anymore. (This patch doesn't change mount's FS detection code which will
be removed later).

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-06 11:35:15 +01:00
Karel Zak ca04734de1 tests: fix argv[] usage in mnt_test_sysinfo.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-06 11:33:35 +01:00
Karel Zak 5db4f8e3b3 namei: new regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-31 16:45:01 +01:00
Karel Zak e9ce5ccc90 col: getwchar() errors shouldn't be hidden
The col truncates output when multibyte errors is detected, but the problem is
not reported to stderr and return code is still same like for successful exit.
This stupid behaviour is fixed by this patch.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-30 13:52:48 +01:00
Karel Zak 5b0d01d619 tests: add return code
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-28 01:24:15 +01:00
Karel Zak b30cd7eed5 ipcs: add new tests for ipcs limits
The tests check if data from kernel and from the ipcs command are same.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:53:57 +01:00
Karel Zak 0f0584addc tests: add simple helper that returns info about system
usage: tests/helpers/mnt_test_sysinfo <infoname>

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:53:19 +01:00
Karel Zak 4ac0f9d0c2 ipcs: fix typo in Semaphore headers
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:45:48 +01:00
Karel Zak 97cdb3cb5c ipcs: add regression test for output headers
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:41:29 +01:00
Karel Zak e83446da1a tests: add basic infrastructure for regression tests
The patch adds tests/ directory with simple regression tests infrastructure.

Also, it adds the "ts-mount-paths" test that testing if all defined paths
(fstab, mtab, locks) are still same.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:23:48 +01:00