• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Description: Test configs for tests.
4  */
5 #ifndef LIBURING_TEST_H
6 #define LIBURING_TEST_H
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 typedef struct io_uring_test_config {
13 	unsigned int flags;
14 	const char *description;
15 } io_uring_test_config;
16 
17 __attribute__((__unused__))
18 static io_uring_test_config io_uring_test_configs[] = {
19 	{ 0, 						"default" },
20 	{ IORING_SETUP_SQE128, 				"large SQE"},
21 	{ IORING_SETUP_CQE32, 				"large CQE"},
22 	{ IORING_SETUP_SQE128 | IORING_SETUP_CQE32, 	"large SQE/CQE" },
23 };
24 
25 #define FOR_ALL_TEST_CONFIGS							\
26 	for (int i = 0; i < sizeof(io_uring_test_configs) / sizeof(io_uring_test_configs[0]); i++)
27 
28 #define IORING_GET_TEST_CONFIG_FLAGS() (io_uring_test_configs[i].flags)
29 #define IORING_GET_TEST_CONFIG_DESCRIPTION() (io_uring_test_configs[i].description)
30 
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif
37