aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/liburing/test/test.h
blob: e99a8d204d73c01a59f3c80214531225b35a9c9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* SPDX-License-Identifier: MIT */
/*
 * Description: Test configs for tests.
 */
#ifndef LIBURING_TEST_H
#define LIBURING_TEST_H

#ifdef __cplusplus
extern "C" {
#endif

typedef struct io_uring_test_config {
	unsigned int flags;
	const char *description;
} io_uring_test_config;

__attribute__((__unused__))
static io_uring_test_config io_uring_test_configs[] = {
	{ 0, 						"default" },
	{ IORING_SETUP_SQE128, 				"large SQE"},
	{ IORING_SETUP_CQE32, 				"large CQE"},
	{ IORING_SETUP_SQE128 | IORING_SETUP_CQE32, 	"large SQE/CQE" },
};

#define FOR_ALL_TEST_CONFIGS							\
	for (int i = 0; i < sizeof(io_uring_test_configs) / sizeof(io_uring_test_configs[0]); i++)

#define IORING_GET_TEST_CONFIG_FLAGS() (io_uring_test_configs[i].flags)
#define IORING_GET_TEST_CONFIG_DESCRIPTION() (io_uring_test_configs[i].description)


#ifdef __cplusplus
}
#endif

#endif