summaryrefslogtreecommitdiff
path: root/usr/src/test/os-tests/tests/imc/imc_test.h
blob: d1785dd837875b3363b06e9a1147c384c63a4ac7 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
 * This file and its contents are supplied under the terms of the
 * Common Development and Distribution License ("CDDL"), version 1.0.
 * You may only use this file in accordance with the terms of version
 * 1.0 of the CDDL.
 *
 * A full copy of the text of the CDDL should have accompanied this
 * source.  A copy of the CDDL is also available via the Internet at
 * http://www.illumos.org/license/CDDL.
 */

/*
 * Copyright 2019 Joyent, Inc.
 */

#ifndef _IMC_TEST_H
#define	_IMC_TEST_H

#include <stdint.h>
#include <inttypes.h>

#include "imc.h"

/*
 * Standard interfaces for the IMC test files.
 */

#ifdef __cplusplus
extern "C" {
#endif

typedef struct imc_test_case {
	const char		*itc_desc;
	uint64_t		itc_pa;
	const imc_t		*itc_imc;
	boolean_t		itc_pass;
	imc_decode_failure_t	itc_fail;
	/*
	 * These will all be checked on the success case unless set to the
	 * respective UINTXX_MAX value.
	 */
	uint32_t		itc_nodeid;
	uint32_t		itc_tadid;
	uint32_t		itc_channelid;
	uint64_t		itc_chanaddr;
	uint32_t		itc_dimmid;
	uint32_t		itc_rankid;
	uint64_t		itc_rankaddr;
} imc_test_case_t;

/*
 * Arrays of tests cases that exist. They are terminated with a NULL itc_desc
 * member.
 */
extern const imc_test_case_t imc_test_basics[];
extern const imc_test_case_t imc_test_badaddr[];
extern const imc_test_case_t imc_test_fail[];
extern const imc_test_case_t imc_test_rir[];
extern const imc_test_case_t imc_test_sad[];
extern const imc_test_case_t imc_test_skx_loop[];
extern const imc_test_case_t imc_test_tad[];


#ifdef __cplusplus
}
#endif

#endif /* _IMC_TEST_H */