| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This adds 2 new disk type features, one for the whole disk UUID and
another for the per-partition UUID. It adds ped_disk_get_uuid and
ped_partition_get_uuid functions to retrieve them.
It adds them to the JSON output on GPT disklabeled disks as "uuid" in
the disk and partitions sections of the JSON output.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Include the partition type-id and type-uuid in the JSON
output. Also add the the command 'type' to set them. Remove
redundant flags from DosPartitionData and use only the system
variable.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
| |
|
|
|
|
| |
By running make update-copyright
|
|
|
|
|
|
|
| |
When no flag is set on a GPT partition the GUID should fall back to the
filesystem type for fat32, swap, and hfs+ and if no filesystem is found
it should default to linux filesystem data type, showing no filesystem
and no flags.
|
|
|
|
|
|
| |
Keep GUID specific attributes when writing GPT.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This outputs the disk's details as a JSON object. eg. a disk image with
a single partition from 1M to 100M:
{
"disk": {
"path": "/root/disk1.img",
"size": "2097152s",
"model": "",
"transport": "file",
"logical-sector-size": 512,
"physical-sector-size": 512,
"label": "gpt",
"max-partitions": 128,
"partitions": [
{
"number": 0,
"start": "34s",
"end": "2047s",
"size": "2014s",
"type": "free"
},{
"number": 1,
"start": "2048s",
"end": "200703s",
"size": "198656s",
"type": "primary",
"name": "root"
},{
"number": 0,
"start": "200704s",
"end": "2097118s",
"size": "1896415s",
"type": "free"
}
]
}
}
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to pass an empty string in script mode e.g. to
set no partition name (on GPT):
parted -s ./disk.img mklabel gpt mkpart '""' ext2 1 100M
Includes a new test for this feature.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
| |
t1100-busy-label.sh and t1101-busy-partition.sh create and mount VFAT
partitions, so check for both the tools and the kernel support.
Fixes bug#49594.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests need both the file system tools (eg mkfs.vfat) and kernel
support (eg vfat kernel module) to pass.
There are already helpers such as require_fat_ which check for mkfs.vfat,
but if the kernel doesn't support the filesystem then mounting the disk
image will fail.
Add require_filesystem_, which checks for either the filesystem name in
/proc/filesystems (so it's built-in, or already loaded) or if the name
is a valid module (so can be loaded on demand).
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
| |
require_64_bit_ in t-lib-helpers.sh has a hard-coded list of uname
machines that are 64-bit, so add aarch64 and mips64 to cover the major
architectures.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
Previously the whole test would be skipped if either mkfs.hfs or
mkfs.vfat were not installed, leading to missing test coverage. This
change checks for them individually so that the test will run with
either or both of them installed
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
|
|
|
| |
FAT32 needs a minimum partition size of 256MB so this is as small as we
can make it.
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
and clean up the usage a little bit by giving it a proper name and
removing the file when finished.
|
|
|
|
|
|
| |
mkswap gets stuck, in some situations, when operating on a file full of
holes (see https://bugzilla.redhat.com/show_bug.cgi?id=1971877) so work
around that by using /dev/zero instead of /dev/null
|
|
|
|
|
|
|
|
|
| |
Add sun, atari, mac, and pc98 to the disklabels that we test
ped_disk_duplicate on.
aix isn't included because it doesn't support adding partitions.
dvh doesn't support boot partition
loop cannot be partitioned
|
|
|
|
|
|
| |
Increase it from 8MiB to 32MiB and start the first partition at 2048
sector boundary instead of 32 so that no matter the sector size it will
be aligned.
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes fails with:
```
+ mkfs.ext3 /dev/sda15
mke2fs 1.45.5 (07-Jan-2020)
/dev/sda15: Not enough space to build proposed filesystem while setting up superblock
```
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mkfs.ext3 (see version below) was complaining that the filesystem is too small
for a journal, which made the test fail.
```
$ mkfs.ext3 -V
mke2fs 1.45.5 (07-Jan-2020)
Using EXT2FS Library version 1.45.5
```
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
| |
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
| |
By running make update-copyright
|
|
|
|
| |
By running make update-copyright
|
| |
|
| |
|
|
|
|
|
|
|
| |
Use the method other tests use -- test an environment variable.
Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
| |
This makes sure that the resizepart on a busy partition with the size on
the cmdline will work.
|
|
|
|
|
| |
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
| |
|
|
|
|
| |
python2 is EOL on January 1, 2020 so it is time to switch to python3.
|
|
|
|
| |
By running make update-copyright
|
| |
|
|
|
|
| |
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
| |
If mkfs.udf is installed this will test to make sure that the filesystem
is detected.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed for libparted based applications (like Gparted) to correctly
choose MBR id and GPT GUID for UDF filesystem. MBR id for UDF is 0x07 and
GPT GUID is Microsoft Basic Data, see why: https://serverfault.com/a/829172
Without registering a new libparted fs code it is not possible to assign
MBR id or GPT GUID.
Detection of UDF filesystem is done by checking presence of UDF VSD (NSR02
or NSR03 identifier) and UDF AVDP at expected locations (blocks 256, -257,
-1, 512).
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
| |
Newer metadata types use more disk space, causing the test to fail.
|
|
|
|
|
|
| |
Distributions are starting to remove python2 and only use python3.
Modify these test scripts so that they will work with either python 2.7
or python 3.X
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The manual had long documented that negative values are
allowed for both start and end values, but until now negative
start values were rejected if FS-TYPE was not given.
Example:
# parted --script -a optimal /dev/loop0 -- mklabel gpt mkpart primary ext4 -5MiB 100%
(succeeds)
# parted --script -a optimal /dev/loop0 -- mklabel gpt mkpart primary -5MiB 100%
parted: invalid token: -5MiB
Error: Expecting a file system type.
This commit fixes the latter error.
The issue was an insufficient lookahead in command line parsing,
looking only for digits when skipping over FS-TYPE.
The fix is including the minus '-' in the lookahead.
Originally reported as Debian bug #880035:
"parted: fails to use negative start value for 'mkpart' command without specyfying FS-TYPE"
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880035
Signed-off-by: Niklas Hambüchen <mail@nh2.me>
|
|
|
|
|
|
|
|
| |
Loop labels and file images support no flags. set and disk_set
would prompt for a flag and accept any string since the list of
flags was empty, then fail to look up an actual flag value, then
throw an exception with a null string for the name of the flag,
which would bug.
|
|
|
|
|
| |
The test was failing because it didn't wait for the md device
to appear after creating it.
|
|
|
|
| |
After mkpart it needs to wait for the new partition to appear.
|
|
|
|
|
|
|
|
|
| |
On some hardware scsi_debug can take longer to remove. If this fails it
inevitably results in the next test failing since it cannot load
scsi_debug.
Increse the timeout to 40 loops (8 seconds), and if it hits the limit
without succeeding call framework_failure_
|
|
|
|
|
| |
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|