binderRpcTest: hermiticity - salt UDS name w/ PID
When binderRpcTest, binderRpcTestNoKernel, etc.. run at the same
time, they sometimes conflict. It seems the infra has started running
them at the same time (suspected).
Bug: 271860373
Test: binderRpcTest
Change-Id: I29d441cb3126b8960c5a30debca7b20cc1723863
diff --git a/libs/binder/tests/binderRpcTest.cpp b/libs/binder/tests/binderRpcTest.cpp
index 6e34d25..d193d84 100644
--- a/libs/binder/tests/binderRpcTest.cpp
+++ b/libs/binder/tests/binderRpcTest.cpp
@@ -129,7 +129,7 @@
static std::string allocateSocketAddress() {
static size_t id = 0;
std::string temp = getenv("TMPDIR") ?: "/tmp";
- auto ret = temp + "/binderRpcTest_" + std::to_string(id++);
+ auto ret = temp + "/binderRpcTest_" + std::to_string(getpid()) + "_" + std::to_string(id++);
unlink(ret.c_str());
return ret;
};