mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
test: fix test-loopback failure when lacking privileges
Setting up the loopback might fail due to lack of privileges, as it happens when running unit tests in the Noble CI environment. Skip the test when it happens. 1584s 862/1330 systemd:test / test-loopback FAIL 0.01s exit status 1 1584s /* test_loopback_setup */ 1584s Failed to configure loopback network device, ignoring: Operation not permitted 1584s loopback: Operation not permitted
This commit is contained in:
parent
82cf92e1f6
commit
ba3c8e685a
@ -19,6 +19,8 @@ TEST_RET(loopback_setup) {
|
||||
}
|
||||
|
||||
r = loopback_setup();
|
||||
if (ERRNO_IS_NEG_PRIVILEGE(r))
|
||||
return log_tests_skipped("lacking privileges");
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "loopback: %m");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user