summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-12-20 07:28:30 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2025-01-04 17:48:29 +0100
commitbe68dcdc2057891166907b6b6c33c50e037ba847 (patch)
tree6145f069d0888cf4b1494d045b5bb41cea926d51 /src/test
parenthostname: read hardware serial from device tree (#35797) (diff)
downloadsystemd-be68dcdc2057891166907b6b6c33c50e037ba847.tar.xz
systemd-be68dcdc2057891166907b6b6c33c50e037ba847.zip
firewall-util: allow to override the table and map names through env var
Then, use test specific names to make the test not conflict with networkd. Hopefully fixes #35526.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-firewall-util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test-firewall-util.c b/src/test/test-firewall-util.c
index c05ea6ff76..67a618009d 100644
--- a/src/test/test-firewall-util.c
+++ b/src/test/test-firewall-util.c
@@ -103,6 +103,9 @@ int main(int argc, char *argv[]) {
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));
+
ASSERT_OK(fw_ctx_new(&ctx));
ASSERT_NOT_NULL(ctx);