File: test.h

package info (click to toggle)
liburing 2.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,212 kB
  • sloc: ansic: 58,515; sh: 816; makefile: 598; cpp: 32
file content (36 lines) | stat: -rw-r--r-- 866 bytes parent folder | download | duplicates (2)
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