summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: rename ts_valgrind to ts_runKarel Zak2017-11-2312-115/+115
| | | | | | | Let's make our tests more generic, so we can later hide more stuff into ts_run call. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update columns test due to dda229c7b2b16a31fae8e99079ab4f4ae5bc8eacKarel Zak2017-11-221-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: udf: Fix parsing UDF revisionPali Rohár2017-11-202-0/+10
| | | | | | | | | | | | | | | | | UDF revision is stored as decimal number in hexadecimal format. E.g. number 0x0150 is revision 1.50, number 0x0201 is revision 2.01. Apparently all UDF test images have number which has same representation in decimal and hexadecimal format, so problem was not detected. This patch adds new test image with UDF revision 1.50. Internally number is stored as 0x0150. In decimal format it is (incorrectly) 1.80, but in hexadecimal correct 1.50. $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-8.img bs=1M count=10 $ mkudffs -r 0x150 -b 512 udf-hdd-mkudffs-1.3-8.img Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* tests: Add UDF cd image created by mkudfiso 20100208Pali Rohár2017-11-162-0/+7
| | | | | | | | | $ mkudfiso -v "Volume Label" . | tail -n +2 > udf-cd-mkudfiso-20100208.img mkudfiso 20100208 creates UDF images without valid LVID (and LVIDIU), so it is a good candidate for testing fallback code for ID_FS_VERSION. Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* tests: GPT device resize testKarel Zak2017-11-142-0/+117
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch '170925' of github.com:jwpi/util-linuxKarel Zak2017-11-1314-90/+90
|\ | | | | | | | | | | | | | | | | * '170925' of github.com:jwpi/util-linux: tests: adjust for ISO timezone colon use lib/timeutils: add common ISO timestamp masks lib/timeutils: add get_gmtoff() lib/timeutils: ISO_8601_BUFSIZ too small hwclock: add iso-8601 overflow check
| * tests: adjust for ISO timezone colon useJ William Piggott2017-11-1214-90/+90
| | | | | | | | | | | | | | Fix several tests broken by adding a timezone colon in the timeutils ISO format functions. Signed-off-by: J William Piggott <elseifthen@gmx.com>
* | Merge branch 'udf' of https://github.com/pali/util-linuxKarel Zak2017-11-132-0/+10
|\ \ | | | | | | | | | | | | | | | * 'udf' of https://github.com/pali/util-linux: test: Add UDF hdd image with final block size 4096 created by Linux mkudffs 1.3 libblkid: udf: Optimize and fix probing when block size > 2048 bytes
| * | test: Add UDF hdd image with final block size 4096 created by Linux mkudffs 1.3Pali Rohár2017-11-122-0/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-7.img bs=1M count=10 $ mkudffs -l Label512 -b 512 udf-hdd-mkudffs-1.3-7.img $ mkudffs -l Label4096 -b 4096 udf-hdd-mkudffs-1.3-7.img Image file was first formatted with block size 512 and then reformatted with block size 4096. Volume Recognition Sequence was overwritten and every Volume Structure Descriptor is now 4096 bytes long. Trying to read second VSD as 2048 bytes long will fail because 4069 bytes long VSD is padded with zeros. To verify that image file was properly detected, it should have label "Label4096" and not "Label512".
* / libblkid: vfat: Fix reading labels which starts with byte 0x05Pali Rohár2017-11-092-0/+7
|/ | | | | | | | When FAT directory entry has leading byte 0x05 it is interpreted as byte 0xE5. This is how FAT stores file name which starts with byte 0xE5 as leading byte in 0xE5 in FAT directory entry means that file slot is empty. Fixes: #533
* tests: update default lsmem outputKarel Zak2017-11-031-4/+2Star
| | | | | | | The commit 96cbe362c034305e5f12a912b4247b3321420ee7 forces lsmem to follow output column for split policy. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add fsck.cramfs bad-header testKarel Zak2017-11-022-0/+40
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add LUKS test imagesMilan Broz2017-10-244-0/+13
| | | | | | | Testing image contains only the first 4k sector, so it is not valid, but for blkid it should be enough. Signed-off-by: Milan Broz <gmazyland@gmail.com>
* tests: update lsmemKarel Zak2017-10-203-15/+76
| | | | | | * add --split Signed-off-by: Karel Zak <kzak@redhat.com>
* tests/lsmem: update lsmem test with ZONES columnGerald Schaefer2017-10-203-0/+61
| | | | | | | | The existing s390 and x86_64 dumps already contain the valid_zones sysfs attribute, so just add a new "lsmem -o +ZONES" test command and update the expected results. Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
* tests: update build-sys testsKarel Zak2017-09-1918-52/+82
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidgen: add support for hash-based UUIDsPhilip Prindeville2017-09-052-0/+35
| | | | Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* misc: replace magic number 37 with UUID_STR_LENPhilip Prindeville2017-09-051-1/+1
| | | | Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* libuuid: add support for hash-based UUIDsPhilip Prindeville2017-09-059-0/+156
| | | | | | | | | Adding V3 and V5 UUIDs per RFC-4122. [kzak@redhat.com: - fix symbols file] Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk wipe testKarel Zak2017-09-011-2/+2
| | | | | | | Now command wipefs returns results in the order how superblocks has been detected on the device. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix readline interaction with signalsKarel Zak2017-08-244-4/+4
| | | | | | | | | | | | | The high-level readline API is crazy to use with signals. Fortunately the library provides low-level rl_callback_* API. In this case we can use poll() to wait for input and control all signals, etc. This patch also a little changes fdisk behavior on CTRL+C and CTRL+D. The signals does not kill fdisk, but forces fdisk to return to the main menu, if already in the main menu then exit. If the disk layout has been modified than ask "Do you really want to exit...". Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'blkid-ubi'Karel Zak2017-08-072-1/+1
|\
| * libblkid: mark UBI as RAIDKarel Zak2017-08-032-1/+1
| | | | | | | | | | | | | | | | | | UBI is volume manager rather than filesystem. Note that libblkid has optimized RAIDs probing (don't search for another filesystems is RAID detected). We also don't search for RAIDs on very small devices, but this optimization is ignored for UBI char devices (size=1byte). Signed-off-by: Karel Zak <kzak@redhat.com>
* | uuidparse: nil uuid have all bits set to zeroSami Kerola2017-08-051-3/+3
|/ | | | | | | | The nil UUID is special form of UUID that is specified to have all 128 bits set to zero. Reference: https://tools.ietf.org/html/rfc4122#section-4.1.7 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libblkid: add support for UBI superblockRafał Miłecki2017-08-032-0/+5
| | | | | | | | | | | | | | | | | | UBI is a volume management system that can be used on a raw flash partition for providing multiple logical volumes. Detecting UBI superblock may be useful for tools wanting to simplify or automate attaching UBI. Please note it's not directly related to the ubifs support which is just a filesystem working on top of UBI volume. In other words: UBI can be used on MTD partition (e.g. /dev/mtdblock0) while ubifs can be used on UBI volume (e.g. /dev/ubi0_0). This patch adds simple code reading UBI version and unique number and setting it in the blkid_probe. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* libfdisk: add --nopartno to mkpart sampleKarel Zak2017-08-012-0/+35
| | | | | | | | * disable dialogs for the mkpart sample * add --nopartno use-case to force libfdisk to use default partno(s) * add test for this feature Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: check sfdisk resize on unsorted offsetsKarel Zak2017-07-192-0/+100
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: support default partno in mkpart-fullspec sampleKarel Zak2017-07-194-0/+130
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: remove UUIDs with time overflow from uuidparseKarel Zak2017-07-182-4/+0Star
| | | | | | | | The time_t used by timeval is "long", it means too small on 32-bits archs to hold large numbers. Reported-by: Ruediger Meier <ruediger.meier@ga-group.nl> Signed-off-by: Karel Zak <kzak@redhat.com>
* test: update PMBR hex dumpsKarel Zak2017-07-174-4/+4
| | | | | | | | | | The commit 8ffa3b651d7e74acba8f1d831b7f68fdb3c66aae has fixed PMBR CHS addresses initialization to be more close to UEFI standard. -000001c0 01 00 ee fe ff ff 01 00 00 00 ff 8f 01 00 00 00 +000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: don't use errno in outputKarel Zak2017-07-124-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master' of https://github.com/pali/util-linuxKarel Zak2017-07-1113-0/+13
|\ | | | | | | | | | | | | | | * 'master' of https://github.com/pali/util-linux: tests: update UDF test, add ID_FS_VERSION libblkid: udf: Add support for ID_FS_VERSION libblkid: udf: Fix types libblkid: udf: De-duplicate code for dstring decoding
| * tests: update UDF test, add ID_FS_VERSIONPali Rohár2017-07-0513-0/+13
| |
* | tests: use sample-fdisk-mkpart-fullspecKarel Zak2017-07-1114-0/+420
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: check for missing programs in last(1) testKarel Zak2017-07-111-0/+3
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: use sample-fdisk-mkpartKarel Zak2017-07-116-0/+124
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: explicitly define wipefs outpuit columnsKarel Zak2017-06-295-15/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update wipefs outputsKarel Zak2017-06-294-16/+10Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'usage-part2' of https://github.com/rudimeier/util-linuxKarel Zak2017-06-264-4/+4
|\ | | | | | | | | | | | | | | | | | | | | * 'usage-part2' of https://github.com/rudimeier/util-linux: misc: cosmetics, remove argument from usage(FILE*) misc: cosmetics, remove argument from usage(int) misc: never use usage(stderr) misc: never use usage(ERROR) misc: cleanup and fix --unknownopt issues flock, getopt: write --help to stdout and return 0 tools: add checkusage.sh
| * flock, getopt: write --help to stdout and return 0Ruediger Meier2017-06-264-4/+4
| | | | | | | | | | | | | | | | | | | | ... and use errtryhelp() instead of usage(). Note in past "getopt --help" returned 2. But it is otherwise documented and was just a mistake IMO. See the unreachable exit(0) which was removed here: d1d03b54 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | uuidparse: add new commandSami Kerola2017-06-263-0/+97
|/ | | | | | | | | | | This command will analyze and print information about UUID's. The command is based on libuuid/src/uuid_time.c but modified to use libsmartcol. [kzak@redhat.com: - minor coding style changes] Reference: http://marc.info/?l=util-linux-ng&m=149735980715600&w=2 Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: Add UDF hdd image which label has length 30 charactersPali Rohár2017-06-222-0/+9
| | | | | | | | | | Structure dstring for label has 32 bytes, first byte is 8 (Compression ID), last byte is 30 (count of 8bit characters in label). Therefore label is not nul terminated and dstring parser needs to handle it (fixed in previous commit). $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-6.img bs=1M count=10 $ mkudffs -l AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -b 512 udf-hdd-mkudffs-1.3-6.img
* Merge branch 'master' of https://github.com/pali/util-linuxKarel Zak2017-06-214-0/+18
|\ | | | | | | | | | | * 'master' of https://github.com/pali/util-linux: tests: Add UDF hdd images with blocksize 1024 and 4096 created by Linux mkudffs 1.3 libblkid: udf: Fix detection of UDF images with block size 1024 and 4096
| * tests: Add UDF hdd images with blocksize 1024 and 4096 created by Linux ↵Pali Rohár2017-06-144-0/+18
| | | | | | | | | | | | | | | | | | | | mkudffs 1.3 $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-4.img bs=1M count=10 $ mkudffs -l Label -b 1024 udf-hdd-mkudffs-1.3-4.img $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-5.img bs=1M count=10 $ mkudffs -l Label -b 4096 udf-hdd-mkudffs-1.3-5.img
* | tests: add MBR resize testsKarel Zak2017-06-195-0/+183
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: split partx in root and non-rootRuediger Meier2017-06-157-16/+43
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: fix and refactor partxRuediger Meier2017-06-152-34/+87
|/ | | | | | | | Subtest delete-non-existent was broken because since 2d47fa39 option --nr was missing. It wasn't noticed because we did not check stderr. Now we check all return values and output. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: POSIX usage dd, regarding unit suffixesRuediger Meier2017-06-142-2/+2
| | | | | | | | | In POSIX we have only 'b' and 'k' (case-sensitive). In the real work, OSX was the only system I've found which does not understand capital 'K'. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add more tests for line(1)Ruediger Meier2017-06-142-4/+43
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: fix fincore, don't use variable COLUMNSRuediger Meier2017-06-141-6/+6
| | | | | | | | | COLUMNS is automatically set by bash and may result in stupid errors like fincore: unknown column: 160 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>