Commit 8511da27 by Christian Brauner Committed by Stéphane Graber

tests: add lxc_error() and lxc_debug()

parent 0a98f3df
...@@ -28,6 +28,15 @@ ...@@ -28,6 +28,15 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#define lxc_debug_stream(stream, format, ...) \
do { \
fprintf(stream, "%s: %d: %s: " format, __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_test_assert_stringify(expression, stringify_expression) \ #define lxc_test_assert_stringify(expression, stringify_expression) \
do { \ do { \
if (!(expression)) { \ if (!(expression)) { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment