Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm-exegesis] Make SubprocessMemoryTest use PIDs #65245

Merged

Conversation

boomanaiden154
Copy link
Contributor

This patch makes SubprocessMemoryTest use process PIDs during creation of the SubprocessMemory objects within the tests so that there isn't interference between multiple instances of the test running at the same time which could potentially occur in multi-user environments.

This is a continuation the review in https://reviews.llvm.org/D154680.

This patch makes SubprocessMemoryTest use process PIDs during creation
of the SubprocessMemory objects within the tests so that there isn't
interference between multiple instances of the test running at the same
time which could potentially occur in multi-user environments.
Copy link
Collaborator

@bjope bjope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@boomanaiden154 boomanaiden154 merged commit adb01de into llvm:main Sep 8, 2023
1 check passed
@jakeegan
Copy link
Member

jakeegan commented Sep 8, 2023

Hi, on AIX there is the error:

FAILED: unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SubprocessMemoryTest.cpp.o 
/usr/local/clang-15.0.0/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LARGE_FILE_API -D_LIBCPP_ENABLE_HARDENED_MODE -D_XOPEN_SOURCE=700 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/unittests/tools/llvm-exegesis -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/tools/llvm-exegesis -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/include -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/include -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/tools/llvm-exegesis/lib -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/Target/X86 -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/Target/X86 -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/Target/AArch64 -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/Target/AArch64 -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/Target/PowerPC -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/Target/PowerPC -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/Target/Mips -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/Target/Mips -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googlemock/include -mcmodel=large -fPIC -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SubprocessMemoryTest.cpp.o -MF unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SubprocessMemoryTest.cpp.o.d -o unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SubprocessMemoryTest.cpp.o -c /scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/tools/llvm-exegesis/X86/SubprocessMemoryTest.cpp
/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/tools/llvm-exegesis/X86/SubprocessMemoryTest.cpp:25:31: error: unused variable 'TestCount' [-Werror,-Wunused-const-variable]
static constexpr const size_t TestCount = 4;
                              ^
1 error generated.

https://lab.llvm.org/buildbot/#/builders/214/builds/9384

Looks like the variable should be guarded too?

@bjope
Copy link
Collaborator

bjope commented Sep 8, 2023

Hi, on AIX there is the error:

FAILED: unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SubprocessMemoryTest.cpp.o 
/usr/local/clang-15.0.0/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LARGE_FILE_API -D_LIBCPP_ENABLE_HARDENED_MODE -D_XOPEN_SOURCE=700 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/unittests/tools/llvm-exegesis -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/tools/llvm-exegesis -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/include -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/include -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/tools/llvm-exegesis/lib -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/Target/X86 -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/Target/X86 -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/Target/AArch64 -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/Target/AArch64 -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/Target/PowerPC -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/Target/PowerPC -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/Target/Mips -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/Target/Mips -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include -I/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googlemock/include -mcmodel=large -fPIC -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SubprocessMemoryTest.cpp.o -MF unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SubprocessMemoryTest.cpp.o.d -o unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SubprocessMemoryTest.cpp.o -c /scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/tools/llvm-exegesis/X86/SubprocessMemoryTest.cpp
/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/tools/llvm-exegesis/X86/SubprocessMemoryTest.cpp:25:31: error: unused variable 'TestCount' [-Werror,-Wunused-const-variable]
static constexpr const size_t TestCount = 4;
                              ^
1 error generated.

https://lab.llvm.org/buildbot/#/builders/214/builds/9384

Looks like the variable should be guarded too?

Attempted to fix that here: 7b3f6e6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants