]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-path: drop PATH_TEST() macro
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 27 May 2026 14:29:31 +0000 (23:29 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 27 May 2026 16:23:48 +0000 (01:23 +0900)
commitbd6b38d74edfae4ecac0ceeca326cdac4a00db27
treeb475732de08b46ae040e1175c48ee4f589aa6569
parent223ca6d2d35ad3cac798a14958b07923154091fe
test-path: drop PATH_TEST() macro

The macro was introduced by fc7a32df38dd4797ce7266df6ece6bd9b9842783,
but unfortunately gcc/gcov/lcov are confused by the macro:
```
lcov: ERROR: lcov: ERROR: (inconsistent) mismatched end line for test_path_exists_body at
/home/runner/work/systemd/systemd/src/test/test-path.c:158:
158 -> 185 while capturing from build/mkosi.builddir/arch~rolling~x86-64/test-path.p/src_test_test-path.c.gcno
(use "lcov --ignore-errors inconsistent ..." to bypass this error)
```

The macro deos nothing spurious, hence it should be a bug in gcc.
But, the macro just reduces the lines for calling setup_test(), and
does not simplify test cases so much.
Let's call it in each test cases, and stop using the macro.
src/test/test-path.c