summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2020-10-29 08:23:58 +0000
committerMaciej Żenczykowski <maze@google.com>2020-10-29 14:19:52 +0000
commit4407735953d4f981931168f0136784e7ee99103f (patch)
tree24bdeb41caba47d1f837750d8915b60b8d81eacd
parent7d5534c37efca2a01df90e8be45b44a4a5c600e5 (diff)
downloadnetd-android11-tests-dev.tar.gz
Revert hardcoding of cgroup path.android11-tests-dev
Hardcoding the path in the test is a problem because the path used by the device code changed in R QPR1. This means that the same test code will not pass on both R builds and R QPR builds. Currently this test is blocking Pixel QPR build qualification, because aosp/1407127 has not been cherry-picked to android11-tests-dev. That cherry-pick is under review as aosp/1479484 to unblock Pixel. However, if we just merge that cherry-pick and then do nothing else, then when VTS 11.0r2 is released, all devices trying to pass VTS on an R build will fail. Revert the hardcoding. That seems more correct than attempting to check for the two possible paths one after the other, and it also makes any test failures much easier to debug. The harcoding was introduced to fix ASAN-related flakiness on cuttlefish, but it seems like the fix for that problem should not affect the test semantics. Additionally, this test seems quite stable on device (passes 1000 times on a row), so the flakiness might be fixed. This reverts commit 6bacd4fa63f809b113c2a277ae2c68ff14fee17c. Bug: 171770637 Test: BpfBasicTest passed 1000 times in a row on aosp_crosshatch-eng Change-Id: If47f654599e1d29f3bb91b2795559dac53ebe0c4
-rw-r--r--tests/bpf_base_test.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/bpf_base_test.cpp b/tests/bpf_base_test.cpp
index f5d989e7..3d3da44a 100644
--- a/tests/bpf_base_test.cpp
+++ b/tests/bpf_base_test.cpp
@@ -59,15 +59,7 @@ TEST_F(BpfBasicTest, TestCgroupMounted) {
SKIP_IF_BPF_NOT_SUPPORTED;
std::string cg2_path;
-#if 0
- // This is the correct way to fetch cg2_path, but it occasionally hits ASAN
- // problems due to memory allocated in non ASAN code being freed later by us
ASSERT_EQ(true, CgroupGetControllerPath(CGROUPV2_CONTROLLER_NAME, &cg2_path));
-#else
- ASSERT_EQ(true, CgroupGetControllerPath(CGROUPV2_CONTROLLER_NAME, nullptr));
- // Constant derived from //system/core/libprocessgroup/profiles/cgroups.json
- cg2_path = "/sys/fs/cgroup";
-#endif
ASSERT_EQ(0, access(cg2_path.c_str(), R_OK));
ASSERT_EQ(0, access((cg2_path + "/cgroup.controllers").c_str(), R_OK));
}