Test case: lib/atf/libatf-c/macros_test:detect_unused_tests
- Test program: /usr/tests/lib/atf/libatf-c/macros_test
- Result: failed: Build of unused_test.c passed; unused test cases are not properly detected
- Start time: 2018-08-07T14:53:39.150113Z
- End time: 2018-08-07T14:53:42.186300Z
- Duration: 3.036s
- Execution context
Metadata
- allowed_architectures =
- allowed_platforms =
- description = Tests that defining an unused test case raises a warning (and thus an error)
- has_cleanup = false
- is_exclusive = false
- required_configs =
- required_disk_space = 0
- required_files =
- required_memory = 0
- required_programs =
- required_user =
- timeout = 300
Standard output
> gcc -O2 -DHAVE_CONFIG_H -I/usr/include -Wall -Werror -o test.o -c compiler_test.c
> gcc -O2 -DHAVE_CONFIG_H -I/usr/include -Wall -Werror -o test.o -c /usr/tests/lib/atf/libatf-c/unused_test.c
Standard error
compiler_test.c:2:49: error: 'unused' defined but not used [-Werror=unused-variable]
#define define_unused static struct test_struct unused
^~~~~~
compiler_test.c:3:1: note: in expansion of macro 'define_unused'
define_unused;
^~~~~~~~~~~~~
cc1: all warnings being treated as errors
gcc failed with exit code 1
Files left in work directory after failure: compiler_test.c, test.o