[PATCH] D151022: [llvm-exegesis] Introduce SubprocessMemory Utility Class
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 03:55:51 PDT 2023
bjope added inline comments.
================
Comment at: llvm/unittests/tools/llvm-exegesis/X86/SubprocessMemoryTest.cpp:58
+TEST_F(SubprocessMemoryTest, MultipleDefinitions) {
+ testCommon({{"test1", {APInt(8, 0xaa), 4096, 0}},
+ {"test2", {APInt(8, 0xbb), 4096, 1}},
----------------
I think these hard-coded PID:s are creating problems if multiple users are running these tests simultaneously.
And it also seems like things aren't cleaned up inside `/dev/shm/` when the test is completed, so even if using the correct PID things might get bad in future runs when the PID is reused.
Right now I see things like this on our servers:
```
server1> ls -l /dev/shm/auxmem*
-rw------- 1 someuser eusers 4096 Jun 28 09:27 /dev/shm/auxmem0
-rw------- 1 someuser eusers 4096 Jun 28 09:27 /dev/shm/auxmem1
-rw------- 1 someuser eusers 4096 Jun 28 09:27 /dev/shm/auxmem2
-rw------- 1 someuser eusers 4096 Jun 28 09:27 /dev/shm/auxmem3
server2> ls -l /dev/shm/auxmem*
-rw------- 1 anotheruser eusers 4096 Jun 28 10:27 /dev/shm/auxmem0
-rw------- 1 anotheruser eusers 4096 Jun 28 10:27 /dev/shm/auxmem1
-rw------- 1 anotheruser eusers 4096 Jun 28 10:27 /dev/shm/auxmem2
-rw------- 1 anotheruser eusers 4096 Jun 28 10:27 /dev/shm/auxmem3
```
This means that if a different user tries to run the llvm-exegesis unittests on those servers the tests will fail:
```
[ RUN ] SubprocessMemoryTest.DefinitionEndTruncation
Program aborted due to an unhandled Error:
Failed to create shared memory object for auxiliary memory: Permission denied
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151022/new/
https://reviews.llvm.org/D151022
More information about the llvm-commits
mailing list