Project

General

Profile

Bug #13600

Fix regression in ctftest-convert-no-dwarf

Added by Robert Mustacchi about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
tests
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

When running the util tests recently I noticed that I had a failure in the CTF test suite. Running it manually I got the following:

$ /opt/util-tests/tests/ctf/ctftest
Beginning CTF tests with the following settings:
cc:             /usr/bin/gcc
detected:       gcc 10.2.0
CC:             /usr/bin/g++
as:             /usr/bin/gas
ctfconvert:     /opt/onbld/bin/i386/ctfconvert
ctfmerge:       /opt/onbld/bin/i386/ctfmerge
32-bit CFLAGS:  -m32 -gdwarf-2 
64-bit CFLAGS:  -m64 -gdwarf-2 

TEST PASSED: /opt/util-tests/tests/ctf/test-array.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-array.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-enum.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-enum.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-float.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-float.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-forward.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-forward.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-function.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-function.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-int.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-int.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-qualifiers.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-qualifiers.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-reference.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-reference.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-sou.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-sou.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-weak.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-weak.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-reduction (dir)
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-dedup (dir)
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-weak (dir)
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-static (dir)
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-forward (dir)
Running /opt/util-tests/tests/ctf/ctftest-convert-no-dwarf in /tmp/ctftest.110077
ctftest-convert-no-dwarf: An empty file should fail conversion due to no DWARF
Failed: emptyfile.o: incorrect output ctfconvert: CTF conversion failed due to missing debug data; use -m to override
Failed: emptyfile.o: incorrect output ctfconvert: CTF conversion failed due to missing debug data; use -m to override
ctftest-convert-no-dwarf: A file missing DWARF should fail conversion
Failed: file1.o: incorrect output ctfconvert: CTF conversion failed due to missing debug data; use -m to override
ctftest-convert-no-dwarf: A binary with DWARF but 0 debug dies should fail conversion
Failed: mybin: incorrect output ctfconvert: CTF conversion failed due to missing debug data; use -m to override
ctftest-convert-no-dwarf: One C file missing DWARF should fail ctfconvert
ctfconvert: WARNING: file file1.c is missing debug information
ctftest-convert-no-dwarf: One .cc file missing DWARF should pass
ctftest-convert-no-dwarf: One .s file missing DWARF should pass
result is 1
TEST FAILED: /opt/util-tests/tests/ctf/ctftest-convert-no-dwarf failed
Running /opt/util-tests/tests/ctf/ctftest-merge-no-ctf in /tmp/ctftest.110077
ctftest-merge-no-ctf: ctfmerge should fail if one C-source lacks CTF
ctftest-merge-no-ctf: ctfmerge should allow a .cc file to lack CTF
ctftest-merge-no-ctf: ctfmerge should allow an .s file to lack CTF
result is 0
TEST PASSED: /opt/util-tests/tests/ctf/ctftest-merge-no-ctf
Running /opt/util-tests/tests/ctf/ctftest-convert-non-c in /tmp/ctftest.110077
ctftest-convert-non-c: ctfconvert should fail on a .cc-derived object
ctftest-convert-non-c: ctfconvert shouldn't process .cc-derived DWARF
ctftest-convert-non-c: ctfconvert should fail on a .s-derived object
result is 0
TEST PASSED: /opt/util-tests/tests/ctf/ctftest-convert-non-c

ctftest: 1 test failed

In this case ctftest-convert-no-dwarf failed because it isn't matching output. I suspect what's happened is that #13280 or related ended up causing this to break. We're still doing the right thing, but the test was missed in updates.

#1

Updated by Robert Mustacchi about 2 months ago

With the fix in place, the ctf tests are clean on their own and in util-tests:

rm@beowulf:~$ /opt/util-tests/tests/ctf/ctftest
Beginning CTF tests with the following settings:
cc:             /usr/bin/gcc
detected:       gcc 10.2.0
CC:             /usr/bin/g++
as:             /usr/bin/gas
ctfconvert:     /opt/onbld/bin/i386/ctfconvert
ctfmerge:       /opt/onbld/bin/i386/ctfmerge
32-bit CFLAGS:  -m32 -gdwarf-2 
64-bit CFLAGS:  -m64 -gdwarf-2 

TEST PASSED: /opt/util-tests/tests/ctf/test-array.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-array.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-enum.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-enum.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-float.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-float.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-forward.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-forward.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-function.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-function.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-int.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-int.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-qualifiers.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-qualifiers.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-reference.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-reference.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-sou.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-sou.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-weak.c -m32 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-weak.c -m64 -gdwarf-2 
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-reduction (dir)
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-dedup (dir)
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-weak (dir)
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-static (dir)
TEST PASSED: /opt/util-tests/tests/ctf/test-merge-forward (dir)
Running /opt/util-tests/tests/ctf/ctftest-convert-no-dwarf in /tmp/ctftest.100498
ctftest-convert-no-dwarf: An empty file should fail conversion due to no DWARF
ctftest-convert-no-dwarf: A file missing DWARF should fail conversion
ctftest-convert-no-dwarf: A binary with DWARF but 0 debug dies should fail conversion
ctftest-convert-no-dwarf: One C file missing DWARF should fail ctfconvert
ctfconvert: WARNING: file file1.c is missing debug information
ctftest-convert-no-dwarf: One .cc file missing DWARF should pass
ctftest-convert-no-dwarf: One .s file missing DWARF should pass
result is 0
TEST PASSED: /opt/util-tests/tests/ctf/ctftest-convert-no-dwarf
Running /opt/util-tests/tests/ctf/ctftest-merge-no-ctf in /tmp/ctftest.100498
ctftest-merge-no-ctf: ctfmerge should fail if one C-source lacks CTF
ctftest-merge-no-ctf: ctfmerge should allow a .cc file to lack CTF
ctftest-merge-no-ctf: ctfmerge should allow an .s file to lack CTF
result is 0
TEST PASSED: /opt/util-tests/tests/ctf/ctftest-merge-no-ctf
Running /opt/util-tests/tests/ctf/ctftest-convert-non-c in /tmp/ctftest.100498
ctftest-convert-non-c: ctfconvert should fail on a .cc-derived object
ctftest-convert-non-c: ctfconvert shouldn't process .cc-derived DWARF
ctftest-convert-non-c: ctfconvert should fail on a .s-derived object
result is 0
TEST PASSED: /opt/util-tests/tests/ctf/ctftest-convert-non-c

ctftest: All tests passed successfully
rm@beowulf:~$ pfexec /opt/util-tests/bin/utiltest 
Test: /opt/util-tests/tests/allowed-ips (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/chown_test (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/date_test (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/find/findtest (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/grep_test (run as root)               [00:02] [PASS]
Test: /opt/util-tests/tests/head/head_test (run as root)          [00:00] [PASS]
Test: /opt/util-tests/tests/libjedec_test (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/libsff/libsff (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/make_test (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/mdb/mdbtest (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/mergeq/mqt (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/mergeq/wqt (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/printf_test (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/set-linkprop (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/sleep/sleeptest (run as root)         [00:22] [PASS]
Test: /opt/util-tests/tests/smbios (run as root)                  [00:00] [PASS]
Test: /opt/util-tests/tests/xargs_test (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/awk/runtests.sh (run as nobody)       [03:50] [PASS]
Test: /opt/util-tests/tests/ctf/precheck (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/ctf/ctftest (run as root)             [00:09] [PASS]
Test: /opt/util-tests/tests/demangle/afl-fast (run as root)       [00:16] [PASS]
Test: /opt/util-tests/tests/demangle/gcc-libstdc++ (run as root)  [00:01] [PASS]
Test: /opt/util-tests/tests/demangle/llvm-stdcxxabi (run as root) [00:07] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_remove (run as root)   [00:00] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_trunc (run as root)    [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_00_blank (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_01_boolean (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_02_numbers (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_03_empty_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_04_number_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_05_strings (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_06_nested (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_07_nested_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/sed/sed_addr (run as root)            [00:01] [PASS]
Test: /opt/util-tests/tests/sed/multi_test (run as root)          [00:08] [PASS]

Results Summary
PASS      35

Running Time:   00:05:07
Percent passed: 100.0%
Log directory:  /var/tmp/test_results/20210303T212315
#2

Updated by Electric Monk about 2 months ago

  • Gerrit CR set to 1305
#3

Updated by Electric Monk about 2 months ago

  • Status changed from New to Closed
  • % Done changed from 80 to 100

git commit 6d14434bff9ecb720b0d5e27ee39f9ec442f837e

commit  6d14434bff9ecb720b0d5e27ee39f9ec442f837e
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2021-03-05T17:35:51.000Z

    13600 Fix regression in ctftest-convert-no-dwarf
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF