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 io_uring_test_config io_uring_test_configs[] = { 18 { 0, "default" }, 19 { IORING_SETUP_SQE128, "large SQE"}, 20 { IORING_SETUP_CQE32, "large CQE"}, 21 { IORING_SETUP_SQE128 | IORING_SETUP_CQE32, "large SQE/CQE" }, 22 }; 23 24 #define FOR_ALL_TEST_CONFIGS \ 25 for (int i = 0; i < sizeof(io_uring_test_configs) / sizeof(io_uring_test_configs[0]); i++) 26 27 #define IORING_GET_TEST_CONFIG_FLAGS() (io_uring_test_configs[i].flags) 28 #define IORING_GET_TEST_CONFIG_DESCRIPTION() (io_uring_test_configs[i].description) 29 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #endif 36