From e0bc051a52bccdbd17ada7ab974b1c32d25ac7c1 Mon Sep 17 00:00:00 2001 From: Eric Garver Date: Mon, 8 Feb 2021 14:53:38 -0500 Subject: [PATCH 12/22] test(dbus): direct: add coverage for signatures (cherry picked from commit 4673e0e55353c3f0243035f47d7c2832db9928e4) (cherry picked from commit 1b1b27ec0c19046ef041d465e44c81ad0f675fc9) --- src/tests/dbus/dbus.at | 1 + src/tests/dbus/direct.at | 348 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 349 insertions(+) create mode 100644 src/tests/dbus/direct.at diff --git a/src/tests/dbus/dbus.at b/src/tests/dbus/dbus.at index 5f7b6cbdc108..a9707f825041 100644 --- a/src/tests/dbus/dbus.at +++ b/src/tests/dbus/dbus.at @@ -9,3 +9,4 @@ m4_include([dbus/policy_permanent_signatures.at]) m4_include([dbus/policy_runtime_signatures.at]) m4_include([dbus/policy_permanent_functional.at]) m4_include([dbus/policy_runtime_functional.at]) +m4_include([dbus/direct.at]) diff --git a/src/tests/dbus/direct.at b/src/tests/dbus/direct.at new file mode 100644 index 000000000000..fe92db6bb510 --- /dev/null +++ b/src/tests/dbus/direct.at @@ -0,0 +1,348 @@ +FWD_START_TEST([dbus api - direct signatures]) +AT_KEYWORDS(dbus direct) + +dnl ############################### +dnl ########## runtime ############ +dnl ############################### + +DBUS_INTROSPECT([], [[//method[@name="addChain"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="addPassthrough"]]], 0, [dnl + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="addRule"]]], 0, [dnl + + + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="getAllChains"]]], 0, [dnl + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="getAllPassthroughs"]]], 0, [dnl + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="getAllRules"]]], 0, [dnl + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="getChains"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="getPassthroughs"]]], 0, [dnl + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="getRules"]]], 0, [dnl + + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="passthrough"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="queryChain"]]], 0, [dnl + + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="queryPassthrough"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="queryRule"]]], 0, [dnl + + + + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="removeAllPassthroughs"]]], 0, [dnl + + +]) + +DBUS_INTROSPECT([], [[//method[@name="removeChain"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="removePassthrough"]]], 0, [dnl + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="removeRule"]]], 0, [dnl + + + + + + + +]) + +DBUS_INTROSPECT([], [[//method[@name="removeRules"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([], [[//signal[@name="ChainAdded"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([], [[//signal[@name="ChainRemoved"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([], [[//signal[@name="PassthroughAdded"]]], 0, [dnl + + + + +]) + +DBUS_INTROSPECT([], [[//signal[@name="PassthroughRemoved"]]], 0, [dnl + + + + +]) + +DBUS_INTROSPECT([], [[//signal[@name="RuleAdded"]]], 0, [dnl + + + + + + + +]) + +DBUS_INTROSPECT([], [[//signal[@name="RuleRemoved"]]], 0, [dnl + + + + + + + +]) + +dnl ############################### +dnl ######### permanent ########### +dnl ############################### + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="getSettings"]]], 0, [dnl + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="update"]]], 0, [dnl + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="addChain"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="addPassthrough"]]], 0, [dnl + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="addRule"]]], 0, [dnl + + + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="getAllChains"]]], 0, [dnl + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="getAllPassthroughs"]]], 0, [dnl + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="getAllRules"]]], 0, [dnl + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="getChains"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="getPassthroughs"]]], 0, [dnl + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="getRules"]]], 0, [dnl + + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="queryChain"]]], 0, [dnl + + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="queryPassthrough"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="queryRule"]]], 0, [dnl + + + + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="removeChain"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="removePassthrough"]]], 0, [dnl + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="removeRule"]]], 0, [dnl + + + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//method[@name="removeRules"]]], 0, [dnl + + + + + +]) + +DBUS_INTROSPECT([config], [[//interface[@name="org.fedoraproject.FirewallD1.config.direct"]//signal[@name="Updated"]]], 0, [dnl + + +]) + +FWD_END_TEST -- 2.27.0