mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 15:33:28 +00:00
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]>
20 lines
789 B
C
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 */
|