Page MenuHomePhabricator

[libc++] Enable more warnings in the test suite
Needs ReviewPublic

Authored by philnik on May 21 2022, 7:34 AM.

Details

Reviewers
ldionne
Mordante
var-const
Group Reviewers
Restricted Project

Diff Detail

Unit TestsFailed

TimeTest
220 mslibcxx CI C++03 > libc++abi.libc++abi::test_aux_runtime_op_array_new.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp -v --target=x86_64-unknown-linux-gnu -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -funwind-tables -nostdinc++ -I/home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/build/generic-cxx03/include/c++/v1 -I/home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/src -I/home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/libcxxabi/include -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/test/support -std=c++03 -Wall -Walloca -Wcomma -Wextra -Werror -Wshadow -Wundef -Wunreachable-code-aggressive -Wvla -Wdeprecated -Wno-deprecated-dynamic-exception-spec -Wno-pedantic -Wno-unused-command-line-argument -Wno-attributes -Wno-noexcept-type -Wno-atomic-alignment -Wno-unused-local-typedef -Wno-c++11-extensions -Wno-user-defined-literals -Wsign-compare -Wunused-variable -Wunused-parameter -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -L/home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -L/home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -nodefaultlibs -lc++ -lc++abi -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc -o /home/libcxx-builder/.buildkite-agent/builds/1655c83680ad-1/llvm-project/libcxx-ci/build/generic…
120 mslibcxx CI C++11 > libc++abi.libc++abi::exception_object_alignment.2.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/test/exception_object_alignment.2.pass.cpp -v --target=x86_64-unknown-linux-gnu -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -funwind-tables -nostdinc++ -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/include/c++/v1 -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/src -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/include -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/test/support -std=c++11 -Wall -Walloca -Wcomma -Wextra -Werror -Wshadow -Wundef -Wunreachable-code-aggressive -Wvla -Wdeprecated -Wno-deprecated-dynamic-exception-spec -Wno-pedantic -Wno-unused-command-line-argument -Wno-attributes -Wno-noexcept-type -Wno-atomic-alignment -Wno-unused-local-typedef -Wno-c++11-extensions -Wno-user-defined-literals -Wsign-compare -Wunused-variable -Wunused-parameter -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -L/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -L/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -nodefaultlibs -lc++ -lc++abi -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc -o /home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic…
210 mslibcxx CI C++11 > libc++abi.libc++abi::test_aux_runtime_op_array_new.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp -v --target=x86_64-unknown-linux-gnu -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -funwind-tables -nostdinc++ -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/include/c++/v1 -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/src -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/include -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/test/support -std=c++11 -Wall -Walloca -Wcomma -Wextra -Werror -Wshadow -Wundef -Wunreachable-code-aggressive -Wvla -Wdeprecated -Wno-deprecated-dynamic-exception-spec -Wno-pedantic -Wno-unused-command-line-argument -Wno-attributes -Wno-noexcept-type -Wno-atomic-alignment -Wno-unused-local-typedef -Wno-c++11-extensions -Wno-user-defined-literals -Wsign-compare -Wunused-variable -Wunused-parameter -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -L/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -L/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -nodefaultlibs -lc++ -lc++abi -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc -o /home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic…
1,280 mslibcxx CI C++11 > libc++abi.libc++abi::unittest_demangle.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/test/unittest_demangle.pass.cpp -v --target=x86_64-unknown-linux-gnu -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -funwind-tables -nostdinc++ -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/include/c++/v1 -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/src -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/include -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/test/support -std=c++11 -Wall -Walloca -Wcomma -Wextra -Werror -Wshadow -Wundef -Wunreachable-code-aggressive -Wvla -Wdeprecated -Wno-deprecated-dynamic-exception-spec -Wno-pedantic -Wno-unused-command-line-argument -Wno-attributes -Wno-noexcept-type -Wno-atomic-alignment -Wno-unused-local-typedef -Wno-c++11-extensions -Wno-user-defined-literals -Wsign-compare -Wunused-variable -Wunused-parameter -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -L/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -L/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -nodefaultlibs -lc++ -lc++abi -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc -o /home/libcxx-builder/.buildkite-agent/builds/7194ace20781-1/llvm-project/libcxx-ci/build/generic-cxx11/libcxxabi/test/Output/unittest_demangle.pass.cpp.dir/t.
220 mslibcxx CI C++2b > libc++abi.libc++abi::test_aux_runtime_op_array_new.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/libcxxabi/test/test_aux_runtime_op_array_new.pass.cpp -v --target=x86_64-unknown-linux-gnu -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -funwind-tables -nostdinc++ -I/home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/build/generic-cxx2b/include/c++/v1 -I/home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/src -I/home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/libcxxabi/include -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/test/support -std=c++2b -Wall -Walloca -Wcomma -Wextra -Werror -Wshadow -Wundef -Wunreachable-code-aggressive -Wvla -Wdeprecated -Wno-deprecated-dynamic-exception-spec -Wno-pedantic -Wno-unused-command-line-argument -Wno-attributes -Wno-noexcept-type -Wno-atomic-alignment -Wno-unused-local-typedef -Wno-c++11-extensions -Wno-user-defined-literals -Wsign-compare -Wunused-variable -Wunused-parameter -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -L/home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/build/generic-cxx2b/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/build/generic-cxx2b/lib -L/home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/build/generic-cxx2b/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/build/generic-cxx2b/lib -nodefaultlibs -lc++ -lc++abi -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc -o /home/libcxx-builder/.buildkite-agent/builds/3ecb6a9afd9e-1/llvm-project/libcxx-ci/build/generic…
View Full Test Results (8 Failed)

Event Timeline

philnik created this revision.May 21 2022, 7:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2022, 7:34 AM
Herald added a subscriber: arichardson. · View Herald Transcript
philnik requested review of this revision.May 21 2022, 7:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2022, 7:34 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik added inline comments.May 21 2022, 7:36 AM
libcxx/test/std/concepts/concepts.lang/concept.constructible/constructible_from.compile.pass.cpp
109–111

@Mordante These test-cases look completely redundant to me. Do you know why you added them?

jloser added a subscriber: jloser.May 21 2022, 1:34 PM
jloser added inline comments.
libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp
242

This, and below, no longer check the return value of std::visit call is the correct value. Isn't that more or less the whole point of this test?

philnik marked an inline comment as done.May 21 2022, 1:39 PM
philnik added inline comments.
libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp
242

Look closer :). This checks that 42 == 42. This uses the opertor,. std::visit returns void in these cases.

jloser added inline comments.May 21 2022, 1:44 PM
libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp
242

Ah, got it. Thanks!

Seems reasonable to me (LGTM) once CI is green.

philnik updated this revision to Diff 431237.May 22 2022, 6:42 AM
philnik marked an inline comment as done.
  • Try to fix CI
philnik updated this revision to Diff 431267.May 22 2022, 2:36 PM
  • Next try
philnik updated this revision to Diff 431316.May 23 2022, 2:56 AM
  • Next try
Mordante added inline comments.Sun, May 29, 5:58 AM
libcxx/test/std/concepts/concepts.lang/concept.constructible/constructible_from.compile.pass.cpp
109–111

What do you mean with redundant?

libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp
26

Not your change, but it looks like we're not testing anything in this test.

philnik marked an inline comment as done.Sun, May 29, 6:14 AM
philnik added inline comments.
libcxx/test/std/concepts/concepts.lang/concept.constructible/constructible_from.compile.pass.cpp
109–111

Aren't throw() and noexcept specifications indistinguishable? (Same for noexcept and noexcept(true), but these don't produce warnings)

libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp
26

I'll add an assert(false).