On 1/21/19 12:15 PM, Richard W.M. Jones wrote:
Test the partition filter against real life partition tables created by sfdisk. --- tests/test-partition.c | 101 --------------------------- README | 2 + tests/Makefile.am | 7 +- tests/test-partition.sh | 148 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+), 106 deletions(-)
Looks good (any new testing is better than the lack of testing beforehand). That said,
+test dos 6 <<'EOF' +2048 2047 L - +4096 4095 L - +8192 8191 L - +16384 16383 E - +17000 999 L - +18000 999 L - +EOF +
Can sfdisk be convinced to write logical partitions out-of-order, which would catch our current refusal to read non-ascending partitions (and/or prove that any loop-detection code we add to allow non-ascending partitions works), as a future enhancement to the test? And I don't see any test of an extended partition in anything other than primary partition 4, even though sfdisk handles that. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org