xref: /illumos-gate/usr/src/test/util-tests/tests/ctf/README (revision bde334a8dbd66dfa70ce4d7fc9dcad6e1ae45fe4)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright (c) 2019, Joyent, Inc.
14#
15
16CTF Tests
17---------
18
19This directory contains a series of tests for the Compact C Type Format
20(CTF). For each test program, there is a corresponding C program that
21goes through and checks the CTF for various aspects. Due to the fact
22that the CTF generated by compilers can change slightly, the tests have
23been designed this way to try and make it work with as wide a variety of
24programs as possible.
25
26The test suite requires the following:
27
281. make
292. C Compiler (defaults to gcc)
303. A copy of ctfconvert
31
32The source for a given program will be compiled on the target system and
33then converted. This allows us to try the CTF tools against a wide
34variety of different compilers or DWARF standards.
35
36Caveats
37-------
38
39Right now the tests only pass when using gcc 4.x. The following are
40known issues with the tests:
41
421. gcc7+ generates some different DWARF ordering, which causes some
43tests to spuriously fail. These tests should be improved.
44
452. There are cases where gcc7+ appears to attribute things as being const
46twice in DWARF which throw off the tests. The CTF tools likely should
47work around this if we confirm that this is intentional.
48
493. Many tests will cause clang not to emit DWARF information because
50clang infers that they cannot be used. The tests should be cleaned up in
51these cases.
52
534. clang generated DWARF can confuse the CTF tools. The tools should be
54fixed and additional regression tests should be added.
55