diff options
author | Kay Sievers <kay@vrfy.org> | 2014-04-12 22:35:50 -0700 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2014-04-13 17:12:14 -0700 |
commit | 9ea28c55a2488e6cd4a44ac5786f12b71ad5bc9f (patch) | |
tree | 3aeccb80e1b72169b8bc4836b5a6d1a76130ebe3 /src/test | |
parent | a163b64c4b08e8a4ad39a9a295acf3d1634024a3 (diff) |
udev: remove seqnum API and all assumptions about seqnums
The way the kernel namespaces have been implemented breaks assumptions
udev made regarding uevent sequence numbers. Creating devices in a
namespace "steals" uevents and its sequence numbers from the host. It
confuses the "udevadmin settle" logic, which might block until util a
timeout is reached, even when no uevent is pending.
Remove any assumptions about sequence numbers and deprecate libudev's
API exposing these numbers; none of that can reliably be used anymore
when namespaces are involved.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-libudev.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c index c233b1ea1d..f5c8bc768d 100644 --- a/src/test/test-libudev.c +++ b/src/test/test-libudev.c @@ -303,38 +303,14 @@ out: static int test_queue(struct udev *udev) { struct udev_queue *udev_queue; - unsigned long long int seqnum; - struct udev_list_entry *list_entry; udev_queue = udev_queue_new(udev); if (udev_queue == NULL) return -1; - seqnum = udev_queue_get_kernel_seqnum(udev_queue); - printf("seqnum kernel: %llu\n", seqnum); - seqnum = udev_queue_get_udev_seqnum(udev_queue); - printf("seqnum udev : %llu\n", seqnum); if (udev_queue_get_queue_is_empty(udev_queue)) printf("queue is empty\n"); - printf("get queue list\n"); - udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) - printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); - printf("\n"); - printf("get queue list again\n"); - udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) - printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); - printf("\n"); - list_entry = udev_queue_get_queued_list_entry(udev_queue); - if (list_entry != NULL) { - printf("event [%llu] is queued\n", seqnum); - seqnum = strtoull(udev_list_entry_get_value(list_entry), NULL, 10); - if (udev_queue_get_seqnum_is_finished(udev_queue, seqnum)) - printf("event [%llu] is not finished\n", seqnum); - else - printf("event [%llu] is finished\n", seqnum); - } - printf("\n"); udev_queue_unref(udev_queue); return 0; } |