[parted-devel] [PATCH] tests: Add udevadm settle to wait_for_ loop (#1260664)

Brian C. Lane bcl at redhat.com
Tue Apr 12 20:58:30 UTC 2016


On Sun, Apr 10, 2016 at 08:58:10PM -0400, Phillip Susi wrote:
> On 03/01/2016 04:45 PM, Brian C. Lane wrote:
> > Sometimes the device will vanish after the wait_for_dev_to_appear
> > exits. Add udevadm settle in an attempt to make sure the udev
> > system is done flapping around and the device will stay in place.
> > 
> > Related: rhbz#1260664 --- tests/t-lib-helpers.sh            | 2 ++ 
> > tests/t-local.sh                  | 2 ++ tests/t6001-psep.sh
> > | 2 ++ tests/t6004-dm-many-partitions.sh | 1 + 
> > tests/t6005-dm-uuid.sh            | 2 ++ 
> > tests/t6100-mdraid-partitions.sh  | 1 + 6 files changed, 10
> > insertions(+)
> 
> Why add the require_udevadm_settle to these 4 specific tests?  Other
> tests call wait_for_dev_to_appear.  Don't they need it to?  Shouldn't
> the require be added to t-lib-helpers or somesuch to require it for
> all tests that call wait_for_dev_to_appear?

The other users already pull it in via require_scsi_debug_module_,
although it looks like I missed t6004 somehow, it needs it as well.

There's no way to add a generic check to t-lib-helpers, since we want to
skip tests early if it isn't available.

Although the other option is to made the settle a library call, and if
udevadm isn't available have it be a noop instead of skip. I'm not sure
if there are any distributions using parted that don't use udev though,
so that might be completely pointless.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)



More information about the parted-devel mailing list