Convert sandbox_bpf_unittest.cc to use bpf_dsl
commit22aa66d1f28832b92c57f537313e50c709b3c7b5
authormdempsky <mdempsky@chromium.org>
Sat, 13 Sep 2014 01:41:34 +0000 (12 18:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 13 Sep 2014 01:44:14 +0000 (13 01:44 +0000)
tree616addcd06305a205c2de745124824b1044d8c46
parent37e3ddb2b29418584a3e6207dfed7a584712a037
Convert sandbox_bpf_unittest.cc to use bpf_dsl

This unfortunately means converting what are currently sandbox_bpf unit
tests into effectively integration tests for bpf_dsl, as they now test
both bpf_dsl + sandbox_bpf.  However, this is a necessary step towards
eliminating dependencies on the current sandbox_bpf API so that we can
more freely evolve it to fit bpf_dsl's needs.

For ease of review, this only converts tests that were already using
SandboxBPFPolicy (i.e., BPF_TEST()s are left alone), and some of the
conversions are slightly non-idiomatic in the interest of mimicking the
existing test structure.  Both of these will be addressed further in
followup CLs so that this CL can be reviewed as a mere translation of
policies from the sandbox_bpf API to bpf_dsl.

Review URL: https://codereview.chromium.org/559653004

Cr-Commit-Position: refs/heads/master@{#294723}
sandbox/linux/BUILD.gn
sandbox/linux/bpf_dsl/DEPS
sandbox/linux/bpf_dsl/bpf_dsl.cc
sandbox/linux/bpf_dsl/bpf_dsl.h
sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc [moved from sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc with 78% similarity]
sandbox/linux/bpf_dsl/bpf_dsl_unittest.cc
sandbox/linux/sandbox_linux_test_sources.gypi