| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* libparted/tests/Makefile.am (init.sh): Quote, in case
$(abs_top_srcdir) contains e.g., spaces.
* tests/Makefile.am (init.sh): Likewise.
* libparted/tests/t2000-disk.sh: Better quoting here, too.
* libparted/tests/t1000-label.sh: Likewise.
Reported by Joel Granados
|
|
|
|
|
| |
* tests/t0202-gpt-pmbr.sh: Ensure that the first 446 bytes are
unchanged after creating a GPT partition.
|
|
|
|
|
|
|
| |
* libparted/fs/linux_swap/linux_swap.c: Generate a UUID when creating a
fresh swap space.
* tests/t2100-mkswap.sh: Test that two fresh swap spaces get different
UUIDs, and that 'check' preserves the swap UUID.
|
|
|
|
|
|
| |
* tests/t6001-dm-ignoremd.sh (md_dev_create_): Use functions in
test-util.sh for mdadm commands. Move mddev_ to the top of the
file. Remove unneeded comment.
|
|
|
|
|
| |
* tests/test-lib.sh (require_mdadm_): New function.
(mdadm_create_linear_device_): New function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When ped_exception_throw requires input from the user and there are
leftover strings in the command line, there is an "invalid token" error
from parted. This happens because the ped_exception expects some input
that is, most likely, different from the leftover string(s). To address
this, one must make sure that all the argument strings are parsed before
invoking any exception that requires input.
* parted/parted.c (do_mklabel): Call command_line_get_disk_type call
before the disk checks (_disk_warn_loss will call ped_exception_throw).
* tests/t0000-basic.sh: Adjust, now that the output need not include
the error message.
|
|
|
|
|
| |
* tests/t6001-dm-ignored.sh: New test file.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
| |
* tests/t4100-msdos-starting-sector.sh: Use parted's -m option
when printing, and adjust expected output to match.
Filter out "Disk...:" part to avoid false-positive failures due
to mount-point- related differences.
|
|
|
|
|
| |
* tests/t4100-msdos-starting-sector.sh : Make sure we are consistent
when displaying starting sector for msdos lables.
|
|
|
|
|
|
| |
* parted/table.c (table_render_row): Don't append trailing spaces
or delimiter after final field, and trim any other trailing spaces.
* tests/t5000-tags.sh: Remove trailing spaces from expected output.
|
|
|
|
|
| |
* tests/t0201-gpt.sh: New file.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
| |
* tests/t0200-gpt.sh: New file.
* tests/Makefile.am (TESTS): Add the new test.
|
|
|
|
|
| |
* test-lib.sh (compare): Define "compare" as a function, not a variable.
* tests/t*.sh: use "compare", not "$compare"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/188
* libparted/fs/ext2/ext2_fs.h (EXT4_FEATURE_RO_COMPAT_HUGE_FILE,
EXT4_FEATURE_RO_COMPAT_DIR_NLINK, EXT4_FEATURE_INCOMPAT_EXTENTS,
EXT4_FEATURE_INCOMPAT_64BIT): New constants.
* libparted/fs/ext2/interface.c (_ext2_generic_probe): Ext4 file systems
will have EXT4_FEATURE_* bits set, while Ext3 will not.
(_ext2_probe, _ext3_probe): Pass 2 and 3 respectively, instead of 0 and 1,
to _ext2_generic_probe.
(_ext4_probe): New function.
(_ext4_ops, _ext4_type): New structures.
(ped_file_system_ext2_init): Register Ext4 file system type.
(ped_file_system_ext2_done): Likewise.
* tests/Makefile.am (TESTS): Add t1700-ext-probe.sh.
* tests/t1700-ext-probe.sh: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables RAID as a supported partition type on Sun disk
layouts, commonly found/used on SPARC hardware. It has been tested
on Aurora SPARC Linux (and Fedora SPARC). I have no idea if Solaris
supports Software RAID or not...
Along with the code change, I wrote a test case that checks if the
RAID partition type is supported on sun disk labels.
* libparted/labels/sun.c [_SunPartitionData] (is_raid): New member.
(sun_read): Initialize the ->is_raid member.
(sun_partition_new): Clear is_raid, like all the other members.
(sun_partition_duplicate): Propagate the is_raid member.
(sun_partition_set_system): Make sun_data->type reflect is_raid.
(sun_partition_set_flag): Also initialize ->is_raid.
(sun_partition_get_flag): Handle PED_PARTITION_RAID.
(sun_partition_is_flag_available): Likewise.
* tests/t4000-sun-raid-type.sh: New file.
* tests/Makefile.am (TESTS): Add t4000-sun-raid-type.sh.
|
|
|
|
|
|
|
| |
This also checks for the current behavior when trying to partition
a device that may not be partitioned, like loop devices.
* tests/Makefile.am (TESTS): Add tests/t8000-loop.sh.
* tests/t8000-loop.sh: New file. Test for the above fix.
|
|
|
|
|
|
|
|
|
| |
* tests/t4200-partprobe.sh: New file. Test for today's fix.
* tests/Makefile.am (TESTS): Add t4200-partprobe.sh.
(init.sh): Now that we test partprobe,
add $(abs_top_builddir)/partprobe to PATH.
* tests/test-lib.sh: Honor new dvhtool_required_ variable.
Based on a reproducer from Petr Uzel.
|
|
|
|
| |
* tests/t3000-constraints.sh: Adapt to changed output syntax.
|
|
|
|
|
| |
* tests/t7000-scripting.sh: Use a loop rather than
two copies of each of 7 tests.
|
|
|
|
|
| |
* tests/t7000-scripting.sh: same as in e.g., t3000-constraints.sh.
Use the same name for all output files, "out", not "out1".
|
|
|
|
| |
* tests/t7000-scripting.sh: and avoid some duplication
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To: parted-devel@lists.alioth.debian.org
Date: Fri, 20 Jun 2008 11:37:41 +0200
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on rho.meyering.net
X-Spam-Level:
X-Spam-Status: No, score=-13.8 required=3.2 tests=AWL,BAYES_00,
RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.5
In scripting mode, parted used to ask the user for confirmation
when the values to be used where not the ones specified by the user.
* parted/parted.c (do_mkpart, do_mkpartfs): if opt_script_mode is.
set fail, if it's not, warn and ask for intervention.
* tests/Makefile.am : include the new test in the TEST list.
* tests/t7000-scripting.sh : Distribute new test case.
|
|
|
|
|
|
| |
* configure.ac: Revamp test; also set ENABLE_DEVICE_MAPPER shell var.
* tests/Makefile.am (ENABLE_DEVICE_MAPPER): Propagate to tests.
* tests/t6000-dm.sh: Skip all tests w/o device-mapper support.
|
| |
|
|
|
|
|
|
| |
* tests/test-lib.sh: s/dm-utils.sh/lvm-utils.sh/
* tests/dm-utils.sh: Rename this...
* tests/lvm-utils.sh: ...to this.
|
|
|
|
|
| |
* test-lib.sh: add quotes to protect against $abs_top_srcdir containing
shell meta-characters
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-lib.sh: Source init.sh early.
Use $test_dir_rand_, as done in LVM test framework.
Source lvm-utils.sh _after_ defining test_dir_rand_.
* tests/Makefile.am (init.sh): Don't emit code to source test-lib.sh,
since each test now sources that file directly.
* tests/t0000-basic.sh: Source test-lib.sh, not init.sh.
Default srcdir=. in each test, so it may be run independently of "make".
* tests/t0100-print.sh: Likewise.
* tests/t1000-mkpartfs.sh: Likewise.
* tests/t1100-busy-label.sh: Likewise.
* tests/t1500-small-ext2.sh: Likewise.
* tests/t2000-mkfs.sh: Likewise.
* tests/t2100-mkswap.sh: Likewise.
* tests/t2200-dos-label-recog.sh: Likewise.
* tests/t3000-constraints.sh: Likewise.
* tests/t3100-resize-ext2-partion.sh: Likewise.
* tests/t4100-dvh-partition-limits.sh: Likewise.
* tests/t4100-msdos-partition-limits.sh: Likewise.
* tests/t5000-tags.sh: Likewise.
* tests/t6000-dm.sh: Likewise.
* tests/Makefile.am (TESTS_ENVIRONMENT): Pass srcdir to tests.
|
| |
|
|
|
|
|
|
|
| |
* tests/dm-utils.sh: New file. Copied from lvm's tests/lvm-utils.sh.
* tests/t6000-dm.sh: New file.
* tests/test-lib.sh: FIXME
* tests/Makefile.am: FIXME
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add mktempd.
* tests/test-lib.sh: Use build-aux/mktempd, not mkdtemp.
* tests/mkdtemp: Remove file.
* tests/Makefile.am (EXTRA_DIST): Remove mkdtemp.
|
|
|
|
|
| |
* tests/t2200-dos-label-recog.sh: New file.
* tests/Makefile.am (TESTS): Add t2200-dos-label-recog.sh.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libparted/disk.c (_check_partition): Enforce the 32-bit limitation
on a partition's starting sector number and length (in sectors).
With the usual 512-byte sector size, this limits the maximum
partition size to just under 2TB.
(_partition_max_start, _partition_max_len): New functions.
(_check_partition): Use them.
* tests/t4100-msdos-partition-limits.sh: New file. Test vs. msdos.
* tests/t4100-dvh-partition-limits.sh: New file. Test vs. dvh.
* tests/Makefile.am (TESTS): Add t4100-msdos-partition-limits.sh
and t4100-dvh-partition-limits.sh.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libparted/labels/bsd.c (bsd_partition_set_system): Include "misc.h".
Use is_linux_swap to test whether the type string matches.
* libparted/labels/dasd.c (dasd_read, dasd_partition_set_system): Likewise.
* libparted/labels/dos.c (msdos_partition_set_system): Likewise.
* libparted/labels/mac.c (mac_partition_set_system): Likewise.
* libparted/labels/rdb.c (amiga_partition_set_system): Likewise.
* libparted/labels/sun.c (sun_partition_set_system): Likewise.
Based on a patch by Kenneth MacDonald, from
<http://lists.gnu.org/archive/html/bug-parted/2007-07/msg00012.html>.
* libparted/labels/misc.h (is_linux_swap): New function/file.
* libparted/labels/Makefile.am (liblabels_la_SOURCES): Add misc.h.
* tests/t2100-mkswap.sh: New file, test for the above fix.
* tests/Makefile.am (TESTS): Add t2100-mkswap.sh.
|
|
|
|
|
| |
* tests/t0100-print.sh (msdos_magic): Use more-portable octal escapes,
not hexadecimal ones.
|
| |
|
|
|
|
| |
resize-ext2-partion.sh, now that this bug is fixed.
|
|
|
|
|
| |
Overwrite the label creating a 4KB file; 1KB was too small and would
trigger the failure. Reported by Bob Proulx.
|
|
|
|
| |
Signed-off-by: Jim Meyering <jim@meyering.net>
|
|
|
|
|
|
|
|
|
|
|
| |
mkfs would fail for certain sizes resulting in a final block-group
that was too small to accommodate the minimum number of admin blocks.
There was already work-around code for when a decremented "numgroups"
was 1. This change applies that work-around code for larger values of
numgroups, too. Also, there was an off-by-one error in the guard test
that would allow a few too-small partition sizes to slip through and
provoke the error (see tests/t2000-mkfs.sh for two examples).
This change fixes that, too.
|
|
|
|
|
| |
t1100-busy-label.sh: Remove extra copy of "o2" temporary file name.
test-lib.sh (emit_superuser_warning): Exit successfully when run as root, too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run this:
dev=F
dd if=/dev/null of=$dev bs=1 seek=20M
./parted -s $dev mklabel gpt
./parted -s $dev mkpartfs primary ext2 0 16796160B
It fails with this diagnostic:
Error: Attempt to write sectors 32772-32773 outside of partition on /t/F.
But if you choose a size that's one byte smaller, it works:
./parted -s $dev mkpartfs primary ext2 0 16796159B
The difference is in how ext2_mkfs_write_meta computes
the number of block groups. In the former case, it computes
numgroups = 3. In the latter, numgroups = 2.
The trouble with the first case is that there isn't enough
space for 3 full block groups in a file system of that size.
Hence the eventual attempt to write beyond the initially-
established end-of-file-system mark.
|
|
|
|
|
|
|
|
| |
This changes the tests to create sparse files for some test inputs
rather than zero-filled non-sparse ones. Doing this cuts more than 50% off
the run time of "make check" in the tests/ directory.
Signed-off-by: Jim Meyering <jim@meyering.net>
|
|
|
|
|
|
|
|
|
| |
This patch is based on the change from Matt Davis:
http://thread.gmane.org/gmane.comp.gnu.parted.devel/1695/focus=1704
Demonstrate an ext2-resize failure in parted-1.8.7, based on the report in
http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/22
|
|
|
|
|
|
|
|
|
|
| |
* parted/parted.c (do_print): Use separate variables for the header
and for individual rows. Free each when done.
* parted/table.c (table_add_row_from_strlist): Insert a newly
allocated copy of each string, so that the caller can free
the argument corresponding to the "list" parameter.
* tests/t0100-print.sh: New test for this.
* tests/Makefile.am (TESTS): Add t0100-print.sh.
|
|
|
|
|
|
|
|
|
| |
* tests/t3000-constraints.sh (emit_superuser_warning): Move this
function to...
* tests/test-lib.sh (emit_superuser_warning): ...here.
* tests/t0000-basic.sh: Use the function instead of open-coding it.
Signed-off-by: Jim Meyering <jim@meyering.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with diffs like this:
-/home/xeos/projects/parted/parted/.libs/lt-parted: invalid token: msdos
+parted: invalid token: msdos
Here's the patch I expect to apply.
It also removes an inter-part dependency by moving the creation
of the "o2" temporary file into the test where it's used.
Some of this duplication should be factored out, eventually...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This started because I objected to parted failing with no diagnostic
when given an invalid file system type:
$ /sbin/parted -s $dev mklabel loop mkpartfs hfsplus 0 1.4
WARNING: You are not superuser. Watch out for permissions.
[Exit 1]
With the changes below, it does this:
$ ./parted -s $dev mklabel loop mkpartfs hfsplus 0 1.4
./parted: invalid token: hfsplus
[Exit 1]
The following may look like a simple change, but looks are deceptive...
For example, if you try to diagnose via ped_exception_throw instead
of "error", you'll find that the mere fact of diagnosing the problem
introduces new ones because of how the exception handler manipulates the
global command line buffer containing the token we're complaining about.
But this isn't library code, so using error() is fine.
Diagnose invalid command arguments.
When a command argument doesn't match the expected candidate values,
parted would silently exit (in script mode) or simply act as if that
value and any following ones had not been specified (in interactive
mode). With this change, it complains about the "invalid token",
and in script mode (where there hasn't been a prompt to give context)
sometimes tells what type of token it was expecting.
* parted/ui.c: Include "error.h".
(command_line_get_word): If the user's "token" wasn't a good enough
match, give a diagnostic. In script mode, return NULL so that the
callers can give additional information.
* tests/t2000-mkfs.sh: New test for the above.
* tests/t0000-basic.sh: Expect the new diagnostic when "msdos" is
treated as an unrecognized first token after "mklabel". This happens
when trying to label a disk that already has a label.
* tests/t1100-busy-label.sh: Likewise.
|