tests: add macro for generating function enter log message
The test-tpm2 test multiplexes a bunch of tests from a single entrypoint test that creates the TPM2 connection. This means we only get the nice log output which test we are looking for once for the entrypoint. Let's add a macro that allows it to nicely generate it for the inner tests too and use it.
This commit is contained in:
@@ -104,6 +104,9 @@ extern const TestFunc _weak_ __stop_SYSTEMD_TEST_TABLE[];
|
||||
REGISTER_TEST(test_##name, ##__VA_ARGS__); \
|
||||
static int test_##name(void)
|
||||
|
||||
#define TEST_LOG_FUNC() \
|
||||
log_info("/* %s() */", __func__)
|
||||
|
||||
static inline int run_test_table(void) {
|
||||
_cleanup_strv_free_ char **tests = NULL;
|
||||
int r = EXIT_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user