aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Sesek <rsesek@google.com>2016-12-15 18:58:38 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-12-15 18:58:38 +0000
commita268d415c93e87948d737cb55fd69f3ad0cdcd01 (patch)
treec14f5d7598fbb69b14824288a2febc851f30f9f2
parent5a9bef1d630e6f9886bc77eaccf0457f60a132ab (diff)
parent45dc53194367043d3bd1e5e10ff37c875f9ee7b9 (diff)
downloadseccomp-tests-a268d415c93e87948d737cb55fd69f3ad0cdcd01.tar.gz
Create Android.mk file and a wrapper header for use by CTS. am: 659656f2fd am: faaa6a7035 am: f5b9c09bed
am: 45dc531943 Change-Id: Ida2e2459e43985053f6df5b265da31c39857b5ed
-rw-r--r--Android.mk32
-rw-r--r--seccomp_bpf_tests.h28
2 files changed, 60 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..a7402d7
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,32 @@
+# Copyright (C) 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := external_seccomp_tests
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := linux/seccomp_bpf.c
+
+# TODO(rsesek): Remove after syncing in upstream..
+LOCAL_CFLAGS := -D__ARCH_WANT_SYSCALL_DEPRECATED
+
+LOCAL_SHARED_LIBRARIES := liblog
+
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/seccomp_bpf_tests.h b/seccomp_bpf_tests.h
new file mode 100644
index 0000000..a46be51
--- /dev/null
+++ b/seccomp_bpf_tests.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/**
+ * This header provides access to the Seccomp-BPF kernel test suite,
+ * for use by CTS.
+ */
+
+#include "linux/test_harness.h"
+
+// Forward declare from seccomp_bpf_tests.c.
+extern "C" {
+struct __test_metadata* get_seccomp_test_list();
+}