mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 08:28:13 +00:00
51a0e301a5
This patch adds BPF_MAP_TYPE_SK_STORAGE test to test_maps. The src file is rather long, so it is put into another dir map_tests/ and compile like the current prog_tests/ does. Other existing tests in test_maps can also be re-factored into map_tests/ in the future. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
17 lines
350 B
C
17 lines
350 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _TEST_MAPS_H
|
|
#define _TEST_MAPS_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#define CHECK(condition, tag, format...) ({ \
|
|
int __ret = !!(condition); \
|
|
if (__ret) { \
|
|
printf("%s(%d):FAIL:%s ", __func__, __LINE__, tag); \
|
|
printf(format); \
|
|
exit(-1); \
|
|
} \
|
|
})
|
|
|
|
#endif
|