Files
linux/tools/perf/lib/include/internal/tests.h
T
Jiri Olsa 6a94b52a71 libperf: Add tests support
Adding simple test framework, now empty.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Alexey Budankov <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Michael Petlan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2019-07-29 18:34:46 -03:00

20 lines
789 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LIBPERF_INTERNAL_TESTS_H
#define __LIBPERF_INTERNAL_TESTS_H
#include <stdio.h>
#define __T_START fprintf(stdout, "- running %s...", __FILE__)
#define __T_OK fprintf(stdout, "OK\n")
#define __T_FAIL fprintf(stdout, "FAIL\n")
#define __T(text, cond) \
do { \
if (!(cond)) { \
fprintf(stderr, "FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
return -1; \
} \
} while (0)
#endif /* __LIBPERF_INTERNAL_TESTS_H */