libvirt/tests
Laine Stump 64b966558c network: support setting firewallBackend from network.conf
It still can have only one useful value ("iptables"), but once a 2nd
value is supported, it will be selectable by setting
"firewall_backend=nftables" in /etc/libvirt/network.conf.

If firewall_backend isn't set in network.conf, then libvirt will check
to see if FIREWALL_BACKEND_DEFAULT_1 is available and, if so, set
that. (Since FIREWALL_BACKEND_DEFAULT_1 is currently "iptables", this
means checking to see it the iptables binary is present on the
system).  If the default backend isn't available, that is considered a
fatal error (since no networks can be started anyway), so an error is
logged and startup of the network driver fails.

NB: network.conf is itself created from network.conf.in at build time,
and the advertised default setting of firewall_backend (in a commented
out line) is set from the meson_options.txt setting
"firewall_backend_default_1". This way the conf file will have correct
information no matter what ordering is chosen for default backend at
build time (as more backends are added, settings will be added for
"firewall_backend_default_n", and those will be settable in
meson_options.txt and on the meson commandline to change the ordering
of the auto-detection when no backend is set in network.conf).

virNetworkLoadDriverConfig() may look more complicated than necessary,
but as additional backends are added, it will be easier to add checks
for those backends (and to re-order the checks based on builders'
preferences).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-05-22 23:19:18 -04:00
..
bhyveargv2xmldata
bhyvefirmwaredata
bhyvexml2argvdata bhyvexml2argvtest: use virCommandToStringFull to strip command path 2021-04-21 14:20:03 +02:00
bhyvexml2xmloutdata
capabilityschemadata
chxml2xmlin
chxml2xmlout
commanddata
cputestdata cpu_map: Drop 'mpx' from x86 cpu models 2024-05-02 19:56:45 +02:00
domainbackupxml2xmlin
domainbackupxml2xmlout
domaincapsdata cpu_map: Drop 'mpx' from x86 cpu models 2024-05-02 19:56:45 +02:00
domainconfdata
domainschemadata
fchostdata/fc_host
genericxml2xmlindata
genericxml2xmloutdata
interfaceschemadata
libxlxml2domconfigdata
lxcconf2xmldata lxc: Fix wrong addresses statements for IPv{4, 6} in native network definitions 2020-02-06 15:00:57 +01:00
lxcxml2xmldata
lxcxml2xmloutdata
networkxml2confdata
networkxml2firewalldata
networkxml2xmlin conf: support manually specifying VFIO variant driver in <hostdev> XML 2024-01-08 01:00:08 -05:00
networkxml2xmlout
networkxml2xmlupdatein
networkxml2xmlupdateout
nodedevmdevctldata nodedev: Implement virNodeDeviceUpdate 2024-02-26 11:09:57 +01:00
nodedevschemadata nodedev: add an active config to mdev 2024-02-26 10:59:47 +01:00
nodedevxml2xmlout nodedev: add an active config to mdev 2024-02-26 10:59:47 +01:00
nssdata
nwfilterxml2firewalldata
nwfilterxml2xmlin nwfilterxml2xmltest: Add test case for parser and formatter quirks 2023-06-05 13:23:06 +02:00
nwfilterxml2xmlout virNWFilterRuleDefDetailsFormat: Refactor formatter 2023-06-05 13:23:06 +02:00
qemuagentdata
qemublocktestdata
qemucapabilitiesdata qemu_capabilities: Add QEMU_CAPS_DEVICE_VIRTIO_SOUND capability 2024-05-02 15:37:53 +02:00
qemucaps2xmloutdata Add test script for loongarch 2024-03-21 14:42:27 +01:00
qemudomaincheckpointxml2xmlin
qemudomaincheckpointxml2xmlout
qemudomainsnapshotxml2xmlin
qemudomainsnapshotxml2xmlout
qemufirmwaredata tests: Don't advertise features for edk2-loongarch64 2024-03-07 13:35:05 +01:00
qemuhotplugtestcpus
qemuhotplugtestdevices qemuhotplugtest: Add testcases for hotplugging evdev input devices 2024-05-16 14:57:02 +02:00
qemuhotplugtestdomains qemuhotplugtest: Add testcases for hotplugging evdev input devices 2024-05-16 14:57:02 +02:00
qemumemlockdata
qemumigparamsdata
qemumigrationcookiexmldata
qemumonitorjsondata
qemunbdkitdata
qemusecuritydata
qemustatusxml2xmldata
qemuvhostuserdata
qemuxmlactive2xmldata
qemuxmlconfdata qemu: fix qemu command for pci hostdevs and ramfb='off' 2024-05-20 12:42:18 -05:00
schemas
secretxml2xmlin
securityselinuxhelperdata
securityselinuxlabeldata
storagepoolcapsschemadata
storagepoolschemadata
storagepoolxml2argvdata
storagepoolxml2xmlin tests: Remove storage pool/vol tests for sheepdog 2022-09-01 13:11:09 +02:00
storagepoolxml2xmlout
storagevolschemadata
storagevolxml2argvdata storage: Upgrade default qcow2 verion to 1.1 2024-03-12 10:34:43 +01:00
storagevolxml2xmlin
storagevolxml2xmlout
sysinfodata
vboxsnapshotxmldata
viracpidata
vircaps2xmldata
vircgroupdata
virconfdata
virfilecachedata
virfiledata
virhostcpudata
virjsondata
virmacmaptestdata
virnetdaemondata
virnetdevopenvswitchdata
virnetdevtestdata/sys/class/net
virnetworkportxml2xmldata
virnwfilterbindingxml2xmldata
virpcitestdata
virprocessstatdata
virresctrldata
virscsidata
virshtestdata virshtest: Add tests for '--help' 2024-05-16 09:03:48 +02:00
virstoragetestdata
virstorageutildata
virusbtestdata/sys_bus_usb/devices
virutiltestdata
vmwareverdata
vmx2xmldata vmx: Do not require DVS Port ID 2024-05-14 08:32:13 +02:00
xlconfigdata xen: explicitly set hostdev driver.name at runtime, not in postparse 2024-01-07 23:59:00 -05:00
xmconfigdata xen: explicitly set hostdev driver.name at runtime, not in postparse 2024-01-07 23:59:00 -05:00
xml2vmxdata Rename iterface type='dummy' to type='null' 2022-08-25 13:27:04 +02:00
.valgrind.supp
bhyveargv2xmlmock.c
bhyveargv2xmltest.c
bhyvexml2argvmock.c
bhyvexml2argvtest.c
bhyvexml2xmltest.c
chxml2xmlmock.c tests: Introduce chxml2xmlmock 2024-03-12 17:37:51 +01:00
chxml2xmltest.c tests: Introduce chxml2xmlmock 2024-03-12 17:37:51 +01:00
commandhelper.c
commandtest.c
cputest.c cpu: Add removedPolicy parameter to virCPUUpdate 2024-05-02 19:56:45 +02:00
domaincapsmock.c
domaincapstest.c Add test script for loongarch 2024-03-21 14:42:27 +01:00
domainconftest.c
esxutilstest.c
eventtest.c
fchosttest.c tests: fix tests when test driver is disabled 2024-05-08 15:57:31 +01:00
fdstreamtest.c
genericxml2xmltest.c
interfacexml2xmltest.c
libxlmock.c test: drop bogus check for YAJL from libxl test/mock 2024-05-08 16:01:34 +01:00
libxlxml2domconfigtest.c test: drop bogus check for YAJL from libxl test/mock 2024-05-08 16:01:34 +01:00
lxcconf2xmltest.c
lxcxml2xmltest.c
meson.build tests: Link some mocks with libtest_qemu_driver.so 2024-05-15 12:31:45 +02:00
metadatatest.c
networkmetadatatest.c
networkxml2conftest.c
networkxml2firewalltest.c network: support setting firewallBackend from network.conf 2024-05-22 23:19:18 -04:00
networkxml2xmltest.c
networkxml2xmlupdatetest.c
nodedevmdevctltest.c nodedevmdevctltest: Fix two memleaks 2024-02-26 14:35:52 +01:00
nodedevxml2xmltest.c test: nodedev: fill active_config at driver startup time 2024-04-24 09:38:54 -04:00
nsslinktest.c
nssmock.c tests: mock __open_2() 2024-03-14 15:17:48 +01:00
nsstest.c
nwfilterebiptablestest.c
nwfilterxml2firewalltest.c
nwfilterxml2xmltest.c
objecteventtest.c
openvzutilstest.c
openvzutilstest.conf
permitted_file_access.txt
pkix_asn1_tab.c
qemuagenttest.c
qemublocktest.c
qemucapabilitiestest.c
qemucaps2xmlmock.c
qemucaps2xmltest.c
qemucapsprobe.c tests: qemucapsprobe: Fix construction of path to libqemucapsprobemock.so 2024-04-24 14:12:17 +02:00
qemucapsprobemock.c
qemucommandutiltest.c
qemucpumock.c
qemudomaincheckpointxml2xmltest.c
qemudomainsnapshotxml2xmltest.c
qemufirmwaretest.c Add loongarch cpu support 2024-03-21 14:42:20 +01:00
qemuhotplugmock.c
qemuhotplugtest.c qemuhotplugtest: Add testcases for hotplugging evdev input devices 2024-05-16 14:57:02 +02:00
qemumemlocktest.c
qemumigparamstest.c
qemumigrationcookiexmltest.c
qemumonitorjsontest.c
qemumonitortestutils.c
qemumonitortestutils.h
qemunbdkittest.c
qemusecuritymock.c qemusecuritytest: Call real virFileExists in mock 2024-04-09 16:55:25 +02:00
qemusecuritytest.c
qemusecuritytest.h
qemuvhostusertest.c
qemuxml2argvmock.c
qemuxmlactivetest.c
qemuxmlconftest.c qemu: Generate command line for sound devices with model 'virtio' 2024-05-02 15:38:34 +02:00
scsihosttest.c
seclabeltest.c
secretxml2xmltest.c
securityselinuxhelper.c
securityselinuxlabeltest.c tests: mock: Accept spaces in build path 2024-04-15 09:24:16 +02:00
securityselinuxtest.c tests: mock: Accept spaces in build path 2024-04-15 09:24:16 +02:00
shunloadhelper.c
shunloadtest.c
sockettest.c
ssh.c
storagepoolcapstest.c
storagepoolxml2argvtest.c
storagepoolxml2xmltest.c
storagevolxml2argvtest.c
storagevolxml2xmltest.c
sysinfotest.c
testutils.c tests: mock: Accept spaces in build path 2024-04-15 09:24:16 +02:00
testutils.h tests: mock: Accept spaces in build path 2024-04-15 09:24:16 +02:00
testutilshostcpus.h Add test script for loongarch 2024-03-21 14:42:27 +01:00
testutilslxc.c
testutilslxc.h
testutilsqemu.c testutilsqemu: Don't leak struct testQemuArgs::vdpafds 2024-05-14 15:06:07 +02:00
testutilsqemu.h
testutilsqemuschema.c
testutilsqemuschema.h
testutilsxen.c
testutilsxen.h
utiltest.c
vboxsnapshotxmltest.c
viracpitest.c
viralloctest.c
virauthconfigtest.c
virbitmaptest.c virbitmap: Introduce virBitmapParseUnlimitedAllowEmpty() 2024-05-06 15:26:58 +02:00
virbuftest.c
vircaps2xmltest.c
vircgroupmock.c tests: mock __open_2() 2024-03-14 15:17:48 +01:00
vircgrouptest.c
virconftest.c
vircryptotest.c
virdnsmasqmock.c
virdriverconnvalidatetest.c
virdrivermoduletest.c
virendiantest.c
virerrortest.c
virfilecachemock.c
virfilecachetest.c
virfilemock.c
virfiletest.c
virfilewrapper.c tests: mock __open_2() 2024-03-14 15:17:48 +01:00
virfilewrapper.h
virfirewallmock.c
virfirewalltest.c util/network: new virFirewallBackend enum 2024-05-22 23:19:18 -04:00
virgdbusmock.c virgdbusmock: Mock g_dbus_connection_call_with_unix_fd_list_sync() only on UNIX-like systems 2022-09-30 15:38:47 +02:00
virhostcpumock.c
virhostcputest.c
virhostdevmock.c
virhostdevtest.c
virhostidmock.c
viridentitytest.c tests: mock: Accept spaces in build path 2024-04-15 09:24:16 +02:00
viriscsitest.c
virjsontest.c
virkeycodetest.c
virkmodtest.c
virlockspacetest.c
virlogtest.c
virmacmaptest.c
virmigtest.c
virmock.h tests: mock __open_2() 2024-03-14 15:17:48 +01:00
virmockstathelpers.c
virnetdaemonmock.c
virnetdaemontest.c
virnetdevbandwidthmock.c
virnetdevbandwidthtest.c
virnetdevmock.c
virnetdevopenvswitchtest.c
virnetdevtest.c
virnetmessagetest.c
virnetserverclientmock.c
virnetserverclienttest.c
virnetsockettest.c
virnettlscontexttest.c
virnettlshelpers.c
virnettlshelpers.h
virnettlssessiontest.c
virnetworkportxml2xmltest.c
virnumamock.c
virnwfilterbindingxml2xmltest.c
virpcimock.c tests: mock __open_2() 2024-03-14 15:17:48 +01:00
virpcitest.c
virpcivpdtest.c
virpolkittest.c
virportallocatormock.c
virportallocatortest.c
virprocessmock.c
virprocessstattest.c
virrandommock.c
virresctrltest.c
virrotatingfiletest.c
virschematest.c
virscsitest.c
virsh-auth
virsh-auth.xml
virshtest.c virshtest: Add tests for '--help' 2024-05-16 09:03:48 +02:00
virstoragetest.c
virstorageutiltest.c
virstringtest.c
virsystemdtest.c
virt-aa-helper-test tests: Allow spaces in path to virt-aa-helper 2024-04-15 09:28:32 +02:00
virtestmock.c tests: mock __open_2() 2024-03-14 15:17:48 +01:00
virtimetest.c
virtypedparamtest.c
viruritest.c
virusbmock.c tests: mock __open_2() 2024-03-14 15:17:48 +01:00
virusbtest.c
vmwarevertest.c
vmx2xmltest.c vmx: Check serialX.vspc before serialX.fileName 2024-05-02 17:22:37 +02:00
vshtabletest.c
xlconfigtest.c libxl: Fix domxml-to-native conversion 2024-05-02 15:57:29 -06:00
xmconfigtest.c libxl: Fix domxml-to-native conversion 2024-05-02 15:57:29 -06:00
xml2vmxtest.c