aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-06-06 11:21:04 -0700
committerElliott Hughes <enh@google.com>2018-06-06 21:32:02 +0000
commit5b184a669f115900125e36f9d6fd5cf3cabcefdb (patch)
tree2671346aca58b25ff4d7dfd14e530980bbad479b
parentb40895cf8afd01f80259a621b2a7831f57adf3b8 (diff)
downloadminijail-5b184a669f115900125e36f9d6fd5cf3cabcefdb.tar.gz
Fix aarch64 test failure.android-n-iot-release-polk-at1
aarch64 doesn't have the legacy `open` syscall, only `openat`. libminijail[7803]: compile_file: policy(1): nonexistent syscall 'open' libminijail[7803]: compile_filter: compile_file() failed external/minijail/syscall_filter_unittest.cc:1195: Failure Expected equality of these values: res Which is: -1 0 Switch to `read` instead, because every arch has always had `read`. Bug: N/A Test: ran arm and aarch64 tests manually Change-Id: If6205e62c6ff787323aee461640ab364048c8357
-rw-r--r--syscall_filter_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/syscall_filter_unittest.cc b/syscall_filter_unittest.cc
index 9beac65..b3bd59a 100644
--- a/syscall_filter_unittest.cc
+++ b/syscall_filter_unittest.cc
@@ -1182,7 +1182,7 @@ TEST(FilterTest, seccomp_read_write) {
TEST(FilterTest, misplaced_whitespace) {
struct sock_fprog actual;
- const char *policy = "open :1\n";
+ const char *policy = "read :1\n";
FILE *policy_file = write_policy_to_pipe(policy, strlen(policy));
ASSERT_NE(policy_file, nullptr);