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