summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChenbo Feng <fengc@google.com>2019-04-23 14:36:44 -0700
committerChenbo Feng <fengc@google.com>2019-04-30 12:12:39 -0700
commit1fcc19da50aca1a2a7ca836f62925fafcc3a31f3 (patch)
treeae4bbbd7dcf64766dfe7e7b41c28e07d91d81f4e
parent9c01b14e5e9b19e6ed69068b17ac0a6b2fe3a2b2 (diff)
downloadplatform_test_vts-testcase_kernel-1fcc19da50aca1a2a7ca836f62925fafcc3a31f3.tar.gz
platform_test_vts-testcase_kernel-1fcc19da50aca1a2a7ca836f62925fafcc3a31f3.tar.bz2
platform_test_vts-testcase_kernel-1fcc19da50aca1a2a7ca836f62925fafcc3a31f3.zip
Clean up the vts test nits
Follow up CL to delete the redundant clean up code path for bpf object. Rename the module name in the android.bp file. Bug: 130206035 Test: vts_test_binary_bpf_module Change-Id: I0765a43d6e6f1f958098ee52928c0bfa4296ce3f Merged-In: I0765a43d6e6f1f958098ee52928c0bfa4296ce3f (cherry picked from commit 34adb9a0e34439fc0f3629ec9ae1c322a17efc8d)
-rw-r--r--api/bpf_native_test/Android.bp4
-rw-r--r--api/bpf_native_test/BpfTest.cpp7
2 files changed, 2 insertions, 9 deletions
diff --git a/api/bpf_native_test/Android.bp b/api/bpf_native_test/Android.bp
index 9d1604c8..bcd26da4 100644
--- a/api/bpf_native_test/Android.bp
+++ b/api/bpf_native_test/Android.bp
@@ -38,13 +38,13 @@ cc_test {
"-Wno-unused-variable",
],
data: [
- ":bpf_vts_kern.o",
+ ":kern.o",
],
}
bpf {
- name: "bpf_vts_kern.o",
+ name: "kern.o",
srcs: ["kern.c"],
cflags: [
"-Wall",
diff --git a/api/bpf_native_test/BpfTest.cpp b/api/bpf_native_test/BpfTest.cpp
index 1faad195..9a1f9134 100644
--- a/api/bpf_native_test/BpfTest.cpp
+++ b/api/bpf_native_test/BpfTest.cpp
@@ -143,12 +143,6 @@ class BpfRaceTest : public ::testing::Test {
int prog_fd = bpfFdGet(TEST_PROG_PATH, 0);
EXPECT_OK(configurationMap.writeValue(ACTIVE_MAP_KEY, 0, BPF_ANY));
- // Clean up the pinned program and maps after setup.
- EXPECT_EQ(0, remove(TEST_PROG_PATH));
- EXPECT_EQ(0, remove(TEST_STATS_MAP_A_PATH));
- EXPECT_EQ(0, remove(TEST_STATS_MAP_B_PATH));
- EXPECT_EQ(0, remove(TEST_CONFIGURATION_MAP_PATH));
-
for (int i = 0; i < NUM_SOCKETS; i++) {
tds[i] = std::thread(workerThread, prog_fd, &stop);
}
@@ -163,7 +157,6 @@ class BpfRaceTest : public ::testing::Test {
tds[i].join();
}
remove(TEST_PROG_PATH);
- remove(TEST_PROG_PATH);
remove(TEST_STATS_MAP_A_PATH);
remove(TEST_STATS_MAP_B_PATH);
remove(TEST_CONFIGURATION_MAP_PATH);