Nick Kralevich | 6537494 | 2012-12-18 10:36:12 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include <jni.h> |
| 18 | #include <stdio.h> |
Chenjie Luo | 3c3f9d4 | 2014-09-04 16:20:49 -0700 | [diff] [blame] | 19 | #include "android_security_cts_NetlinkSocket.h" |
Nick Kralevich | 6537494 | 2012-12-18 10:36:12 -0800 | [diff] [blame] | 20 | |
Nick Kralevich | 4267ab6 | 2013-11-12 12:14:00 -0800 | [diff] [blame] | 21 | extern int register_android_security_cts_KernelSettingsTest(JNIEnv*); |
Nick Kralevich | 6537494 | 2012-12-18 10:36:12 -0800 | [diff] [blame] | 22 | extern int register_android_security_cts_CharDeviceTest(JNIEnv*); |
Alex Klyubin | e49838e | 2013-08-23 10:25:04 -0700 | [diff] [blame] | 23 | extern int register_android_security_cts_LinuxRngTest(JNIEnv*); |
Nick Kralevich | deadf91 | 2013-07-02 17:18:09 -0700 | [diff] [blame] | 24 | extern int register_android_security_cts_NativeCodeTest(JNIEnv*); |
Eric Laurent | 6fe72da | 2013-08-23 17:29:00 -0700 | [diff] [blame] | 25 | extern int register_android_security_cts_LoadEffectLibraryTest(JNIEnv*); |
Robert Sesek | 9a2dedf | 2014-02-28 15:05:15 -0500 | [diff] [blame] | 26 | extern int register_android_security_cts_SeccompDeathTestService(JNIEnv*); |
Nick Kralevich | 9d47ac4 | 2013-10-10 16:24:46 -0700 | [diff] [blame] | 27 | extern int register_android_security_cts_SELinuxTest(JNIEnv*); |
Anton Carver | ca7f0f8 | 2014-08-13 18:08:27 +0100 | [diff] [blame] | 28 | extern int register_android_security_cts_MMapExecutableTest(JNIEnv* env); |
Eric Laurent | 424e926 | 2014-10-29 10:07:07 -0700 | [diff] [blame] | 29 | extern int register_android_security_cts_AudioPolicyBinderTest(JNIEnv* env); |
jjwong | fc2d5e2 | 2016-04-13 15:32:43 +0800 | [diff] [blame] | 30 | extern int register_android_security_cts_AudioEffectBinderTest(JNIEnv* env); |
jjwong | bf2570c | 2016-04-15 10:38:06 +0800 | [diff] [blame] | 31 | extern int register_android_security_cts_StagefrightFoundationTest(JNIEnv* env); |
Nick Kralevich | 6537494 | 2012-12-18 10:36:12 -0800 | [diff] [blame] | 32 | |
| 33 | jint JNI_OnLoad(JavaVM *vm, void *reserved) { |
| 34 | JNIEnv *env = NULL; |
| 35 | |
| 36 | if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) { |
| 37 | return JNI_ERR; |
| 38 | } |
| 39 | |
| 40 | if (register_android_security_cts_CharDeviceTest(env)) { |
| 41 | return JNI_ERR; |
| 42 | } |
| 43 | |
Alex Klyubin | e49838e | 2013-08-23 10:25:04 -0700 | [diff] [blame] | 44 | if (register_android_security_cts_LinuxRngTest(env)) { |
| 45 | return JNI_ERR; |
| 46 | } |
| 47 | |
Nick Kralevich | deadf91 | 2013-07-02 17:18:09 -0700 | [diff] [blame] | 48 | if (register_android_security_cts_NativeCodeTest(env)) { |
| 49 | return JNI_ERR; |
| 50 | } |
| 51 | |
Eric Laurent | 6fe72da | 2013-08-23 17:29:00 -0700 | [diff] [blame] | 52 | if (register_android_security_cts_LoadEffectLibraryTest(env)) { |
| 53 | return JNI_ERR; |
| 54 | } |
| 55 | |
Robert Sesek | 9a2dedf | 2014-02-28 15:05:15 -0500 | [diff] [blame] | 56 | if (register_android_security_cts_SeccompDeathTestService(env)) { |
| 57 | return JNI_ERR; |
| 58 | } |
| 59 | |
Nick Kralevich | 9d47ac4 | 2013-10-10 16:24:46 -0700 | [diff] [blame] | 60 | if (register_android_security_cts_SELinuxTest(env)) { |
| 61 | return JNI_ERR; |
| 62 | } |
| 63 | |
Nick Kralevich | 4267ab6 | 2013-11-12 12:14:00 -0800 | [diff] [blame] | 64 | if (register_android_security_cts_KernelSettingsTest(env)) { |
| 65 | return JNI_ERR; |
| 66 | } |
| 67 | |
Anton Carver | ca7f0f8 | 2014-08-13 18:08:27 +0100 | [diff] [blame] | 68 | if (register_android_security_cts_MMapExecutableTest(env)) { |
| 69 | return JNI_ERR; |
| 70 | } |
| 71 | |
Chenjie Luo | 3c3f9d4 | 2014-09-04 16:20:49 -0700 | [diff] [blame] | 72 | if (register_android_security_cts_NetlinkSocket(env)) { |
| 73 | return JNI_ERR; |
| 74 | } |
| 75 | |
Eric Laurent | 424e926 | 2014-10-29 10:07:07 -0700 | [diff] [blame] | 76 | if (register_android_security_cts_AudioPolicyBinderTest(env)) { |
| 77 | return JNI_ERR; |
| 78 | } |
| 79 | |
jjwong | fc2d5e2 | 2016-04-13 15:32:43 +0800 | [diff] [blame] | 80 | if (register_android_security_cts_AudioEffectBinderTest(env)) { |
| 81 | return JNI_ERR; |
| 82 | } |
| 83 | |
jjwong | bf2570c | 2016-04-15 10:38:06 +0800 | [diff] [blame] | 84 | if (register_android_security_cts_StagefrightFoundationTest(env)) { |
| 85 | return JNI_ERR; |
| 86 | } |
| 87 | |
Nick Kralevich | 6537494 | 2012-12-18 10:36:12 -0800 | [diff] [blame] | 88 | return JNI_VERSION_1_4; |
| 89 | } |