Description of problem: Test fails sometimes with: /sbin/swapoff -L swapit psock_read_event: 0x26d2010 g->state = 3, fd = 3, events = 0x1 roc 175 (swapoff_label) took 0.07 seconds sock_read_event: 0x26d2010 g->state = 3, fd = 3, events = 0x1 sock_write_event: 0x26d2010 g->state = 3, fd = 3, events = 0x2 sock_write_event: writing 40 bytes ... sock_write_event: wrote 40 bytes sock_write_event: done writing, calling send_cb sock_read_event: 0x26d2010 g->state = 3, fd = 3, events = 0x1 proc 85 (zero) took 0.03 seconds sock_read_event: 0x26d2010 g->state = 3, fd = 3, events = 0x1 sock_write_event: 0x26d2010 g->state = 3, fd = 3, events = 0x2 sock_write_event: writing 40 bytes ... sock_write_event: wrote 40 bytes sock_write_event: done writing, calling send_cb /sbin/blockdev --rereadpt /dev/sdb guestfsd: error: /sbin/blockdev: BLKRRPART: Device or resource busy proc 65 (blockdev_rereadpt) took 0.09 seconds sock_read_event: 0x26d2010 g->state = 3, fd = 3, events = 0x1 sock_read_event: 0x26d2010 g->state = 3, fd = 3, events = 0x1 /sbin/blockdev: BLKRRPART: Device or resource busy test_swapon_label_0 FAILED The proximate cause is this commit: http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=8eb7f1a58f424ad0f210fe638574b5067d2ac97b However the underlying reason is that the swapoff operation doesn't finish before the BLKRRPART ioctl is performed. In the past we have sometimes seen good effects by adding calls to udev_settle() at places in the code, although we don't know if that works just by luck/timing.
This bug has just reappeared in the build.
I added this which hopefully will fix the problem: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=9d158c3ab132df21d58890f18224cd2fe020de67
libguestfs-1.2.6-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/libguestfs-1.2.6-1.fc13
libguestfs-1.2.7-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/libguestfs-1.2.7-1.fc12
libguestfs-1.2.7-1.el5 has been submitted as an update for Fedora EPEL 5. http://admin.fedoraproject.org/updates/libguestfs-1.2.7-1.el5
libguestfs-1.2.7-2.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/libguestfs-1.2.7-2.fc13
libguestfs-1.2.7-2.fc13.1 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/libguestfs-1.2.7-2.fc13.1