diff options
author | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-22 06:36:02 +0000 |
---|---|---|
committer | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-22 06:36:02 +0000 |
commit | fafece1c7120bac8504f1702803121d53d29184b (patch) | |
tree | dc255f6accb9b728e2f7b0687d984da5c8d54469 /sandbox/linux | |
parent | 88bfd25b311285e09b13a9c19c27eb6359a41c71 (diff) | |
download | chromium_src-fafece1c7120bac8504f1702803121d53d29184b.zip chromium_src-fafece1c7120bac8504f1702803121d53d29184b.tar.gz chromium_src-fafece1c7120bac8504f1702803121d53d29184b.tar.bz2 |
Seccomp BPF: initial structure for unittests
- On Linux, support a new sandbox_linux_unittests target
- Add a new seccomp_bpf_unittests target as a dependency of the global
sandbox_linux_unittests target.
- Integrate globally as a chromium_builder_tests dependency
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10635006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143549 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/linux')
-rw-r--r-- | sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc | 11 | ||||
-rw-r--r-- | sandbox/linux/tests/unit_tests.cc | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc new file mode 100644 index 0000000..ead6c4e --- /dev/null +++ b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc @@ -0,0 +1,11 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" +#include "sandbox/linux/seccomp-bpf/verifier.h" +#include "testing/gtest/include/gtest/gtest.h" + +TEST(SandboxBpf, CallSupports) { + playground2::Sandbox::supportsSeccompSandbox(-1); +} diff --git a/sandbox/linux/tests/unit_tests.cc b/sandbox/linux/tests/unit_tests.cc new file mode 100644 index 0000000..999d4a6 --- /dev/null +++ b/sandbox/linux/tests/unit_tests.cc @@ -0,0 +1,9 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "testing/gtest/include/gtest/gtest.h" +int main(int argc, char *argv[]) { + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} |