xref: /openbmc/linux/tools/testing/selftests/bpf/test_maps.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
151a0e301SMartin KaFai Lau /* SPDX-License-Identifier: GPL-2.0 */
251a0e301SMartin KaFai Lau #ifndef _TEST_MAPS_H
351a0e301SMartin KaFai Lau #define _TEST_MAPS_H
451a0e301SMartin KaFai Lau 
551a0e301SMartin KaFai Lau #include <stdio.h>
651a0e301SMartin KaFai Lau #include <stdlib.h>
751a0e301SMartin KaFai Lau 
851a0e301SMartin KaFai Lau #define CHECK(condition, tag, format...) ({				\
951a0e301SMartin KaFai Lau 	int __ret = !!(condition);					\
1051a0e301SMartin KaFai Lau 	if (__ret) {							\
1151a0e301SMartin KaFai Lau 		printf("%s(%d):FAIL:%s ", __func__, __LINE__, tag);	\
1251a0e301SMartin KaFai Lau 		printf(format);						\
1351a0e301SMartin KaFai Lau 		exit(-1);						\
1451a0e301SMartin KaFai Lau 	}								\
1551a0e301SMartin KaFai Lau })
1651a0e301SMartin KaFai Lau 
17*a7e85406SHou Tao extern int skips;
18*a7e85406SHou Tao 
1951a0e301SMartin KaFai Lau #endif
20