File Index
Files and directories
Sign in
FILE

test_maps.h

File preview with syntax highlighting.

linux-6.19.14/tools/testing/selftests/bpf/test_maps.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef _TEST_MAPS_H
 3#define _TEST_MAPS_H
 4
 5#include <stdio.h>
 6#include <stdlib.h>
 7#include <stdbool.h>
 8
 9#define CHECK(condition, tag, format...) ({				\
10	int __ret = !!(condition);					\
11	if (__ret) {							\
12		printf("%s(%d):FAIL:%s ", __func__, __LINE__, tag);	\
13		printf(format);						\
14		exit(-1);						\
15	}								\
16})
17
18extern int skips;
19
20typedef bool (*retry_for_error_fn)(int err);
21int map_update_retriable(int map_fd, const void *key, const void *value, int flags, int attempts,
22			 retry_for_error_fn need_retry);
23
24#endif
~/ Read-only file preview.