summaryrefslogtreecommitdiff
path: root/tests/expected/sfdisk
Commit message (Collapse)AuthorAgeFilesLines
* libfdisk: (gpt) align size of partition by defaultKarel Zak2022-01-278-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LastUsableLBA (field in GPT header) is calculated to use all free space on the device. The problem is that size of this area is unaligned to optimal I/O (or physical sector size) on devices where the logical sector is 512 bytes, but the physical sector size is 4K. (Note that after LastUsableLBA is backup GPT header and size of this backup is calculated by logical sectors.) The problem is visible for the last partition on the device because this partition ends on LastUsableLBA. The ideal solution would be align directly LastUsableLBA number in the GPT header. Unfortunately, this solution is useless for libfdisk, because we have to be backwardly compatible with sfdisk scripts generated by old versions where is explicitly specified partition size. It seems usable compromise is to align only last partition if the size of the partition is unspecified or specified by relative number (+100M) -- in this case we already align partition, so there is no change in fdisk semantic (well, last partition will be smaller than in previous libfdisk versions). The unaligned partition size is a problem for dm-crypt where device size is used dynamically, and when unaligned, DM uses 512-bytes with a negative impact on performance. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2044108 Addresses: https://marc.info/?l=dm-crypt&m=164306225923513&w=2 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk reorder testKarel Zak2021-07-141-0/+1
| | | | | References: commit f05a5bb2c2e62d3753f8c9262b9f6cbf469e5b0 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update libfdisk JSON outputsKarel Zak2021-05-062-22/+70
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update fdisk dumpsKarel Zak2021-04-084-4216/+192
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk wipe testsKarel Zak2020-10-161-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk test for 4fe7f9b614e2b5bb97f6d89af02acb867cffccc1Karel Zak2020-08-101-0/+26
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: sfdisk fill correctly gaps if default start requestedKarel Zak2020-05-222-0/+54
| | | | | | References: 83fdb880b953164fec7cc603c4ece11cb78762db Addresses: https://github.com/karelzak/util-linux/issues/1044 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: cleanup fdisk based stuffKarel Zak2020-03-2421-100/+100
| | | | | | | * use fdisk --noauto-pt to avoid re-creation of the default architecture specific PT * use more verbose "Created a new" messages in the output Signed-off-by: Karel Zak <kzak@redhat.com>
* sfdisk: fix previous --append patch, improve man pageKarel Zak2020-03-022-2/+2
| | | | | | | | | | | - fix stupid typo (!has_container_or_unused(sf)) - use fdisk_is_partition_used() as fdisk_get_partition() returns nothing for unused partition - update tests - add more hints to the man page Addresses: https://github.com/calamares/calamares/issues/1332 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk --dump testKarel Zak2020-02-104-0/+143
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk dumpsKarel Zak2019-09-164-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: (sfdisk) update move outputKarel Zak2019-09-093-3/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk wipe outputKarel Zak2019-09-052-2/+2
| | | | | | - stderr is used for the warning (like in fdisk) Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: split stdout and stderrKarel Zak2019-08-3037-37/+29
| | | | | | | | | | | | | * add $TS_ERRLOG for script stderr output * add optional $TS_EXPECTED_ERR which points to expected/*/*.err This change allows to keep track about stderr output from our commands (already found bug in sfdisk...). We do not have to depend on fragile stdout vs. stderr order (due to different buffering semantic in different libc, etc.). Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk resizeKarel Zak2018-09-171-1/+1
| | | | | | due to 2f35c1ead621f42f32f7777232568cb03185b473 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update fdisk outputKarel Zak2018-08-3061-0/+70
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk JSON outputKarel Zak2018-04-062-20/+20
| | | | | References: d881b773318dbd3f5ceb58a1e9a560fe0d1ac90a 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>
* tests: check sfdisk resize on unsorted offsetsKarel Zak2017-07-191-0/+72
| | | | 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: explicitly define wipefs outpuit columnsKarel Zak2017-06-294-10/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update wipefs outputsKarel Zak2017-06-294-16/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add MBR resize testsKarel Zak2017-06-194-0/+116
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update wipe-partitionKarel Zak2017-05-101-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: another improvement to the sfdisk wipe testKarel Zak2017-02-201-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: (sfdisk) tell kernel about new partitionKarel Zak2017-02-171-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: use swap in sfdisk wipe testKarel Zak2017-02-161-1/+1
| | | | | | and add "udevadm settle". Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk --wipe and --wipe-partition testsKarel Zak2017-02-154-0/+192
| | | | | | Addresses: https://github.com/karelzak/util-linux/issues/410 Addresses: https://github.com/karelzak/util-linux/issues/411 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk outputKarel Zak2016-11-3046-0/+92
| | | | | | | | | | | The output of the "New situation:" contains Disklabel type: <name> Disk identifier: <removed> lines now. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk script case-insensitive testKarel Zak2016-10-261-0/+21
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add another sfdisk script testsKarel Zak2016-10-257-0/+155
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/367 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk Type= and Id= testKarel Zak2016-10-251-0/+40
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/367 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add GPT attributes parser testsKarel Zak2016-10-255-0/+2226
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/367 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk output stringsKarel Zak2016-09-019-16/+23
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: Fix typo RequiredPartiton -> RequiredPartitionSebastian Rasmussen2016-05-312-1/+1111
| | | | | | | | This typo fix is backwards compatible in that fdisk will accept both the GPT attribute RequiredPartition and RequiredPartiton with the typo. Update documentation and tests to all use the new attribute name. Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
* sfdisk, fdisk: add fflush()Karel Zak2016-03-103-10/+10
| | | | | | | Let's add fflush(stdout) before we print to stderr to make output order more deterministic. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: don't skip case "output undefined"Ruediger Meier2016-03-073-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Treat missing expected files as empty and let the test fail if there is non-empty output. Expected output may be missing in these cases: 1. forgot to commit the file after changing/adding a (sub)test 2. a bug in a test where we do tricks with TS_EXPECTED 3. and most notable if ts_die() is called before a subtest is initialized, e.g. in ts_scsi_debug_init() I always wondered why we don't treat this as FAILED. Now we do so, ts_finalize and ts_gen_diff looks much cleaner now. The change discovers that tests with subtest were ignoring the "non-sub" expected files which had to be fixed. BTW we removed any zero sized files. Moreover now we respect diff's return value. In past all test succeeded when diff was not able to write to diffdir, e.g. when running tests as normal user after they run as root. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: ts_fdisk_clean(), remove optimal iosizeRuediger Meier2016-02-1044-46/+46
| | | | | | | | It's a pity a pity that we have to remove it. In past our test suite could discover a kernel bug (4.4). But now they've changed optimal iosizes on purpose. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: use sfdisk --no-reread wherever it's neededRuediger Meier2016-01-0533-66/+0
| | | | | | | | The first BLKRRPART ioctl causes udev events and then second one may fail, see Discussion http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/11885 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: sfdisk/gpt-reorder, add missing resultsRuediger Meier2015-12-101-0/+45
| | | | | | follow-up 9a17d946 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add sfdisk --move-data testKarel Zak2015-09-093-0/+81
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add JSON sfdisk dumpsKarel Zak2015-06-152-0/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add hexdump from GPTKarel Zak2015-05-111-0/+1105
| | | | | | | | * use hardcoded UUIDs for partitions in sfdisk GPT test * output hexdump of the GPT header (it would be possible to use MD5 sum, but from hexdump it's more obvious where is problem) Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix sfdisk GPT testKarel Zak2015-04-232-3/+3
| | | | | | | The test uses too large last partition, libfdisk checks this problem now. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk resize tests for GPTKarel Zak2015-04-2314-0/+358
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk resize regression tests for MBRKarel Zak2015-04-2215-0/+358
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add old dump for sfdiskKarel Zak2015-04-162-0/+47
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk resize testsKarel Zak2015-04-132-0/+46
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk --dump testKarel Zak2015-03-111-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>