Commit Graph

1422 Commits

Author SHA1 Message Date
Karel Zak 1f42e1089a tests: use findmnt(8) for mount --move test
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:48 +01:00
Karel Zak d44910c8a1 tests: refresh libmount fstab parser tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:48 +01:00
Karel Zak 013bff51a6 tests: fix strtosize() test
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:48 +01:00
Karel Zak e46119a411 tests: check for mtab
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:48 +01:00
Karel Zak 2676f3c949 tests: add libmount utab tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:47 +01:00
Karel Zak 87a07a4cc8 libmount: minor fixes
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:47 +01:00
Karel Zak 76a06ca4cd libmount: use separate buffer for userspace options, add mount attributes
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:47 +01:00
Karel Zak 37ef0439da build-sys: add --enable-libmount-mount
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:47 +01:00
Karel Zak 77417bc00d libmount: remove utab from API, update tests
The utab file is private libmount stuff. Anything about utab should
not be exported by library API.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:47 +01:00
Karel Zak 64a2331f6d tests: improve libmount context mount and umount test
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:46 +01:00
Karel Zak 40829d8589 tests: add basic libmount tests for mounting
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:46 +01:00
Karel Zak 0e7abd33c7 tests: add utab update tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:46 +01:00
Karel Zak d5c04a47af libmount: fix Makefile and tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:46 +01:00
Karel Zak 418187ce96 tests: add libmount mtab update test
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:46 +01:00
Karel Zak 64be83b277 tests: add quoted optstr
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:45 +01:00
Karel Zak db17c74bc4 tests: improve subtests initialization
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:45 +01:00
Karel Zak 9e10ad3d50 tests: add libmount lock test
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:45 +01:00
Karel Zak f27feed36e tests: add libmount utils.c tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:45 +01:00
Karel Zak 9208fc2292 tests: add libmount tags tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:45 +01:00
Karel Zak 480962c994 tests: add libmount mtab tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:45 +01:00
Karel Zak 5e31c2c8b6 tests: add libmount tab_parse.c tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:45 +01:00
Karel Zak af0b928387 tests: add libmount optstr.c tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:45 +01:00
Karel Zak a42706f4e5 tests: use {src,build}dir variables for tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:45 +01:00
Davidlohr Bueso 9894961bf9 tests: add regression tests
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-09 22:56:55 +01:00
Karel Zak d3b24397df remove -ng from some files
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-01 22:06:15 +01:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Karel Zak a2cb313c02 tests: update namei regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-10-07 10:37:03 +02:00
Karel Zak 295b8bb906 tests: update lscpu tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-20 21:29:04 +02:00
Karel Zak e61332c371 tests: fix blkid MD test (missing tailing whitespaces)
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-20 21:02:29 +02:00
Karel Zak 7df072799d tests: add blkid test for partitioned RAID0
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-18 09:38:50 +02:00
Karel Zak f9936f4dc0 fdisk: update MBR after ID change
Reported-by: Bernard Pidoux <bpidoux@free.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-09 13:08:33 +02:00
Jiro SEKIBA 1326e1dfa5 libblkid: fix typo filesystem name nilfs to nilfs2
The correct filesystem name is nilfs2, not nilfs.

Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
2010-07-26 11:33:21 +02:00
Jiro SEKIBA 67bb0074ee tests: add nilfs2 test for libblkid
Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-07-13 09:15:11 +02:00
Karel Zak 2f89fb42a3 tests: truncate BeFS and tuxonice images
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-07-01 09:44:08 +02:00
Karel Zak 5c7cd9ab50 tests: update fdisk tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-16 11:04:39 +02:00
Karel Zak 5601d15854 tests: update blkid test for raid1
ID_PART_ENTRY_TYPE_ENC does not exists anymore.

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-04 23:33:49 +02:00
Karel Zak 88827f2623 tests: mount cramfs read-only
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-04 23:31:43 +02:00
Karel Zak b3f7edcf48 tests: update lscpu test
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-04 23:29:26 +02:00
Andrew Nayenko 8604c25570 libblkid: add exFAT file system detection support
Add exFAT file system <http://en.wikipedia.org/wiki/ExFAT> detection support.

Signed-off-by: Andrew Nayenko <resver@gmail.com>
2010-06-01 11:59:31 +02:00
Francesco Cosoleto 75f0370820 tests: update ipcs/headers test
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-06-01 11:18:05 +02:00
Karel Zak 3d9c5ba7b8 tests: add lscpu dump from Dell R710, 8-core Nehalem w/HT (RHEL 5.5)
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01 11:11:26 +02:00
Karel Zak 68975d7eb1 tests: update lscpu
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01 11:11:26 +02:00
Karel Zak 125b6a9191 tests: add cpuset regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01 11:06:49 +02:00
Karel Zak b541b8ec56 tests: update fdisk tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-19 11:16:50 +02:00
Karel Zak 577cbb4df0 libblkid: improbe DDF detection
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-18 16:09:58 +02:00
Karel Zak 8fda88ed83 tests: update blkid/md-raid1-* tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-06 15:30:18 +02:00
Karel Zak b4d50ba3b1 tests: add blkid test for TuxOnIce
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-06 13:11:40 +02:00
Karel Zak e2f092d334 tests: add blkid tests for RAID1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-03 11:25:20 +02:00
Karel Zak df8b7eef17 tests: explicitly use --chunk and --metadata in MD test
The newer mdadm version uses a different chunk size and superblock
format, so the final MD device has a different I/O limits (optimal I/O
size is 1MiB for 1.20 metadata).

We have to explicitly use the same format which is expected in our tests.

Reported-by: Yulia Kopkova <ykopkova@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-27 17:12:50 +02:00
Karel Zak e349c4f84c docs: update tests/README
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-31 17:19:13 +02:00
Yann Droneaud a609340ed2 tests: added tests against strtosize
- test empty string, white spaces
- test hexadecimal

Signed-off-by: Yann Droneaud <yann@droneaud.fr>
2010-03-31 17:15:01 +02:00
Yann Droneaud 08b825dbea tests: use POSIX locale
Since not everyone have en_US.UTF-8 locale, default to POSIX locale.
This changes default sort order, so some expected results were updated.

Signed-off-by: Yann Droneaud <yann@droneaud.fr>
2010-03-31 17:02:28 +02:00
Karel Zak cf8de26afe lib: add strtosize() function
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>
2010-03-30 13:51:58 +02:00
Karel Zak af6b2e6574 tests: fix whitespaces
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-14 23:18:17 +01:00
Andreas Dilger a1fbeb3df3 libblkid: improve ZFS detection and add LABEL and UUID extraction
Improve ZFS uberblock detection to loop over multiple uberblocks,
and detect at least 4 magic values, to avoid random collisions.
It doesn't yet probe the VDEV LABEL at the end of the device, though
it wouldn't be too hard to add it at this point if needed.

Add extraction of the pool name (as LABEL), the VDEV (block device)
guid as UUID_SUB, and pool_guid (volume) as UUID from the nvlist in
the VDEV LABEL.  Do simple sanity checking on the nvlist data values
to avoid overflowing the buffer if they are corrupt in any way.

[kzak@redhat.com: - use %PRIu64 instead %llu]

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-11 15:19:44 +01:00
Karel Zak c686bd6c55 tests: update fdisk tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-11 01:08:45 +01:00
Andreas Dilger e54a76ca07 libblkid: fix ZSF detection
Fix the ZFS device detection by looking at multiple uberblocks to see
if any are present, rather than looking for the ZFS boot block which
is not always present.

There may be up to 128 uberblocks, but the first 4 are not written to
disk on a newly-formatted filesystem so check several of them at
different offsets within the uberblock array.

[kzak@redhat.com: - port e2fsprogs patch to util-linux-ng]

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-17 10:23:55 +01:00
Karel Zak c89d620e03 tests: update fdisk tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-15 16:08:20 +01:00
Karel Zak 1c5530fb74 tests: update fdisk tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-12 22:10:52 +01:00
Karel Zak a5445cd2e5 tests: fix and update old fdisk tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-09 16:24:51 +01:00
Karel Zak 5792255b54 tests: add fdisk alignment tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-09 15:47:32 +01:00
Karel Zak 2a986d6a53 tests: add BeFS test image
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-02 15:49:35 +01:00
Karel Zak 4ccbf1388e tests: update FS test images
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-19 16:46:08 +01:00
Karel Zak 49b1508ee2 tests: fix RAIDs tests
- test images was too small (limit is 1474560 bytes)

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-18 16:49:38 +01:00
Karel Zak 71ca5d3ca7 tests: refresh lscpu tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-07 21:49:40 +01:00
Karel Zak 7e6bd2c5c1 tests: add silicon RAID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-15 14:08:14 +01:00
Karel Zak 75ee7085b3 tests: add promise RAID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-15 14:07:53 +01:00
Karel Zak 148a015df7 tests: add nvidia RAID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-15 14:07:10 +01:00
Karel Zak a1d39e5b1a tests: add lsi RAID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-15 14:06:18 +01:00
Karel Zak 19295f3880 tests: add jmicron RAID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-15 14:05:54 +01:00
Karel Zak 44b4ef8f68 tests: add isw RAID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-15 14:04:44 +01:00
Karel Zak ced072017e tests: add hpt45x RAID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-15 14:04:02 +01:00
Karel Zak 0c28347a2a tests: add hpt37x RAID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-15 14:01:40 +01:00
Karel Zak d35c40e237 tests: add adaptec RAID test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-15 14:01:03 +01:00
Karel Zak 283a8c1598 tests: remove vol_id from tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-04 20:30:16 +01:00
Karel Zak 25f4fd6060 tests: add UFS test image for libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-02 12:24:23 +01:00
Karel Zak 7af0caa726 tests: add VIA RAID test image for libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-02 12:03:18 +01:00
Karel Zak 8947b52ba0 fdisk: print info and recommendations about alignment
* inform user that phy.sector > log.sector
 * warn user when alignment_offset is not provided does, DOS-compatible
   mode is enabled and the default geo.sectors are not aligned
 * suggest to change display units to sectors (oh yes, fdisk
   default are cylinders...)

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 11:25:10 +01:00
Karel Zak 9e407bd910 tests: add NTFS blkid test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-16 14:36:29 +01:00
Zdenek Behan 66723dfd8a fdisk: add regression test listing empty/nonsense images
Signed-off-by: Zdenek Behan <rain@matfyz.cz>
2009-11-02 10:10:18 +01:00
Karel Zak 0071917f78 tests: refresh GPT regression test
The n+1 change has been introduced by commit
4c8e837230.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-30 12:26:03 +01:00
Mike Hommey 06b1f2eda4 libblkid: add test cases for VMFS
Signed-off-by: Mike Hommey <mh@glandium.org>
2009-10-26 13:42:36 +01:00
Karel Zak d690f6255c tests: update fsck.ismounted test
The latest version of the lib/test_ismounted binary returns absolute
mountpoint path too. This patch removes the path from test output (the
path is variable).

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-15 23:37:34 +02:00
Karel Zak d4e0f2f2ad tests: swapon workaround for libtool wrapper
The swapon command behaviour depends on program name (argv[0] = swapon
| swapoff). It means we cannot use the libtool wrapper script in our
regression tests. It seems better to call the binaries directly with
proper LD_LIBRARY_PATH. This is probably less portable, but good
enough for our tests.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-13 15:37:49 +02:00
Karel Zak 6728c64649 tests: add BFS libblkid regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-06 22:22:39 +02:00
Corentin Chary 62fc170c44 tests: add UBIFS test image to blkid test suite
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-24 15:43:52 +02:00
Karel Zak 68ee5746f0 tests: add blkid regression tests for ISO9660
Note that Rock-Ridge detection is not supported yet.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-24 10:46:25 +02:00
Karel Zak 0e8a806546 libblkid: add blkid_partition_get_type_string()
.. because for example Mac and GPT don't use numbers, but strings or
UUIDs as partition type identifier.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-17 17:01:19 +02:00
Karel Zak 5777ba99a3 tests: add partitions probing test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-16 21:54:10 +02:00
Karel Zak 5e30325b79 tests: rename blkid/images to blkid/images-fs
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-16 21:44:40 +02:00
Zdenek Behan d7c9665433 tests: test for basic functionality of sun labels
Tests the following:
* Creation and deletion of first two partitions
* setting sysid to one (randomly chosen) value
* setting readonly/mountable flags

Signed-off-by: Zdenek Behan <rain@matfyz.cz>
2009-08-17 12:25:28 +02:00
Zdenek Behan 9129bc47b0 tests: fdisk doslabel test also checks setting partition active
* Yet another test, this time for setting active partition

Signed-off-by: Zdenek Behan <rain@matfyz.cz>
2009-08-17 12:25:21 +02:00
Zdenek Behan 28290b756d tests: fdisk doslabel test also checks changing partition type
* Changed apostrophes around test commands to quotes, this makes vim
syntax highlighting more happy, and makes the newlines stand out.

* Added check for changing partition type. After the change is done and
checked, the partition is deleted and re-created to not mess with the
other md5's already in place...

Signed-off-by: Zdenek Behan <rain@matfyz.cz>
2009-08-17 12:25:05 +02:00
Karel Zak 5663298c2c blkid: move to misc-utils/ directory
The others utilities are in one of the top-level directories. That's
confusing to have blkid(8) and findfs(8) in shlibs/ tree.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-07-02 14:38:23 +02:00
Karel Zak c74c0dafff include: clean up _PATH_DEV_* macros
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-30 01:13:42 +02:00
Karel Zak 14b9212929 tests: fix script that creates lscpu dumps
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-27 16:27:50 +02:00
Karel Zak 1c367aec05 tests: move lscpu /proc and /sys dumps to tarballs
It's easy to maintain few tarballs that tons of files.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-27 16:06:04 +02:00
Karel Zak 0d86c70a14 tests: remove broken Xen dumps for lscpu
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-27 15:47:49 +02:00
Karel Zak b8ab374488 tests: don't run some mount tests for non-root users
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-27 15:20:01 +02:00
Karel Zak 12f33b2349 tests: fix reiserfs test
For more details see 5b3f8e4f96.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-27 15:08:13 +02:00
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