From 3122491686014a2cdd83d3506334055fd18c80e0 Mon Sep 17 00:00:00 2001 From: Eric Garver Date: Wed, 8 Apr 2020 14:16:48 -0400 Subject: [PATCH 08/10] test: dbus: zone: verify runtime config API signatures (cherry picked from commit fca39ea7edbd57283bc15fdd88fbfd4b1943f977) (cherry picked from commit d17a68d680b631954fdb5031a3c0627a68f77049) --- src/tests/dbus/dbus.at | 1 + src/tests/dbus/zone_runtime_signatures.at | 415 ++++++++++++++++++++++ 2 files changed, 416 insertions(+) create mode 100644 src/tests/dbus/zone_runtime_signatures.at diff --git a/src/tests/dbus/dbus.at b/src/tests/dbus/dbus.at index ffef478f5449..377244460e7a 100644 --- a/src/tests/dbus/dbus.at +++ b/src/tests/dbus/dbus.at @@ -2,3 +2,4 @@ AT_BANNER([dbus]) m4_include([dbus/firewalld.conf.at]) m4_include([dbus/service.at]) m4_include([dbus/zone_permanent_signatures.at]) +m4_include([dbus/zone_runtime_signatures.at]) diff --git a/src/tests/dbus/zone_runtime_signatures.at b/src/tests/dbus/zone_runtime_signatures.at new file mode 100644 index 000000000000..53fdbea03180 --- /dev/null +++ b/src/tests/dbus/zone_runtime_signatures.at @@ -0,0 +1,415 @@ +FWD_START_TEST([dbus api - zone runtime signatures]) +AT_KEYWORDS(dbus zone gh586) + +dnl #################### +dnl Global APIs +dnl #################### + +DBUS_INTROSPECT([], [[//method[@name="getZoneSettings"]]], 0, [dnl + + + + +]) + +dnl Default Zone +DBUS_INTROSPECT([], [[//method[@name="getDefaultZone"]]], 0, [dnl + + + +]) +DBUS_INTROSPECT([], [[//method[@name="setDefaultZone"]]], 0, [dnl + + + +]) + +dnl Fetching Zones +DBUS_INTROSPECT([], [[//method[@name="getZones"]]], 0, [dnl + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getActiveZones"]]], 0, [dnl + + + +]) + +dnl Interface/Source +DBUS_INTROSPECT([], [[//method[@name="getZoneOfInterface"]]], 0, [dnl + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getZoneOfSource"]]], 0, [dnl + + + + +]) + +dnl #################### +dnl Zone APIs +dnl #################### + +DBUS_INTROSPECT([], [[//method[@name="isImmutable"]]], 0, [dnl + + + + +]) + +dnl Interfaces +DBUS_INTROSPECT([], [[//method[@name="addInterface"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="changeZone"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="changeZoneOfInterface"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeInterface"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="queryInterface"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getInterfaces"]]], 0, [dnl + + + + +]) + +dnl Sources +DBUS_INTROSPECT([], [[//method[@name="addSource"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="changeZoneOfSource"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeSource"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="querySource"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getSources"]]], 0, [dnl + + + + +]) + +dnl Services +DBUS_INTROSPECT([], [[//method[@name="addService"]]], 0, [dnl + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeService"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="queryService"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getServices"]]], 0, [dnl + + + + +]) + +dnl Protocols +DBUS_INTROSPECT([], [[//method[@name="addProtocol"]]], 0, [dnl + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeProtocol"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="queryProtocol"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getProtocols"]]], 0, [dnl + + + + +]) + +dnl Ports +DBUS_INTROSPECT([], [[//method[@name="addPort"]]], 0, [dnl + + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removePort"]]], 0, [dnl + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="queryPort"]]], 0, [dnl + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getPorts"]]], 0, [dnl + + + dnl NOTE: The signature is "aas", but getPorts() actually returns + dnl "a(ss)". Apparently python-dbus coerces to "aas". + + +]) + +dnl Source Ports +DBUS_INTROSPECT([], [[//method[@name="addSourcePort"]]], 0, [dnl + + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeSourcePort"]]], 0, [dnl + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="querySourcePort"]]], 0, [dnl + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getSourcePorts"]]], 0, [dnl + + + dnl NOTE: The signature is "aas", but getPorts() actually returns + dnl "a(ss)". Apparently python-dbus coerces to "aas". + + +]) + +dnl Forward Ports +DBUS_INTROSPECT([], [[//method[@name="addForwardPort"]]], 0, [dnl + + + + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeForwardPort"]]], 0, [dnl + + + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="queryForwardPort"]]], 0, [dnl + + + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getForwardPorts"]]], 0, [dnl + + + dnl NOTE: The signature is "aas", but getPorts() actually returns + dnl "a(ssss)". Apparently python-dbus coerces to "aas". + + +]) + +dnl Masquerade +DBUS_INTROSPECT([], [[//method[@name="addMasquerade"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeMasquerade"]]], 0, [dnl + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="queryMasquerade"]]], 0, [dnl + + + + +]) + +dnl ICMP Block +DBUS_INTROSPECT([], [[//method[@name="addIcmpBlock"]]], 0, [dnl + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeIcmpBlock"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="queryIcmpBlock"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getIcmpBlocks"]]], 0, [dnl + + + + +]) + +dnl ICMP Block Inversion +DBUS_INTROSPECT([], [[//method[@name="addIcmpBlockInversion"]]], 0, [dnl + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeIcmpBlockInversion"]]], 0, [dnl + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="queryIcmpBlockInversion"]]], 0, [dnl + + + + +]) + +dnl Rich Rules +DBUS_INTROSPECT([], [[//method[@name="addRichRule"]]], 0, [dnl + + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="removeRichRule"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="queryRichRule"]]], 0, [dnl + + + + + +]) +DBUS_INTROSPECT([], [[//method[@name="getRichRules"]]], 0, [dnl + + + + +]) + +FWD_END_TEST -- 2.25.2