test: add fake action and seqnum
Otherwise, the receiver refuses the devices. See device_verify().
This commit is contained in:
@@ -115,6 +115,9 @@ static void test_subsystem_filter(sd_device *device) {
|
||||
assert_se(sd_device_get_syspath(d, &p) >= 0);
|
||||
assert_se(sd_device_get_subsystem(d, &s) >= 0);
|
||||
|
||||
assert_se(device_add_property(d, "ACTION", "add") >= 0);
|
||||
assert_se(device_add_property(d, "SEQNUM", "10") >= 0);
|
||||
|
||||
log_device_debug(d, "Sending device subsystem:%s syspath:%s", s, p);
|
||||
assert_se(device_monitor_send_device(monitor_server, monitor_client, d) >= 0);
|
||||
}
|
||||
@@ -150,6 +153,9 @@ static void test_tag_filter(sd_device *device) {
|
||||
|
||||
assert_se(sd_device_get_syspath(d, &p) >= 0);
|
||||
|
||||
assert_se(device_add_property(d, "ACTION", "add") >= 0);
|
||||
assert_se(device_add_property(d, "SEQNUM", "10") >= 0);
|
||||
|
||||
log_device_debug(d, "Sending device syspath:%s", p);
|
||||
assert_se(device_monitor_send_device(monitor_server, monitor_client, d) >= 0);
|
||||
}
|
||||
@@ -192,6 +198,9 @@ static void test_sysattr_filter(sd_device *device, const char *sysattr) {
|
||||
|
||||
assert_se(sd_device_get_syspath(d, &p) >= 0);
|
||||
|
||||
assert_se(device_add_property(d, "ACTION", "add") >= 0);
|
||||
assert_se(device_add_property(d, "SEQNUM", "10") >= 0);
|
||||
|
||||
log_device_debug(d, "Sending device syspath:%s", p);
|
||||
assert_se(device_monitor_send_device(monitor_server, monitor_client, d) >= 0);
|
||||
}
|
||||
@@ -236,6 +245,9 @@ static void test_parent_filter(sd_device *device) {
|
||||
|
||||
assert_se(sd_device_get_syspath(d, &p) >= 0);
|
||||
|
||||
assert_se(device_add_property(d, "ACTION", "add") >= 0);
|
||||
assert_se(device_add_property(d, "SEQNUM", "10") >= 0);
|
||||
|
||||
log_device_debug(d, "Sending device syspath:%s", p);
|
||||
assert_se(device_monitor_send_device(monitor_server, monitor_client, d) >= 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user