Print this page
12259 CTF shouldn't assume enum size

*** 8,18 **** * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright 2019, Joyent, Inc. */ #ifndef _CHECK_COMMON_H #define _CHECK_COMMON_H --- 8,18 ---- * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright 2020 Joyent, Inc. */ #ifndef _CHECK_COMMON_H #define _CHECK_COMMON_H
*** 85,94 **** --- 85,99 ---- uint_t cft_nargs; uint_t cft_flags; const char **cft_args; } check_function_test_t; + typedef struct check_size_test { + const char *cst_name; + size_t cst_size; + } check_size_test_t; + /* * Looks up each type and verifies that it matches the expected type. */ extern boolean_t ctftest_check_numbers(ctf_file_t *, const check_number_t *);
*** 128,137 **** --- 133,147 ---- const char *, uint_t, uint_t, const char **); extern boolean_t ctftest_check_fptr(const char *, ctf_file_t *, const char *, uint_t, uint_t, const char **); /* + * Check size of types. + */ + extern boolean_t ctftest_check_size(const char *, ctf_file_t *, size_t); + + /* * Determine whether or not we have a duplicate type or not based on its name. */ extern boolean_t ctftest_duplicates(ctf_file_t *); #ifdef __cplusplus