1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

Merge pull request #20996 from yuwata/udevadm-trigger-debug

test: show debug and verbose message
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-10-15 09:44:59 +02:00 committed by GitHub
commit 6b292fa17b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -178,7 +178,7 @@ int device_monitor_new_full(sd_device_monitor **ret, MonitorNetlinkGroup group,
netns = ioctl(m->sock, SIOCGSKNS);
if (netns < 0)
log_debug_errno(errno, "sd-device-monitor: Unable to get network namespace of udev netlink socket, unable to determine if we are in host netns: %m");
log_debug_errno(errno, "sd-device-monitor: Unable to get network namespace of udev netlink socket, unable to determine if we are in host netns, ignoring: %m");
else {
struct stat a, b;
@ -191,9 +191,9 @@ int device_monitor_new_full(sd_device_monitor **ret, MonitorNetlinkGroup group,
if (ERRNO_IS_PRIVILEGE(errno))
/* If we can't access PID1's netns info due to permissions, it's fine, this is a
* safety check only after all. */
log_debug_errno(errno, "sd-device-monitor: No permission to stat PID1's netns, unable to determine if we are in host netns: %m");
log_debug_errno(errno, "sd-device-monitor: No permission to stat PID1's netns, unable to determine if we are in host netns, ignoring: %m");
else
log_debug_errno(errno, "sd-device-monitor: Failed to stat PID1's netns: %m");
log_debug_errno(errno, "sd-device-monitor: Failed to stat PID1's netns, ignoring: %m");
} else if (a.st_dev != b.st_dev || a.st_ino != b.st_ino)
log_debug("sd-device-monitor: Netlink socket we listen on is not from host netns, we won't see device events.");

View File

@ -28,7 +28,7 @@ teardown() {
run_test() {
since="$(date +%T)"
udevadm trigger -w --action add /dev/null
SYSTEMD_LOG_LEVEL=debug udevadm trigger --verbose --settle --action add /dev/null
for _ in {1..20}; do
if coredumpctl --since "$since" --no-legend --no-pager | grep /bin/udevadm ; then

View File

@ -15,7 +15,7 @@ ACTION=="change", SUBSYSTEM=="mem", KERNEL=="null", TAG+="changed"
EOF
udevadm control --reload
udevadm trigger --settle --action add /dev/null
SYSTEMD_LOG_LEVEL=debug udevadm trigger --verbose --settle --action add /dev/null
test -f /run/udev/tags/added/c1:3
test ! -f /run/udev/tags/changed/c1:3
@ -24,7 +24,7 @@ udevadm info /dev/null | grep -q 'E: CURRENT_TAGS=.*:added:.*'
udevadm info /dev/null | grep -q 'E: TAGS=.*:changed:.*' && { echo 'unexpected TAGS='; exit 1; }
udevadm info /dev/null | grep -q 'E: CURRENT_TAGS=.*:changed:.*' && { echo 'unexpected CURRENT_TAGS='; exit 1; }
udevadm trigger --settle --action change /dev/null
SYSTEMD_LOG_LEVEL=debug udevadm trigger --verbose --settle --action change /dev/null
test -f /run/udev/tags/added/c1:3
test -f /run/udev/tags/changed/c1:3
@ -33,7 +33,7 @@ udevadm info /dev/null | grep -q 'E: CURRENT_TAGS=.*:added:.*' && { echo 'unexpe
udevadm info /dev/null | grep -q 'E: TAGS=.*:changed:.*'
udevadm info /dev/null | grep -q 'E: CURRENT_TAGS=.*:changed:.*'
udevadm trigger --settle --action add /dev/null
SYSTEMD_LOG_LEVEL=debug udevadm trigger --verbose --settle --action add /dev/null
test -f /run/udev/tags/added/c1:3
test -f /run/udev/tags/changed/c1:3

View File

@ -10,7 +10,7 @@ ACTION=="add", SUBSYSTEM=="mem", KERNEL=="null", IMPORT{program}="/bin/echo -e H
EOF
udevadm control --reload
udevadm trigger --settle --action add /dev/null
SYSTEMD_LOG_LEVEL=debug udevadm trigger --verbose --settle --action add /dev/null
test -f /run/udev/data/c1:3
udevadm info /dev/null | grep -q 'E: HOGE=aa\\x20\\x20\\x20bb'