aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Sesek <rsesek@google.com>2017-01-06 23:33:24 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-01-06 23:33:24 +0000
commitc5d2ad948a8029d6d826d8dccc51414c2b133012 (patch)
tree05033a07674e3a9bd48dbe59e752b7f94bc7424c
parent8a50a6e8e282036c67346353f18e20b09a2b077c (diff)
parentd6c3617be21105f870a1c64aa271cb984de4459b (diff)
downloadplatform_external_seccomp-tests-c5d2ad948a8029d6d826d8dccc51414c2b133012.tar.gz
platform_external_seccomp-tests-c5d2ad948a8029d6d826d8dccc51414c2b133012.tar.bz2
platform_external_seccomp-tests-c5d2ad948a8029d6d826d8dccc51414c2b133012.zip
Create Android.mk file and a wrapper header for use by CTS. am: bfa234af02 am: 756f63abc9 am: b9ff15fb26
am: d6c3617be2 Change-Id: Ida2b8d36849635b06bf365762d6aac3c43382a59
-rw-r--r--Android.mk40
-rw-r--r--seccomp_bpf_tests.h28
2 files changed, 68 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..317416c
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,40 @@
+# 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
+
+# mips and mips64 don't support Seccomp.
+LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := linux/seccomp_bpf.c
+
+LOCAL_CFLAGS := -Wno-gnu-designator \
+ -Wno-unused-parameter \
+ -Wno-literal-conversion \
+ -Wno-incompatible-pointer-types-discards-qualifiers \
+ -Wno-sign-compare \
+ -Wno-empty-body \
+ -D__ARCH_WANT_SYSCALL_DEPRECATED # TODO(rsesek): Remove after syncing in upstream.
+
+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();
+}