This is an archive of the discontinued LLVM Phabricator instance.

[clang-repl] Disable execution unittests on unsupported platforms.
ClosedPublic

Authored by sunho on Jul 29 2022, 10:26 AM.

Details

Summary

After the intoduction of global destructor support, there is a possiblity to run invalid instructions in the destructor of Interpreter class. Completely disable tests in platforms with failing test cases.

Diff Detail

Event Timeline

sunho created this revision.Jul 29 2022, 10:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2022, 10:26 AM
sunho requested review of this revision.Jul 29 2022, 10:26 AM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 29 2022, 10:28 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2022, 10:28 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

If you're going to post a patch for review, you really should wait for someone to review it before you land it.

If you're going to post a patch for review, you really should wait for someone to review it before you land it.

I rushed as bots were breaking on the upstream. Sorry about that.

I'm still seeing a failure on my downstream Arm compiler on Linux in the unit tests -- I thought I saw the same failure on the buildbots:

FAIL: llvm_regressions :: Clang-Unit/Interpreter/ClangReplInterpreterTests/1/8
3		--------------------------------------------------------------------------------
4		Script(shard):
5		--
6		GTEST_OUTPUT=json:/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests-Clang-Unit-39149-1-8.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=8 GTEST_SHARD_INDEX=1 /scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests
7		--
8		 
9		Note: This is test shard 2 of 8.
10		[==========] Running 1 test from 1 test suite.
11		[----------] Global test environment set-up.
12		[----------] 1 test from IncrementalProcessing
13		[ RUN      ] IncrementalProcessing.FindMangledNameSymbol
14		 #0 0x0000000000676fc3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x676fc3)
15		 #1 0x0000000000674e1c llvm::sys::RunSignalHandlers() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x674e1c)
16		 #2 0x00000000006775c6 SignalHandler(int) (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x6775c6)
17		 #3 0x00007fa295c6f330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
18		 #4 0x0000000000b54a97 clang::IncrementalExecutor::cleanUp() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0xb54a97)
19		 #5 0x0000000000b521e4 clang::Interpreter::~Interpreter() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0xb521e4)
20		 #6 0x0000000000489a13 (anonymous namespace)::IncrementalProcessing_FindMangledNameSymbol_Test::TestBody() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x489a13)
21		 #7 0x000000000068889c testing::Test::Run() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x68889c)
22		 #8 0x00000000006895c9 testing::TestInfo::Run() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x6895c9)
23		 #9 0x0000000000689c77 testing::TestSuite::Run() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x689c77)
24		#10 0x0000000000699647 testing::internal::UnitTestImpl::RunAllTests() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x699647)
25		#11 0x0000000000698ec3 testing::UnitTest::Run() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x698ec3)
26		#12 0x0000000000680fec main (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x680fec)
27		#13 0x00007fa294d64f45 __libc_start_main /build/eglibc-xkFqqE/eglibc-2.19/csu/libc-start.c:321:0
28		#14 0x000000000047fff5 _start (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x47fff5)
sunho added a comment.Jul 29 2022, 3:05 PM

I'm still seeing a failure on my downstream Arm compiler on Linux in the unit tests -- I thought I saw the same failure on the buildbots:

FAIL: llvm_regressions :: Clang-Unit/Interpreter/ClangReplInterpreterTests/1/8
3		--------------------------------------------------------------------------------
4		Script(shard):
5		--
6		GTEST_OUTPUT=json:/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests-Clang-Unit-39149-1-8.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=8 GTEST_SHARD_INDEX=1 /scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests
7		--
8		 
9		Note: This is test shard 2 of 8.
10		[==========] Running 1 test from 1 test suite.
11		[----------] Global test environment set-up.
12		[----------] 1 test from IncrementalProcessing
13		[ RUN      ] IncrementalProcessing.FindMangledNameSymbol
14		 #0 0x0000000000676fc3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x676fc3)
15		 #1 0x0000000000674e1c llvm::sys::RunSignalHandlers() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x674e1c)
16		 #2 0x00000000006775c6 SignalHandler(int) (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x6775c6)
17		 #3 0x00007fa295c6f330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
18		 #4 0x0000000000b54a97 clang::IncrementalExecutor::cleanUp() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0xb54a97)
19		 #5 0x0000000000b521e4 clang::Interpreter::~Interpreter() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0xb521e4)
20		 #6 0x0000000000489a13 (anonymous namespace)::IncrementalProcessing_FindMangledNameSymbol_Test::TestBody() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x489a13)
21		 #7 0x000000000068889c testing::Test::Run() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x68889c)
22		 #8 0x00000000006895c9 testing::TestInfo::Run() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x6895c9)
23		 #9 0x0000000000689c77 testing::TestSuite::Run() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x689c77)
24		#10 0x0000000000699647 testing::internal::UnitTestImpl::RunAllTests() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x699647)
25		#11 0x0000000000698ec3 testing::UnitTest::Run() (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x698ec3)
26		#12 0x0000000000680fec main (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x680fec)
27		#13 0x00007fa294d64f45 __libc_start_main /build/eglibc-xkFqqE/eglibc-2.19/csu/libc-start.c:321:0
28		#14 0x000000000047fff5 _start (/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/arm-llvm/RelWithAsserts/llvm/tools/clang/unittests/Interpreter/./ClangReplInterpreterTests+0x47fff5)

I'm aware it's not fixed yet. I have another fix on my local machine that I'm building right now -- I'll commit it once I confirmed it builds on my machine.

sunho added a comment.Jul 29 2022, 4:21 PM

@alanphipps I just confirmed that the buildbot failures were fixed by the new fix https://reviews.llvm.org/rG65c9265f4158. Could you check out if this fixes the failure on your end too?

@alanphipps I just confirmed that the buildbot failures were fixed by the new fix https://reviews.llvm.org/rG65c9265f4158. Could you check out if this fixes the failure on your end too?

Yes it appears to be passing now. Thank you!