Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Issue 559653004: Convert sandbox_bpf_unittest.cc to use bpf_dsl (Closed)

Created:
6 years, 3 months ago by mdempsky
Modified:
6 years, 3 months ago
CC:
chromium-reviews, jln+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

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. Committed: https://crrev.com/22aa66d1f28832b92c57f537313e50c709b3c7b5 Cr-Commit-Position: refs/heads/master@{#294723}

Patch Set 1 #

Patch Set 2 : Cleanup #

Patch Set 3 : Remove unneeded helper function #

Patch Set 4 : Sort function definitions #

Patch Set 5 : Revert accidental change #

Patch Set 6 : Restore helper method #

Patch Set 7 : Fix GN build #

Patch Set 8 : Fix ARM build (maybe?) #

Total comments: 16

Patch Set 9 : Respond to jorgelo feedback #

Patch Set 10 : Disable 64-bit {Any,All}Bit tests on 32-bit #

Patch Set 11 : Sync to master #

Total comments: 4

Patch Set 12 : Add unit test for != #

Unified diffs Side-by-side diffs Delta from patch set Stats (+461 lines, -2844 lines) Patch
M sandbox/linux/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -1 line 0 comments Download
M sandbox/linux/bpf_dsl/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M sandbox/linux/bpf_dsl/bpf_dsl.h View 1 3 4 5 5 chunks +38 lines, -15 lines 0 comments Download
M sandbox/linux/bpf_dsl/bpf_dsl.cc View 1 2 3 4 5 4 chunks +69 lines, -4 lines 0 comments Download
A + sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc View 1 2 3 4 5 6 7 8 9 38 chunks +344 lines, -398 lines 0 comments Download
M sandbox/linux/bpf_dsl/bpf_dsl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -0 lines 0 comments Download
M sandbox/linux/sandbox_linux_test_sources.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -1 line 0 comments Download
D sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc View 1 chunk +0 lines, -2425 lines 0 comments Download

Messages

Total messages: 13 (3 generated)
mdempsky
PTAL Apologies in advance for the tedious change. For now, I've only converted the tests ...
6 years, 3 months ago (2014-09-12 00:26:22 UTC) #2
mdempsky
jorgelo: If you could also help review for any accidental conversion errors, that would be ...
6 years, 3 months ago (2014-09-12 00:28:49 UTC) #4
Jorge Lucangeli Obes
First pass. I didn't find any obvious mistake in the test conversions. The addition of ...
6 years, 3 months ago (2014-09-12 20:34:52 UTC) #5
mdempsky
https://codereview.chromium.org/559653004/diff/130008/sandbox/linux/BUILD.gn File sandbox/linux/BUILD.gn (right): https://codereview.chromium.org/559653004/diff/130008/sandbox/linux/BUILD.gn#newcode96 sandbox/linux/BUILD.gn:96: "bpf_dsl/bpf_dsl_more_unittest.cc", On 2014/09/12 20:34:51, Jorge Lucangeli Obes wrote: > ...
6 years, 3 months ago (2014-09-12 21:10:47 UTC) #6
Jorge Lucangeli Obes
This lgtm now.
6 years, 3 months ago (2014-09-12 21:44:55 UTC) #7
jln (very slow on Chromium)
lgtm, thanks! https://chromiumcodereview.appspot.com/559653004/diff/190001/sandbox/linux/bpf_dsl/bpf_dsl.h File sandbox/linux/bpf_dsl/bpf_dsl.h (right): https://chromiumcodereview.appspot.com/559653004/diff/190001/sandbox/linux/bpf_dsl/bpf_dsl.h#newcode68 sandbox/linux/bpf_dsl/bpf_dsl.h:68: // | arg == val | arg ...
6 years, 3 months ago (2014-09-12 23:52:58 UTC) #8
mdempsky
https://codereview.chromium.org/559653004/diff/190001/sandbox/linux/bpf_dsl/bpf_dsl.h File sandbox/linux/bpf_dsl/bpf_dsl.h (right): https://codereview.chromium.org/559653004/diff/190001/sandbox/linux/bpf_dsl/bpf_dsl.h#newcode68 sandbox/linux/bpf_dsl/bpf_dsl.h:68: // | arg == val | arg != val ...
6 years, 3 months ago (2014-09-13 00:20:24 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/559653004/210001
6 years, 3 months ago (2014-09-13 00:32:50 UTC) #11
commit-bot: I haz the power
Committed patchset #12 (id:210001) as 935683d31282bcde3285012073f30a5eb4989a9c
6 years, 3 months ago (2014-09-13 01:42:55 UTC) #12
commit-bot: I haz the power
6 years, 3 months ago (2014-09-13 01:45:55 UTC) #13
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/22aa66d1f28832b92c57f537313e50c709b3c7b5
Cr-Commit-Position: refs/heads/master@{#294723}

Powered by Google App Engine
This is Rietveld 408576698