summaryrefslogtreecommitdiff
path: root/test/test-libudev.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-04-24 15:40:08 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-04-24 15:40:08 -0400
commit2500dbc810d8898c1359c6579715586fffa08a27 (patch)
treee24445a5829c7c4f4da6bf7652ece1acaf008b6c /test/test-libudev.c
parentdbc5e32faeca842ec5a4a07702080b3195e21d66 (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. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'test/test-libudev.c')
-rw-r--r--test/test-libudev.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/test/test-libudev.c b/test/test-libudev.c
index 71b981ca74..92c5ceba15 100644
--- a/test/test-libudev.c
+++ b/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;
}