diff options
author | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-07 21:39:21 +0000 |
---|---|---|
committer | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-07 21:39:21 +0000 |
commit | 5a3e520c8db793d414e574e0a74c61ff27dacd7d (patch) | |
tree | 8d5e0358ad72c784fd8b4a767d3892c22c24d3e0 /sandbox/linux | |
parent | be27510df9717e67bc016c650081e7d0d23c10b8 (diff) | |
download | chromium_src-5a3e520c8db793d414e574e0a74c61ff27dacd7d.zip chromium_src-5a3e520c8db793d414e574e0a74c61ff27dacd7d.tar.gz chromium_src-5a3e520c8db793d414e574e0a74c61ff27dacd7d.tar.bz2 |
NaCl non-sfi sandbox: use modern framework for tests
The non-sfi sandbox policy is the implementation of the SandboxBPFPolicy
interface but tests are testing it as an old-style function pointer
policy.
This CL makes use of BPF_TEST_C and BPF_DEATH_TEST_C and takes a classname
as a parameter rather than a function pointer.
BUG=359285
R=mseaborn@chromium.org
Review URL: https://codereview.chromium.org/269333004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268963 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/linux')
-rw-r--r-- | sandbox/linux/seccomp-bpf/bpf_tests.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sandbox/linux/seccomp-bpf/bpf_tests.h b/sandbox/linux/seccomp-bpf/bpf_tests.h index 235aad3..8fa5579 100644 --- a/sandbox/linux/seccomp-bpf/bpf_tests.h +++ b/sandbox/linux/seccomp-bpf/bpf_tests.h @@ -27,15 +27,15 @@ namespace sandbox { test_case_name, test_name, DEATH_SUCCESS(), bpf_policy_class_name) // Identical to BPF_TEST_C but allows to specify the nature of death. -#define BPF_DEATH_TEST_C( \ - test_case_name, test_name, death, bpf_policy_class_name) \ - void BPF_TEST_C_##test_name(); \ - TEST(test_case_name, DISABLE_ON_TSAN(test_name)) { \ - sandbox::SandboxBPFTestRunner bpf_test_runner( \ - new BPFTesterSimpleDelegate<bpf_policy_class_name>( \ - BPF_TEST_C_##test_name)); \ - sandbox::UnitTests::RunTestInProcess(&bpf_test_runner, death); \ - } \ +#define BPF_DEATH_TEST_C( \ + test_case_name, test_name, death, bpf_policy_class_name) \ + void BPF_TEST_C_##test_name(); \ + TEST(test_case_name, DISABLE_ON_TSAN(test_name)) { \ + sandbox::SandboxBPFTestRunner bpf_test_runner( \ + new sandbox::BPFTesterSimpleDelegate<bpf_policy_class_name>( \ + BPF_TEST_C_##test_name)); \ + sandbox::UnitTests::RunTestInProcess(&bpf_test_runner, death); \ + } \ void BPF_TEST_C_##test_name() // This form of BPF_TEST is a little verbose and should be reserved for complex |