[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
loop-related regression on Fedora 16
From: |
Jim Meyering |
Subject: |
loop-related regression on Fedora 16 |
Date: |
Wed, 21 Dec 2011 19:30:43 +0100 |
On Fedora 16 (3.1.5-6.fc16.x86_64), the two t8000*loop.sh tests have
been failing for some time. I've finally investigated and found it is
due to this:
_disk_sync_part_table returns 0 because "lpn" below is 0 for a loop device:
(indicating non-partitionable device)
static int
_disk_sync_part_table (PedDisk* disk)
{
PED_ASSERT(disk != NULL);
PED_ASSERT(disk->dev != NULL);
int lpn;
unsigned int part_range = _device_get_partition_range(disk->dev);
/* lpn = largest partition number. */
if (ped_disk_get_max_supported_partition_count(disk, &lpn))
lpn = PED_MIN(lpn, part_range);
else
lpn = part_range;
/* Its not possible to support largest_partnum < 0.
* largest_partnum == 0 would mean does not support partitions.
* */
if (lpn < 1)
return 0;
That makes parted exit nonzero, but with no diagnostic. Oops.
That's two bugs. Failing at all, and failing with no diagnostic.
That function has three other return points that lack a diagnostic,
but they're all for heap allocation failure.
This looks like a regression over parted-3.0, though it may well
be due to changes in the kernel.
A simple test:
truncate -s10m a && t=$(losetup --show -f a) \
&& { parted -s $t mklabel gpt && echo ok || echo FAIL; }
losetup -d $t
With parted-3.0, that prints ok.
With parted built from git, it prints FAIL.
I get the same results when using rawhide's 3.2.0-0.rc6.git2.1.fc17.x86_64
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- loop-related regression on Fedora 16,
Jim Meyering <=