From: Yu Watanabe Date: Tue, 2 Dec 2025 16:35:34 +0000 (+0900) Subject: test-firewall-util: allow to run test-firewall-util X-Git-Tag: v259-rc3~39^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84990e08e5d1dceedb2525e977b07ecc0b172628;p=thirdparty%2Fsystemd.git test-firewall-util: allow to run test-firewall-util Now fw_nftables_add_masquerade() should return EOPNOTSUPP or so if unprivileged. It is not necessary to skip whole tests earlier. --- diff --git a/src/test/test-firewall-util.c b/src/test/test-firewall-util.c index d7080fa3495..aea6cded5aa 100644 --- a/src/test/test-firewall-util.c +++ b/src/test/test-firewall-util.c @@ -1,8 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include -#include - #include "sd-netlink.h" #include "firewall-util.h" @@ -79,9 +76,6 @@ TEST(v4) { static int intro(void) { int r; - if (getuid() != 0) - return log_tests_skipped("not root"); - ASSERT_OK_ERRNO(setenv("SYSTEMD_FIREWALL_UTIL_NFT_TABLE_NAME", "io.systemd-test.nat", /* overwrite = */ true)); ASSERT_OK_ERRNO(setenv("SYSTEMD_FIREWALL_UTIL_DNAT_MAP_NAME", "test_map_port_ipport", /* overwrite = */ true));