btrfs-progs/tests/mkfs-tests
Qu Wenruo 005d2cc047 btrfs-progs: tests: mkfs/005: use udevadm settle to avoid false alerts
[BUG]
During my test runs of mkfs-tests, 005-long-device-name-for-ssd failed
with the following error messages:

  ====== RUN CHECK dmsetup remove btrfs-test-with-very-long-name-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQPGc
  device-mapper: remove ioctl on btrfs-test-with-very-long-name-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQPGc  failed: Device or resource busy
  Command failed.
  failed: dmsetup remove btrfs-test-with-very-long-name-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQPGc
  test failed for case 005-long-device-name-for-ssd

[CAUSE]
There seems to be a race between "btrfs inspect dump-super" and the
dmsetup removal.

[FIX]
Add a "udevadm settle" before removing the dm devices.

Also since we're here, use the same "udevadm settle" instead of the
manual sleep to wait for the new dm device to show up.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-23 19:36:31 +02:00
..
001-basic-profiles btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
002-no-force-mixed-on-small-volume btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
003-mixed-with-wrong-nodesize btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
004-rootdir-keeps-size btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
005-long-device-name-for-ssd btrfs-progs: tests: mkfs/005: use udevadm settle to avoid false alerts 2023-08-23 19:36:31 +02:00
006-partitioned-loopdev btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
007-mix-nodesize-sectorsize btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
008-sectorsize-nodesize-combination btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
009-special-files-for-rootdir btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
010-minimal-size btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
011-rootdir-create-file btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
012-rootdir-no-shrink btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
013-reserved-1M-for-single btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
014-rootdir-inline-extent btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
015-fstree-uuid-otime btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
016-rootdir-bad-symbolic-link btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
017-small-backing-size-thin-provision-device btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
018-multidevice-overflow btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
019-basic-checksums-mkfs btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
020-basic-checksums-mount btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
021-rfeatures-quota-rootdir btrfs-progs: tests: mkfs/021: update to use -O instead of deprecated -R 2023-05-26 18:02:27 +02:00
022-rootdir-size btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
023-free-space-tree btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
024-fst-bitmaps btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
025-zoned-parallel btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
026-extent-tree-to-bgt btrfs-progs: tune: rename bgt conversion options 2023-04-27 14:23:52 +02:00