1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00
Commit Graph

15 Commits

Author SHA1 Message Date
Yu Watanabe
13a30c6dc4 test: add simple coverage tests for 'udevadm lock' 2023-12-30 05:28:04 +09:00
David Tardon
08d5c74a01 test: read from the right device 2023-11-16 10:16:11 +01:00
Frantisek Sumsal
7dafeb6d6b test: add test case for issue #29863 2023-11-06 20:26:53 +09:00
Daan De Meyer
a6b4b2fa01 udev: Enable filtering the output of udevadm info --export-db
Let's support the same filtering options that we also support in
udevadm trigger in udevadm info to filter the devices produced by
--export-db.

One difference is that all properties specified by --propery-match=
have to be satisfied in udevadm info unlike udevadm trigger where just
one of them has to be satisfied.
2023-10-16 17:02:00 +02:00
Daan De Meyer
d6e5f170ef Add --json switch to udevadm info
This allows getting the udevadm info --export-db and query "all" output
as JSON.
2023-10-16 13:01:54 +02:00
Yu Watanabe
23acdb8d0b test: shorten timeout for 'udevadm monitor'
The command should never finish, it is not necessary to wait so long.
2023-08-05 05:03:20 +09:00
Frantisek Sumsal
e71bac7222 test: make shellcheck happy again
No functional changes.
2023-05-16 23:07:45 +02:00
Frantisek Sumsal
cb153b4fe9 test: rename assert.sh to util.sh
So we can extend it with additional utility functions without making it
confusing.

No functional change.
2023-05-16 22:43:52 +02:00
Dmitry V. Levin
f5b28e6bd8 test: fix testsuite-17.10.sh
Make sure /etc/udev/hwdb.d/ exists before creating a file inside it.

Fixes: 95cf8cae77 ("test: add coverage test for udevadm")
2023-03-16 03:59:01 +09:00
Frantisek Sumsal
cca295ab7a test: don't fail if we can't remove the scsi_debug module
Let's make the cleanup 'best effort' operation, as sometimes we might
not be able to remove the scsi_debug module, and we don't really care
if it stays loaded:

[   88.521333] testsuite-17.sh[1827]: ID_TEST=test
[   88.522015] testsuite-17.sh[1679]: + rmmod scsi_debug
[   88.524795] testsuite-17.sh[1828]: rmmod: ERROR: Module scsi_debug is in use
[   88.527786] testsuite-17.sh[1679]: + cleanup_17_10
2023-03-09 13:32:56 +01:00
Yu Watanabe
af766bb844 test: trigger new events after all currently queued events are processed
Otherwise, udevd may be busy and udevadm may not receive the reply
for the control packet within the time limit.
2023-03-03 23:25:01 +09:00
Yu Watanabe
b6b5135e66 test: generate debugging logs for udevd after restart 2023-03-03 19:48:40 +09:00
Frantisek Sumsal
90169eb92a test: a couple of format-related tweaks 2023-03-01 17:53:55 +01:00
Frantisek Sumsal
ea91b45e0e test: skip the hwdb update related tests w/ sanitizers and w/o accel
systemd-hwdb update is an expensive operation by itself, and when
running with sanitizers and in a VM without acceleration this cost is
exacerbated even further, making the test run for a very long time.

For example, in the daily CentOS CI ppc64le job with ASan+UBSan one
systemd-hwdb update takes more than 7 minutes; in the regular Arch job
with KVM it takes over 2 minutes.

Since the hwdb update is also tested in other places (like
TEST-01-BASIC and the test-hwdb meson test), let's skip it if we detect
we run with sanitizers and with plain QEMU.
2023-03-01 17:53:55 +01:00
David Tardon
95cf8cae77 test: add coverage test for udevadm 2023-02-27 07:22:20 +09:00