]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: make sure that the default naming scheme name maps back to itself 29588/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 16 Oct 2023 10:53:10 +0000 (12:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 16 Oct 2023 19:21:54 +0000 (21:21 +0200)
commit386256e69900d02d1413603a0066eb945ca2ec3a
tree115a2cdbffa0e8b7a9aca8ef37bfaae755495e94
parent8b01831950481b3b5b1b47da9e0495bc60df822e
test: make sure that the default naming scheme name maps back to itself

We were testing the that C constant is defined, but we weren't actually testing
that the string name maps back to itself. This would catch the issue fixed by
the grandparent commit.

The test for the default name is moved to the test file to keep the tests
together. The define is renamed to not have "_TEST" in the name. The issue here
is complicated by the fact that we allow downstreams to inject additional
fields, so we don't know the name of the default scheme if it not set with
-Ddefault-net-naming-scheme=, so _DEFAULT_NET_NAMING_SCHEME[_TEST] is not
defined in all cases, but at least in principle it could be used in other
places. If it exists, it is fully valid.
meson.build
src/shared/netif-naming-scheme.c
src/test/test-net-naming-scheme.c