xref: /kernel/linux/linux-5.10/tools/testing/selftests/bpf/test_maps.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/tools/testing/selftests/bpf/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _TEST_MAPS_H
38c2ecf20Sopenharmony_ci#define _TEST_MAPS_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <stdio.h>
68c2ecf20Sopenharmony_ci#include <stdlib.h>
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#define CHECK(condition, tag, format...) ({				\
98c2ecf20Sopenharmony_ci	int __ret = !!(condition);					\
108c2ecf20Sopenharmony_ci	if (__ret) {							\
118c2ecf20Sopenharmony_ci		printf("%s(%d):FAIL:%s ", __func__, __LINE__, tag);	\
128c2ecf20Sopenharmony_ci		printf(format);						\
138c2ecf20Sopenharmony_ci		exit(-1);						\
148c2ecf20Sopenharmony_ci	}								\
158c2ecf20Sopenharmony_ci})
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#endif
18

Indexes created Thu Nov 07 10:32:03 CST 2024