Print this page
2nd round review feedback from rmustacc.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/test/libc-tests/cfg/symbols/README
+++ new/usr/src/test/libc-tests/cfg/symbols/README
1 1 #
2 2 # This file and its contents are supplied under the terms of the
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 13 # Copyright 2015 Garrett D'Amore <garrett@damore.org>
14 14 #
15 15
16 16 The configuration files in this directory are structured using the
17 17 syntax defined in the ../README file. They make use of the compilation
18 18 environments declared in ../compilation.cfg, and are processed by the
19 19 symbols test.
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
20 20
21 21 We have organized the files by header file, that is the tests for symbols
22 22 declared in a header file (e.g. <unistd.h> appear in a file based on that
23 23 header file's name (e.g. unistd_h.cfg.) This is purely for convenience.
24 24
25 25 Within these various declarations, we have the following field types:
26 26
27 27 <envs> This is a list of compilation environments where the symbol
28 28 should be legal. To indicate that the symbol must not be legal
29 29 an environment group can be prefixed with "-". For example,
30 - "SUS -SUSv4+" indicates a symbol that is legal in all SUS
30 + "SUS+ -SUSv4+" indicates a symbol that is legal in all SUS
31 31 environments up to SUSv3, and was removed in SUSv4 and subsequent
32 32 versions of SUS. As you can see, we can list multiple environments
33 33 or environment groups, and we can add or remove to previous groups
34 34 with subsequent ones.
35 35
36 36 <name> This is a symbol name. It follows the rules for C symbol names.
37 37
38 38 <header> This is a header file, for example, unistd.h. Conventionally,
39 39 the header files used should match the file where the test is
40 40 declared.
41 41
42 42 <type> This is a C type. Function types can be declared without their
43 43 names, e.g. "void (*)(int)". Structures (e.g. "struct stat") and
44 44 pointer types (e.g. "pthead_t *") are legal as well.
45 45
46 46 Here are the types of declarations in these files:
47 47
48 48 type | <name> | <header> | <envs>
49 49
50 50 Tests for a C type with <name>. The test verifies that a variable with
51 51 this type can be declared when the <header> is included.
52 52
53 53 value | <name> | <type> | <header> | <envs>
54 54
55 55 Tests for a value named <name>, of type <type>. The test attempts to
56 56 assign the given value to a scratch variable declared with the given
57 57 type. The value can be a macro or other C symbol.
58 58
59 59 func | <name> | <type> | <type> [; <type> ]... | <header> | <envs>
60 60
61 61 Tests whether a function <name>, returning the first <type>, and
62 62 taking arguments of following <type> values, is declared. Note that
63 63 the argument types are separated by semicolons. For varargs style
64 64 functions, leave out the ... part. For function declarations
65 65 that have no declared arguments, either void can specified, or
66 66 the type list can be omitted.
67 67
68 68 Examples:
69 69
70 70 type | size_t | sys/types.h | ALL
71 71 value | NULL | void * | stdlib.h | ALL
72 72 func strnlen | int | const char *; int | string.h | ALL
↓ open down ↓ |
32 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX