Print this page
10823 should ignore DW_TAG_subprogram with DW_AT_declaration tags
10824 GCC7-derived CTF can double qualifiers on arrays
10825 ctfdump -c drops last type
10826 ctfdump -c goes off the rails with a missing parent
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Jason King <jason.king@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/test/util-tests/tests/ctf/check-common.h
+++ new/usr/src/test/util-tests/tests/ctf/check-common.h
1 1 /*
2 2 * This file and its contents are supplied under the terms of the
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
3 3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 4 * You may only use this file in accordance with the terms of version
5 5 * 1.0 of the CDDL.
6 6 *
7 7 * A full copy of the text of the CDDL should have accompanied this
8 8 * source. A copy of the CDDL is also available via the Internet at
9 9 * http://www.illumos.org/license/CDDL.
10 10 */
11 11
12 12 /*
13 - * Copyright (c) 2019, Joyent, Inc.
13 + * Copyright 2019, Joyent, Inc.
14 14 */
15 15
16 16 #ifndef _CHECK_COMMON_H
17 17 #define _CHECK_COMMON_H
18 18
19 19 /*
20 20 * Common definitions for the CTF tests
21 21 */
22 22
23 23 #include <stdlib.h>
24 24 #include <unistd.h>
25 25 #include <libctf.h>
26 26 #include <err.h>
27 27 #include <strings.h>
28 28 #include <sys/param.h>
29 29
30 30 #ifdef __cplusplus
31 31 extern "C" {
32 32 #endif
33 33
34 34 typedef struct check_number {
35 35 const char *cn_tname;
36 36 uint_t cn_kind;
37 37 uint_t cn_flags;
38 38 uint_t cn_offset;
39 39 uint_t cn_size;
40 40 } check_number_t;
41 41
42 42 typedef struct check_symbol {
43 43 const char *cs_symbol;
44 44 const char *cs_type;
45 45 } check_symbol_t;
46 46
47 47 typedef struct check_descent {
48 48 const char *cd_tname;
49 49 uint_t cd_kind;
50 50 const char *cd_contents;
51 51 uint_t cd_nents;
52 52 } check_descent_t;
53 53
54 54 typedef struct check_descent_test {
55 55 const char *cdt_sym;
56 56 const check_descent_t *cdt_tests;
57 57 } check_descent_test_t;
58 58
59 59 typedef struct check_enum {
60 60 const char *ce_name;
61 61 int64_t ce_value;
62 62 } check_enum_t;
63 63
64 64 typedef struct check_enum_test {
65 65 const char *cet_type;
66 66 const check_enum_t *cet_tests;
67 67 } check_enum_test_t;
68 68
69 69 typedef struct check_member {
70 70 const char *cm_name;
71 71 const char *cm_type;
72 72 ulong_t cm_offset;
73 73 } check_member_t;
74 74
75 75 typedef struct check_member_test {
76 76 const char *cmt_type;
77 77 int cmt_kind;
78 78 size_t cmt_size;
79 79 const check_member_t *cmt_members;
80 80 } check_member_test_t;
81 81
82 82 typedef struct check_function_test {
83 83 const char *cft_name;
84 84 const char *cft_rtype;
85 85 uint_t cft_nargs;
86 86 uint_t cft_flags;
87 87 const char **cft_args;
88 88 } check_function_test_t;
89 89
90 90 /*
91 91 * Looks up each type and verifies that it matches the expected type.
92 92 */
93 93 extern boolean_t ctftest_check_numbers(ctf_file_t *, const check_number_t *);
94 94
95 95 /*
↓ open down ↓ |
72 lines elided |
↑ open up ↑ |
96 96 * Looks at each symbol specified and verifies that it matches the expected
97 97 * type.
98 98 */
99 99 extern boolean_t ctftest_check_symbols(ctf_file_t *, const check_symbol_t *);
100 100
101 101 /*
102 102 * Given a symbol name which refers to a type, walks all the references of that
103 103 * type and checks against it with each subsequent entry.
104 104 */
105 105 extern boolean_t ctftest_check_descent(const char *, ctf_file_t *,
106 - const check_descent_t *);
106 + const check_descent_t *, boolean_t);
107 107
108 108 /*
109 109 * Checks that all of the listed members of an enum are present and have the
110 110 * right values.
111 111 */
112 112 extern boolean_t ctftest_check_enum(const char *, ctf_file_t *,
113 113 const check_enum_t *);
114 114
115 115 /*
116 116 * Checks that all of the members of a structure or union are present and have
117 117 * the right types and byte offsets. This can be used for either structures or
118 118 * unions.
119 119 */
120 120 extern boolean_t ctftest_check_members(const char *, ctf_file_t *, int, size_t,
121 121 const check_member_t *);
122 122
123 123 /*
124 124 * Check that the named function or function pointer has the correct return
125 125 * type, arguments, and function flags.
126 126 */
127 127 extern boolean_t ctftest_check_function(const char *, ctf_file_t *,
128 128 const char *, uint_t, uint_t, const char **);
129 129 extern boolean_t ctftest_check_fptr(const char *, ctf_file_t *,
130 130 const char *, uint_t, uint_t, const char **);
131 131
132 132 /*
133 133 * Determine whether or not we have a duplicate type or not based on its name.
134 134 */
135 135 extern boolean_t ctftest_duplicates(ctf_file_t *);
136 136
137 137 #ifdef __cplusplus
138 138 }
139 139 #endif
140 140
141 141 #endif /* _CHECK_COMMON_H */
↓ open down ↓ |
25 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX