summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: add test for partitionable loop devicesPetr Uzel2011-09-301-0/+1
| | | | | * tests/t8001-loop-blkpg.sh: New file. * tests/Makefile.am: Add test.
* tests: test for the nilfs2 bugJim Meyering2011-09-281-0/+1
| | | | | * tests/t4300-nilfs2-tiny.sh: New test. * tests/Makefile.am (TESTS): Add it.
* gpt: don't abort for a truncated GPT-formatted deviceJim Meyering2011-06-241-0/+1
| | | | | | | | | | | | | | | | | | | This fixes the problem two ways. The first fix (via gpt_alloc) rejects any device that is too small, but it is insufficient. Choose a slightly larger truncated device with an otherwise intact primary GPT header and you can still trigger the failed assertion. To fix it in general, we make _header_is_valid detect the problem. * libparted/labels/gpt.c (gpt_alloc): Reject a device that is so small that there is no room for a single partition. (_header_is_valid): Validate LastUsableLBA here, as well, so that we now reject as invalid any GPT header that specifies a LastUsableLBA larger than the device size. Leave the assertion in _parse_header. * tests/t0203-gpt-tiny-device-abort.sh: Test for this. * tests/Makefile.am (TESTS): Add it. * NEWS: (Bug fixes): Mention it. Reported by Daniel Fandrich in http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10466
* tests: add test for value less than 1Brian C. Lane2011-06-221-0/+1
| | | | | * tests/t9023-value-lt-one.sh: New file. * tests/Makefile.am (TESTS): Add it.
* tests: add test for radius divide by 2 fixBrian C. Lane2011-06-221-0/+1
| | | | | * tests/t9022-one-unit-snap.sh: New file. * tests/Makefile.am (TESTS): Add it.
* tests: remove tests that are too FS-centricJim Meyering2011-05-171-2/+0
| | | | | | * tests/t2100-mkswap.sh: Likewise. * tests/t3000-resize-fs.sh: Remove file, now that all FS-ops are gone. * tests/Makefile.am (TESTS): Remove them here, too.
* tests: write all pairs of partition table typesJim Meyering2011-05-111-1/+2
| | | | | * tests/t9050-partition-table-types.sh: New file. * tests/Makefile.am (TESTS): Add it.
* tests: add a NEWS entry and a test to exercise today's bug fixJim Meyering2011-05-101-1/+2
| | | | | | * tests/t9041-undetected-in-use-16th-partition: New file. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Describe it.
* make parted "do what I say" with IEC start and end values like 5GiBJim Meyering2011-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a command like this, parted -s -- $dev mklabel gpt mkpart P-NAME 4MB -34s parted interprets the "4MB" as merely a suggestion for the starting sector number. It uses half of the MB-units value as a "radius" about the sector containing byte 4,000,000, and it may choose some other more appropriate sector, based on partition table or alignment constraints within the range 3,500,000B..4,500,000B. Before, parted handled IEC units, i.e., KiB, MiB, GiB, etc., with identically "helpful" sloppiness, of course honoring the power-of-two semantics. Now, however if you use IEC units, i.e., KiB, MiB, GiB, etc., the "radius" is taken to be zero, so parted uses precisely whatever multiple of a power of two you've specified. Hence, adjusting the example above to use MiB, rather than "MB", parted -s -- $dev mklabel gpt mkpart P-NAME 4MiB -34s With this change, that is equivalent to the following: parted -s -- $dev mklabel gpt mkpart P-NAME 4194304B -34s I.e., it uses the sector containing precisely that byte, and does not perform any "extra" adjustment. * libparted/unit.c (is_power_of_2): New function. (ped_unit_parse_custom): Use it to avoid interpreting a large input string as "sloppy" (i.e. large radius) when it uses IEC binary notation like 34KiB, 3GiB and 65TiB. * tests/t0207-IEC-binary-notation.sh: New test. * tests/Makefile.am (TESTS): Add it. * doc/parted.texi (unit): Describe the new behavior. * NEWS (Changes in behavior): Mention it here, too.
* tests: test 'parted print' with empty diskPetr Uzel2011-03-161-0/+1
| | | | | | | * tests/t0101-print-empty.sh: New test. * tests/Makefile.am: Add it. Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* tests: rename a test script, before extending it to handle nilfsJim Meyering2011-03-041-1/+1
| | | | | | * tests/t1700-probe-fs.sh: Rename from ... * tests/t1700-ext-probe.sh: ...this. * tests/Makefile.am (TESTS): Rename it here, too.
* tests: remove t-lib.shJim Meyering2010-11-201-1/+1
| | | | | | | * tests/t-lib.sh: Remove file. No longer used. * tests/Makefile.am (EXTRA_DIST): Remove t-lib.sh. * tests/t-lib-helpers.sh: Don't mention this file name. * tests/t-local.sh: Likewise.
* tests: remove test-lib.shJim Meyering2010-11-201-12/+1
| | | | | | | | * tests/test-lib.sh: Remove file. No longer used. * tests/Makefile.am (EXTRA_DIST): Remove test-lib.sh. (old-init.sh): Remove rule and associated uses. * tests/lvm-utils.sh (init_root_dir_): Switch to test_dir_, since that is now the only variable that remains.
* tests: extract t-lib.sh functions for use via init.shJim Meyering2010-11-201-1/+1
| | | | | | | | | | | | | | | Currently there are three test frameworks in use: - test-lib.sh: old, don't use this framework any more; I found it too hard to use and debug. - t-lib.sh: newer, I had converted most tests to use this - init.sh: newest: successor of t-lib.sh, the master copy of which now resides in gnulib. All new tests should use this framework. * tests/t-lib-helpers.sh: New file, extracted from t-lib.sh, so that init.cfg can source these functions, too. * tests/t-lib.sh: Source it. * tests/init.cfg: Source it from here, too. * tests/Makefile.am (EXTRA_DIST): Add t-lib-helpers.sh.
* avoid non-srcdir "make check" failureJim Meyering2010-08-181-1/+2
| | | | | * tests/Makefile.am (EXTRA_DIST): Add init.cfg. The failure was introduced by commit 6f7c0f12.
* libparted: avoid regression when processing a whole-disk FAT partitionJim Meyering2010-07-171-0/+1
| | | | | | | | | | | | | Without this change, we would improperly classify a whole-disk partition containing a FAT file system as a DOS partition table with no partitions. Introduced by commit d732a2b7 on 2008-05-28. * libparted/labels/dos.c (maybe_FAT): New function. (msdos_probe): Use it. Reported by ChenMin in http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10115 * NEWS (Bug fixes): Mention it. * tests/t3400-whole-disk-FAT-partition.sh: New file. Test for the bug. * tests/Makefile.am (TESTS): Add it.
* tests: add one: try to remove a busy partitionOtavio Salvador2010-06-301-0/+1
| | | | | | | | | | | | | | | | This test tries to reproduce the issue reported in Debian bug #582818[1]. 1. http://bugs.debian.org/582818 Basically it does: * create two primary partitions * mount the second one * remove the first (must work) * try to remove the second (must fail) * tests/t1101-busy-partition.sh: new file. * tests/Makefile.am (TESTS): add the new test in check target.
* tests: add one: create 60 partitions on a scsi deviceJim Meyering2010-05-061-1/+3
| | | | | | | | | * tests/t9040-many-partitions.sh: New test. * tests/Makefile.am (TESTS): Add it. (TESTS_ENVIRONMENT): Export AWK to test scripts. Inspired by the report of a many-partition test taking far longer on RHEL5 than on RHEL4 in http://bugzilla.redhat.com/589117
* tests: distribute new file, init.shJim Meyering2010-04-281-1/+1
| | | | * tests/Makefile.am (EXTRA_DIST): Add init.sh.
* tests: add help-version test (from coreutils)Jim Meyering2010-04-281-0/+3
| | | | | | | * tests/help-version: New file * tests/Makefile.am (TESTS_ENVIRONMENT): Pass built_programs and VERSION to test scripts -- both are required by help-version. (TESTS): Add help-version.
* tests: rename generated init.sh to old-init.shJim Meyering2010-04-281-3/+3
| | | | | | | * tests/Makefile.am (old-init.sh): Rename from init.sh. * libparted/tests/Makefile.am: Likewise. * tests/test-lib.sh: Rename sole use. * .gitignore: Rename here, too.
* tests: test all boolean flagsJim Meyering2010-04-281-0/+1
| | | | | * tests/t3310-flags.sh: New test, suggested by Hans De Goede. * tests/Makefile.am (TESTS): Add it.
* tests: test for new 2-sector minimum ext-logical-separationJim Meyering2010-04-231-0/+1
| | | | | * tests/t2310-dos-extended-2-sector-min-offset.sh: New file. * tests/Makefile.am (TESTS): Add it.
* tests: test for palo and prep interactionJim Meyering2010-04-211-0/+1
| | | | | * tests/t3300-palo-prep.sh: New file. * tests/Makefile.am (TESTS): Add it.
* tests: distribute a few more tests and documentation filesColin Watson2010-03-301-0/+1
| | | | | | | * debug/test/Makefile.am (noinst_SCRIPTS): Add test_fs_hfs and test_fs_hfsplus. * libparted/fs/hfs/Makefile.am (EXTRA_DIST): Add DOC and HISTORY. * tests/Makefile.am (TESTS): Add t3200-type-change.sh.
* tests: exercise today's HFS partition type fixJim Meyering2010-02-261-0/+1
| | | | | | * tests/t2400-dos-hfs-partition-type.sh: New script. * tests/Makefile.am: Add it. * NEWS (Bug fixes): Mention it.
* tests: convert t4001 to use the new frameworkJim Meyering2010-02-251-0/+1
| | | | | * tests/t4001-sun-vtoc.sh: Convert. * tests/Makefile.am (TESTS): Add it to the list.
* tests: wrap the dup-clobber test in a script, ...Jim Meyering2010-02-251-1/+1
| | | | | | | so that its artifacts are created in the usual temporary subdir * tests/Makefile.am (TESTS): Remove dup-clobber, and instead... Add t0500-dup-clobber.sh. * tests/t0500-dup-clobber.sh: New script.
* tests: test for the ped_disk_duplicate needs_clobber fixJim Meyering2010-02-231-1/+2
| | | | | | | * tests/dup-clobber.c: New file. Exercise the fix in commit jabb411b, "libparted: copy the needs_clobber value in ped_disk_duplicate()". * tests/Makefile.am (TESTS, check_PROGRAMS): Add dup-clobber.
* gpt: "read-only" operation could clobber the pMBR in another wayJim Meyering2010-02-101-0/+1
| | | | | | | | | | | A read-only operation like "parted $dev print" would overwrite $dev's pMBR when exactly one of the primary and backup tables was corrupt. * libparted/labels/gpt.c (gpt_read): Clear "write_back" in those two cases. Hans De Goede spotted this bug by inspection. * NEWS (Bug fixes): Mention it. * tests/t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh: New test. * tests/Makefile.am (TESTS): Add t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh.
* gpt: read-only operation could clobber MBR part of hybrid GPT+MBR tableJim Meyering2010-02-091-0/+1
| | | | | | | | | | | * libparted/labels/gpt.c (gpt_read): Fix a bug introduced by me in commit 7f753b1b, "gpt: rewrite GPT header-reading code". Set write_back=0 in one more code path. * tests/Makefile.am (TESTS): Add t0205-gpt-list-clobbers-pmbr.sh. * tests/t0205-gpt-list-clobbers-pmbr.sh: New test. * NEWS (Bug fixes): Mention this. Reported by aix27249 in http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/250
* tests: exercise the new interfacesJim Meyering2009-12-081-1/+2
| | | | | | | * tests/print-max.c: New file. * tests/t9021-maxima.sh: New file. * tests/Makefile.am (TESTS): Add t9021-maxima.sh. (check_PROGRAMS): Add print-max.
* tests: exercise new align-check commandJim Meyering2009-11-301-1/+2
| | | | | * tests/t9030-align-check.sh: New file. * tests/Makefile.am (TESTS): Add it.
* tests: indicate that we expect t3200-type-change to fail, for nowJim Meyering2009-11-261-1/+3
| | | | | * tests/Makefile.am (TESTS): Move t3200-type-change.sh to ... (XFAIL_TESTS): ...here.
* test for partition-type-changing bugJim Meyering2009-11-171-0/+1
| | | | | * tests/t3200-type-change.sh: New file. * tests/Makefile.am (TESTS): Add it.
* gpt_probe: don't attempt to read beyond end of a very small diskJim Meyering2009-11-131-0/+1
| | | | | | | | | | * libparted/labels/gpt.c (gpt_probe): Don't try to read the 2nd sector if that's beyond the end of the disk. * tests/t0001-tiny.sh: New test, to expose the above boundary-case bug. Part of the msdos-partition-creation process involves probing for other types of partition tables. Probing for gpt would evoke a nonsensical diagnostic. * tests/Makefile.am (TESTS): Add t0001-tiny.sh.
* tests: enable the FS-resizing (tests only HFS and FAT)Jim Meyering2009-11-061-0/+1
| | | | * tests/Makefile.am (TESTS): Add t3000-resize-fs.sh.
* tests: distribute new files, t-local.sh and t-lvm.shJim Meyering2009-11-031-1/+1
| | | | * tests/Makefile.am (EXTRA_DIST): Add t-local.sh and t-lvm.sh.
* tests: test the new alignment functionsJim Meyering2009-11-031-1/+2
| | | | | * tests/t9020-alignment.sh: New test. * tests/Makefile.am (TESTS): Add it to the list.
* tests: add a helper program to print alignment info for a deviceJim Meyering2009-11-021-0/+8
| | | | | | | | * tests/print-align.c: New file. * tests/Makefile.am (check_PROGRAMS): Define. (AM_CPPFLAGS, LDADD): Define. (AM_CFLAGS): Enable warnings here, too, by adding $(WARN_CFLAGS) and $(WERROR_CFLAGS).
* tests: remove tests that are too FS-centricJim Meyering2009-10-281-5/+0
| | | | | | | | | * tests/t1000-mkpartfs.sh: Remove file. * tests/t1500-small-ext2.sh: Likewise. * tests/t2000-mkfs.sh: Likewise. * tests/t3100-resize-ext2-partion.sh: Likewise. * tests/t3000-constraints.sh: Likewise. * tests/Makefile.am (TESTS): Remove them here, too.
* tests: hook up new GPT-crc-corrupting scriptJim Meyering2009-10-231-0/+1
| | | | | | | | * tests/Makefile.am (TESTS): Add t0280-gpt-corrupt.sh. * libparted/labels/gpt.c (gpt_read): Change diagnostic to say that the PTE CRC mismatch is in the primary table. * tests/t0280-gpt-corrupt.sh: Tweak diagnostic to match what the code now prints.
* tests: use scsi_debug to test-for 4k-sector-specific bugJim Meyering2009-10-191-1/+2
| | | | | | | | | * tests/t9010-big-sector.sh: New root-only test. Requires 2.6.31, and the scsi_debug module, /sys/block/... support and an upcoming version of libblkid. * tests/Makefile.am (TESTS): Add t9010-big-sector.sh. Thanks to Mike Snitzer for advice and for pointing me to similar code he wrote to test LVM.
* tests: begin the transition to coreutils' testing frameworkJim Meyering2009-10-191-8/+43
| | | | | | | | The existing testing framework makes it hard to diagnose test failures, so I'm switching to one that works better for me, from coreutils. * tests/t-lib.sh: New file. Mostly from coreutils/tests/test-lib.sh. * tests/Makefile.am (TMPDIR): Update to pass more info to test scripts. (EXTRA_DIST): Add t-lib.sh.
* tests: gpt: exercise creating all partition types; check for msftres bugJim Meyering2009-09-241-0/+1
| | | | | | | | Ensure that a newly-created partition in a GPT partition table has no 'flag' set, by default. This test also exercises setting the "name" on a partition and creates one partition of each supported type. * tests/t0220-gpt-msftres.sh: New file. * tests/Makefile.am (TESTS): Add that new file.
* ui: do not initialize readline (which would output!) in --script modeJim Meyering2009-09-241-0/+1
| | | | | | | | | | | | | | | Running parted with its --script (-s) option would, surprisingly, print a few control characters if TERM were set appropriately, and if readline and curses support were compiled in. This fixes it not to do that. * parted/parted.c (_init): Initialize readline support only after parsing command line options, so we can skip it in --script mode. * parted/ui.c (init_readline): New function. Body extracted from ... (init_ui): ...here. * parted/ui.h (init_readline): Declare. * tests/t0010-script-no-ctrl-chars.sh: New file. Test for the above. * tests/Makefile.am (TESTS): Add that new file.
* loop: don't infloopJim Meyering2009-09-181-0/+1
| | | | | | | | | Correct a bug introduced in commit 52815877, 2007-06-15, "Make loop_probe and loop_clobber work with sector_size > 512, too." * libparted/labels/loop.c (loop_clobber): Initialize "i" before the loop, not inside it. * tests/t0400-loop-clobber-infloop.sh: Test for this. * tests/Makefile.am (TESTS): Add it.
* test for the bootcode-in-extended-partition fixPetr Uzel2009-08-211-0/+1
| | | | | | | * tests/t2300-dos-label-extended-bootcode.sh: New file. * tests/Makefile.am (TESTS): Add t2300-dos-label-extended-bootcode.sh. Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* Remove unneeded test.Joel Granados Moreno2009-08-211-1/+0
| | | | | | | | | This test made sure that "md" was ignored when doing partition specific actions. We have added code that allows this scan once more, therefore the test is no longer needed. * tests/t6001-dm-ignoremd.sh: Remove file. * tests/Makefile.am: Remove the test file from the list of tests.
* tests: add infrastructure: when skipping a test, say whyJim Meyering2009-07-241-4/+7
| | | | | | * tests/Makefile.am (TESTS_ENVIRONMENT): Arrange for the first line of 'skip_test_'s argument to be printed on stderr. * tests/test-lib.sh (skip_test_): New function.