Project

General

Profile

Actions

Bug #11527

closed

elf-tests simple-src.c triggers compiler errors

Added by Robert Mustacchi about 4 years ago. Updated about 4 years ago.

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

While running the elf test suites I found that the simple test failed. Looking at the log, I discovered the following:

Test: /opt/elf-tests/tests/linker-sets/simple (run as root)       [00:00] [FAIL]
22:13:44.57 /opt/elf-tests/tests/linker-sets/simple-src.c: In function 'main':
22:13:44.57 /opt/elf-tests/tests/linker-sets/simple-src.c:105:1: warning: control reaches end of non-void function [-Wreturn-type]
22:13:44.57  }
22:13:44.57  ^
22:13:44.63 execution of /opt/elf-tests/tests/linker-sets/simple-src.c failed

The problem here is straightforward. There is no return value in main(). We should just add it and fix the test.

Actions #1

Updated by Robert Mustacchi about 4 years ago

To test this I used the updated test files and run the tests:

[root@haswell /opt]# ./test-runner/bin/run -c elf-tests/runfiles/default.run 
Test: /opt/elf-tests/tests/assert-deflib/test-deflib (run as root) [00:01] [PASS]
Test: /opt/elf-tess/tests/linker-sets/simple (run as root)       [00:00] [PASS]
Test: /opt/elf-tests/tests/linker-sets/in-use-check (run as root) [00:00] [PASS]
Test: /opt/elf-tests/tests/tls/amd64/ie/amd64-ie-test (run as root) [00:00] [PASS]
Test: /opt/elf-tests/tests/tls/amd64/ld/amd64-ld-test (run as root) [00:00] [PASS]
Test: /opt/elf-tess/tests/tls/i386/ld/i386-ld-test (run as root) [00:00] [PASS]

Results Summary
PASS       6

Running Time:   00:00:03
Percent passed: 100.0%
Log directory:  /var/tmp/test_results/20190808T141641
Actions #2

Updated by Electric Monk about 4 years ago

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

git commit 11eb14c0b4910a2d5a319fe0b5bf5c633fbfbfa6

commit  11eb14c0b4910a2d5a319fe0b5bf5c633fbfbfa6
Author: Robert Mustacchi <rm@joyent.com>
Date:   2019-08-08T14:26:58.000Z

    11527 elf-tests simple-src.c triggers compiler errors
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF