From 2834d385fe4830d8304eb5a5b57af0c50fb7413d Mon Sep 17 00:00:00 2001 From: Eric Garver Date: Tue, 2 Mar 2021 12:50:32 -0500 Subject: [PATCH] test: fix banner for offline tests --- src/tests/cli/firewall-offline-cmd.at | 1 + src/tests/dbus/dbus.at | 2 ++ src/tests/functions.at | 6 +----- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/tests/cli/firewall-offline-cmd.at b/src/tests/cli/firewall-offline-cmd.at index e763eeb95..3b3839fb2 100644 --- a/src/tests/cli/firewall-offline-cmd.at +++ b/src/tests/cli/firewall-offline-cmd.at @@ -1,4 +1,5 @@ AT_BANNER([firewall-offline-cmd]) +m4_define([FIREWALL_BACKEND], [offline]) dnl !!! DO NOT ADD TESTS HERE !!! dnl diff --git a/src/tests/dbus/dbus.at b/src/tests/dbus/dbus.at index a9707f825..9de129387 100644 --- a/src/tests/dbus/dbus.at +++ b/src/tests/dbus/dbus.at @@ -1,4 +1,6 @@ AT_BANNER([dbus]) +dnl use the default backend for dbus tests +m4_define([FIREWALL_BACKEND], [nftables]) m4_include([dbus/firewalld.conf.at]) m4_include([dbus/service.at]) m4_include([dbus/zone_permanent_signatures.at]) diff --git a/src/tests/functions.at b/src/tests/functions.at index a3d50188d..f1b3c03ef 100644 --- a/src/tests/functions.at +++ b/src/tests/functions.at @@ -88,6 +88,7 @@ m4_define([FWD_RESTART], [ m4_define([FWD_START_TEST], [ AT_SETUP([$1]) + AT_KEYWORDS(FIREWALL_BACKEND) dnl We test some unicode strings and autotest overrides LC_ALL=C, so set it dnl again for every test. @@ -104,12 +105,7 @@ m4_define([FWD_START_TEST], [ fi m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [ - AT_KEYWORDS(offline) ], [ - m4_define_default([FIREWALL_BACKEND], [nftables]) - - AT_KEYWORDS(FIREWALL_BACKEND) - dnl set the appropriate backend AT_CHECK([sed -i 's/^FirewallBackend.*/FirewallBackend=FIREWALL_BACKEND/' ./firewalld.conf])