test: improve logging helpers

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2021-11-04 12:13:02 +01:00
parent 4e29ef3cf0
commit 2c7c983bee
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -30,14 +30,14 @@
#include <stdio.h>
#include <stdlib.h>
#define lxc_debug_stream(stream, format, ...) \
do { \
fprintf(stream, "%s: %d: %s: " format "\n", __FILE__, __LINE__, \
__func__, __VA_ARGS__); \
#define lxc_debug_stream(stream, format, ...) \
do { \
fprintf(stream, "%s: %d: %s: " format "\n", __FILE__, \
__LINE__, __func__, ##__VA_ARGS__); \
} while (false)
#define lxc_error(format, ...) lxc_debug_stream(stderr, format, __VA_ARGS__)
#define lxc_debug(format, ...) lxc_debug_stream(stdout, format, __VA_ARGS__)
#define lxc_error(format, ...) lxc_debug_stream(stderr, format, ##__VA_ARGS__)
#define lxc_debug(format, ...) lxc_debug_stream(stdout, format, ##__VA_ARGS__)
#define lxc_test_assert_stringify(expression, stringify_expression) \
do { \