Merge "Revert "CtsMediaBitstreamsTestCases: bitstreams package via annotation"" into oc-dev am: d7317b21af
am: 6c7df20e2e
Change-Id: I0e41511afbb1eb960389c2b0ee577411e4e9fad1
diff --git a/apps/CtsVerifier/Android.mk b/apps/CtsVerifier/Android.mk
index d82c24c..d5ea50c 100644
--- a/apps/CtsVerifier/Android.mk
+++ b/apps/CtsVerifier/Android.mk
@@ -40,6 +40,8 @@
compatibility-device-util \
platform-test-annotations
+LOCAL_JAVA_LIBRARIES := legacy-android-test
+
LOCAL_PACKAGE_NAME := CtsVerifier
LOCAL_JNI_SHARED_LIBRARIES := libctsverifier_jni \
diff --git a/apps/CtsVerifier/jni/verifier/Android.mk b/apps/CtsVerifier/jni/verifier/Android.mk
index 1e43211..42e2d26 100644
--- a/apps/CtsVerifier/jni/verifier/Android.mk
+++ b/apps/CtsVerifier/jni/verifier/Android.mk
@@ -32,5 +32,7 @@
LOCAL_SHARED_LIBRARIES := liblog \
libnativehelper_compat_libc++
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/build/device_info_package.mk b/build/device_info_package.mk
index dcc81d3..d9d08e8 100644
--- a/build/device_info_package.mk
+++ b/build/device_info_package.mk
@@ -49,7 +49,7 @@
# Generator of APK manifests.
MANIFEST_GENERATOR_JAR := $(HOST_OUT_JAVA_LIBRARIES)/compatibility-manifest-generator.jar
-MANIFEST_GENERATOR := java -jar $(MANIFEST_GENERATOR_JAR)
+MANIFEST_GENERATOR := $(JAVA) -jar $(MANIFEST_GENERATOR_JAR)
# Generate the manifest
manifest_xml := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME))/AndroidManifest.xml
diff --git a/common/device-side/util/jni/Android.mk b/common/device-side/util/jni/Android.mk
index 7b73707..8627d24 100644
--- a/common/device-side/util/jni/Android.mk
+++ b/common/device-side/util/jni/Android.mk
@@ -32,4 +32,6 @@
LOCAL_STATIC_LIBRARIES := cpufeatures
LOCAL_SDK_VERSION := 19
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/hostsidetests/appsecurity/test-apps/UsePermissionApp22/Android.mk b/hostsidetests/appsecurity/test-apps/UsePermissionApp22/Android.mk
index 8e51f22..e4fba42 100644
--- a/hostsidetests/appsecurity/test-apps/UsePermissionApp22/Android.mk
+++ b/hostsidetests/appsecurity/test-apps/UsePermissionApp22/Android.mk
@@ -23,8 +23,9 @@
android-support-test \
compatibility-device-util \
ctstestrunner \
- ub-uiautomator \
- legacy-android-test
+ ub-uiautomator
+
+LOCAL_JAVA_LIBRARIES := legacy-android-test
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
../ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java \
diff --git a/hostsidetests/appsecurity/test-apps/UsePermissionApp23/Android.mk b/hostsidetests/appsecurity/test-apps/UsePermissionApp23/Android.mk
index 5e623d8..58a639d 100644
--- a/hostsidetests/appsecurity/test-apps/UsePermissionApp23/Android.mk
+++ b/hostsidetests/appsecurity/test-apps/UsePermissionApp23/Android.mk
@@ -23,8 +23,9 @@
android-support-test \
compatibility-device-util \
ctstestrunner \
- ub-uiautomator \
- legacy-android-test
+ ub-uiautomator
+
+LOCAL_JAVA_LIBRARIES := legacy-android-test
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
../ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java
diff --git a/hostsidetests/devicepolicy/app/AccountCheck/Auth/Android.mk b/hostsidetests/devicepolicy/app/AccountCheck/Auth/Android.mk
index c9bd048..87700c5 100644
--- a/hostsidetests/devicepolicy/app/AccountCheck/Auth/Android.mk
+++ b/hostsidetests/devicepolicy/app/AccountCheck/Auth/Android.mk
@@ -31,8 +31,9 @@
android-support-v4 \
ctstestrunner \
ub-uiautomator \
- android-support-test \
- legacy-android-test
+ android-support-test
+
+LOCAL_JAVA_LIBRARIES := legacy-android-test
LOCAL_SDK_VERSION := test_current
diff --git a/hostsidetests/devicepolicy/app/DeviceAdmin/api23/Android.mk b/hostsidetests/devicepolicy/app/DeviceAdmin/api23/Android.mk
index 7d277d9..f60ea94 100644
--- a/hostsidetests/devicepolicy/app/DeviceAdmin/api23/Android.mk
+++ b/hostsidetests/devicepolicy/app/DeviceAdmin/api23/Android.mk
@@ -28,8 +28,9 @@
LOCAL_STATIC_JAVA_LIBRARIES := \
ctstestrunner \
- compatibility-device-util \
- legacy-android-test
+ compatibility-device-util
+
+LOCAL_JAVA_LIBRARIES := legacy-android-test
LOCAL_SDK_VERSION := current
diff --git a/hostsidetests/devicepolicy/app/DeviceAdmin/api24/Android.mk b/hostsidetests/devicepolicy/app/DeviceAdmin/api24/Android.mk
index ab38265..71496fb 100644
--- a/hostsidetests/devicepolicy/app/DeviceAdmin/api24/Android.mk
+++ b/hostsidetests/devicepolicy/app/DeviceAdmin/api24/Android.mk
@@ -28,8 +28,9 @@
LOCAL_STATIC_JAVA_LIBRARIES := \
ctstestrunner \
- compatibility-device-util \
- legacy-android-test
+ compatibility-device-util
+
+LOCAL_JAVA_LIBRARIES := legacy-android-test
LOCAL_SDK_VERSION := current
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api23/Android.mk b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api23/Android.mk
index f8467c1..dfe3f21 100644
--- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api23/Android.mk
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api23/Android.mk
@@ -24,7 +24,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, ../src)
-LOCAL_JAVA_LIBRARIES = conscrypt
+LOCAL_JAVA_LIBRARIES = conscrypt legacy-android-test
LOCAL_STATIC_JAVA_LIBRARIES = android-support-v4 compatibility-device-util ctstestrunner ub-uiautomator
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api25/Android.mk b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api25/Android.mk
index 8a0d559..f8de3cf 100644
--- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api25/Android.mk
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api25/Android.mk
@@ -24,7 +24,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, ../src)
-LOCAL_JAVA_LIBRARIES = conscrypt
+LOCAL_JAVA_LIBRARIES = conscrypt legacy-android-test
LOCAL_STATIC_JAVA_LIBRARIES = android-support-v4 compatibility-device-util ctstestrunner ub-uiautomator
diff --git a/hostsidetests/devicepolicy/app/LauncherTests/Android.mk b/hostsidetests/devicepolicy/app/LauncherTests/Android.mk
index 5bb5c80..4604b2c 100644
--- a/hostsidetests/devicepolicy/app/LauncherTests/Android.mk
+++ b/hostsidetests/devicepolicy/app/LauncherTests/Android.mk
@@ -24,13 +24,12 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_JAVA_LIBRARIES := android.test.runner cts-junit
+LOCAL_JAVA_LIBRARIES := legacy-android-test cts-junit
LOCAL_STATIC_JAVA_LIBRARIES = \
android-support-v4 \
ctstestrunner \
- android-support-test \
- legacy-android-test
+ android-support-test
LOCAL_SDK_VERSION := current
diff --git a/hostsidetests/devicepolicy/app/LauncherTestsSupport/Android.mk b/hostsidetests/devicepolicy/app/LauncherTestsSupport/Android.mk
index 95b3e27..3c3adcf 100644
--- a/hostsidetests/devicepolicy/app/LauncherTestsSupport/Android.mk
+++ b/hostsidetests/devicepolicy/app/LauncherTestsSupport/Android.mk
@@ -24,7 +24,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_JAVA_LIBRARIES := android.test.runner cts-junit
+LOCAL_JAVA_LIBRARIES := cts-junit
LOCAL_SDK_VERSION := current
diff --git a/hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.mk b/hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.mk
index f438d83..8896f6a 100644
--- a/hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.mk
+++ b/hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.mk
@@ -24,7 +24,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_JAVA_LIBRARIES := android.test.runner cts-junit
+LOCAL_JAVA_LIBRARIES := cts-junit
LOCAL_STATIC_JAVA_LIBRARIES := \
ctstestrunner \
diff --git a/hostsidetests/jvmti/base/jni/cts_agent.cpp b/hostsidetests/jvmti/base/jni/cts_agent.cpp
index bb1e620..665a47e 100644
--- a/hostsidetests/jvmti/base/jni/cts_agent.cpp
+++ b/hostsidetests/jvmti/base/jni/cts_agent.cpp
@@ -49,7 +49,7 @@
LOG(FATAL) << "Could not get shared jvmtiEnv";
}
- SetAllCapabilities(jvmti_env);
+ SetStandardCapabilities(jvmti_env);
return 0;
}
@@ -64,7 +64,7 @@
LOG(FATAL) << "Could not get shared jvmtiEnv";
}
- SetAllCapabilities(jvmti_env);
+ SetStandardCapabilities(jvmti_env);
InformMainAttach(jvmti_env, env, kMainClass, kMainClassStartup);
return 0;
}
diff --git a/hostsidetests/jvmti/base/run-test-based-app/AndroidManifest.xml b/hostsidetests/jvmti/base/run-test-based-app/AndroidManifest.xml
deleted file mode 100644
index a2d6ca6..0000000
--- a/hostsidetests/jvmti/base/run-test-based-app/AndroidManifest.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2017 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 is a sample of how to create an app for a run-test-based JVMTI
- * test.
- -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.jvmti.cts.run_test_{NR}">
-
- <application android:debuggable="true">
- <uses-library android:name="android.test.runner" />
- <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="{NR}" />
- <activity android:name="android.jvmti.JvmtiActivity" >
- </activity>
- </application>
-
- <!-- self-instrumenting test package. -->
- <instrumentation
- android:name="android.support.test.runner.AndroidJUnitRunner"
- android:label="CTS tests for JVMTI"
- android:targetPackage="android.jvmti.cts.run_test_{NR}" >
- </instrumentation>
-</manifest>
-
diff --git a/hostsidetests/jvmti/redefining/app/src/android/jvmti/cts/JvmtiRedefineClassesTest.java b/hostsidetests/jvmti/redefining/app/src/android/jvmti/cts/JvmtiRedefineClassesTest.java
index a7bd120..d68d1dd 100644
--- a/hostsidetests/jvmti/redefining/app/src/android/jvmti/cts/JvmtiRedefineClassesTest.java
+++ b/hostsidetests/jvmti/redefining/app/src/android/jvmti/cts/JvmtiRedefineClassesTest.java
@@ -342,7 +342,6 @@
* return-object v0
* .end method
*/
- /* DISABLED Due to b/62237378
new RedefineError(JvmtiErrors.FAILS_VERIFICATION, Transform2.class,
"ZGV4CjAzNQBOhefYdQRcgqmkwhWsSyzb5I3udX0SnJ44AwAAcAAAAHhWNBIAAAAAAAAAAIwCAAAN" +
"AAAAcAAAAAYAAACkAAAAAQAAALwAAAAAAAAAAAAAAAMAAADIAAAAAQAAAOAAAAA4AgAAAAEAAAAB" +
@@ -359,7 +358,6 @@
"BgAAAKQAAAADAAAAAQAAALwAAAAFAAAAAwAAAMgAAAAGAAAAAQAAAOAAAAACIAAADQAAAAABAAAE" +
"IAAAAgAAABgCAAADEAAAAgAAACgCAAAGIAAAAQAAADgCAAADIAAAAgAAAEgCAAABIAAAAgAAAFQC" +
"AAAAIAAAAQAAAH4CAAAAEAAAAQAAAIwCAAA="),
- */
/**
* Base64 for this class.
*
diff --git a/hostsidetests/jvmti/run-tests/Android.mk b/hostsidetests/jvmti/run-tests/Android.mk
index 64fe597..d344747 100644
--- a/hostsidetests/jvmti/run-tests/Android.mk
+++ b/hostsidetests/jvmti/run-tests/Android.mk
@@ -13,5 +13,157 @@
# limitations under the License.
LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+# shim classes. We use one that exposes the common functionality.
+LOCAL_SHIM_CLASSES := \
+ src/902-hello-transformation/src/art/Redefinition.java \
+ src/903-hello-tagging/src/art/Main.java \
+ src/989-method-trace-throw/src/art/Trace.java \
+
+LOCAL_SRC_FILES := $(LOCAL_SHIM_CLASSES)
+
+# Actual test classes.
+LOCAL_SRC_FILES += \
+ src/901-hello-ti-agent/src/art/Test901.java \
+ src/902-hello-transformation/src/art/Test902.java \
+ src/903-hello-tagging/src/art/Test903.java \
+ src/904-object-allocation/src/art/Test904.java \
+ src/905-object-free/src/art/Test905.java \
+ src/906-iterate-heap/src/art/Test906.java \
+ src/907-get-loaded-classes/src/art/Test907.java \
+ src/907-get-loaded-classes/src/art/Cerr.java \
+ src/908-gc-start-finish/src/art/Test908.java \
+ src/910-methods/src/art/Test910.java \
+ src/911-get-stack-trace/src/art/Test911.java \
+ src/911-get-stack-trace/src/art/AllTraces.java \
+ src/911-get-stack-trace/src/art/ControlData.java \
+ src/911-get-stack-trace/src/art/Frames.java \
+ src/911-get-stack-trace/src/art/OtherThread.java \
+ src/911-get-stack-trace/src/art/PrintThread.java \
+ src/911-get-stack-trace/src/art/Recurse.java \
+ src/911-get-stack-trace/src/art/SameThread.java \
+ src/911-get-stack-trace/src/art/ThreadListTraces.java \
+ src/912-classes/src-art/art/Test912.java \
+ src/912-classes/src-art/art/DexData.java \
+ src/913-heaps/src/art/Test913.java \
+ src/914-hello-obsolescence/src/art/Test914.java \
+ src/915-obsolete-2/src/art/Test915.java \
+ src/917-fields-transformation/src/art/Test917.java \
+ src/918-fields/src/art/Test918.java \
+ src/919-obsolete-fields/src/art/Test919.java \
+ src/920-objects/src/art/Test920.java \
+ src/922-properties/src/art/Test922.java \
+ src/923-monitors/src/art/Test923.java \
+ src/924-threads/src/art/Test924.java \
+ src/925-threadgroups/src/art/Test925.java \
+ src/926-multi-obsolescence/src/art/Test926.java \
+ src/927-timers/src/art/Test927.java \
+ src/928-jni-table/src/art/Test928.java \
+ src/930-hello-retransform/src/art/Test930.java \
+ src/931-agent-thread/src/art/Test931.java \
+ src/932-transform-saves/src/art/Test932.java \
+ src/933-misc-events/src/art/Test933.java \
+ src/940-recursive-obsolete/src/art/Test940.java \
+ src/942-private-recursive/src/art/Test942.java \
+ src/944-transform-classloaders/src/art/Test944.java \
+ src/945-obsolete-native/src/art/Test945.java \
+ src/947-reflect-method/src/art/Test947.java \
+ src/951-threaded-obsolete/src/art/Test951.java \
+ src/982-ok-no-retransform/src/art/Test982.java \
+ src/984-obsolete-invoke/src/art/Test984.java \
+ src/985-re-obsolete/src/art/Test985.java \
+ src/986-native-method-bind/src/art/Test986.java \
+ src/988-method-trace/src/art/Test988.java \
+ src/988-method-trace/src/art/Test988Intrinsics.java \
+ src/989-method-trace-throw/src/art/Test989.java \
+ src/990-field-trace/src/art/Test990.java \
+ src/991-field-trace-2/src/art/Test991.java \
+ src/992-source-data/src/art/Test992.java \
+ src/992-source-data/src/art/Target2.java \
+
+JVMTI_RUN_TEST_GENERATED_NUMBERS := \
+ 901 \
+ 902 \
+ 903 \
+ 904 \
+ 905 \
+ 906 \
+ 907 \
+ 908 \
+ 910 \
+ 911 \
+ 912 \
+ 913 \
+ 914 \
+ 915 \
+ 917 \
+ 918 \
+ 919 \
+ 920 \
+ 922 \
+ 923 \
+ 924 \
+ 925 \
+ 926 \
+ 927 \
+ 928 \
+ 930 \
+ 931 \
+ 932 \
+ 933 \
+ 940 \
+ 942 \
+ 944 \
+ 945 \
+ 947 \
+ 951 \
+ 982 \
+ 984 \
+ 985 \
+ 986 \
+ 988 \
+ 989 \
+ 990 \
+ 991 \
+ 992 \
+
+# Try to enforce that the directories correspond to the Java files we pull in.
+JVMTI_RUN_TEST_DIR_CHECK := $(sort $(foreach DIR,$(addprefix src/,$(JVMTI_RUN_TEST_GENERATED_NUMBERS)), \
+ $(filter $(DIR)%,$(LOCAL_SRC_FILES))))
+ifneq ($(sort $(LOCAL_SRC_FILES)),$(JVMTI_RUN_TEST_DIR_CHECK))
+ $(error Missing file, compare $(sort $(LOCAL_SRC_FILES)) with $(JVMTI_RUN_TEST_DIR_CHECK))
+endif
+
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_MODULE_TAGS := optional
+LOCAL_JAVA_LANGUAGE_VERSION := 1.8
+LOCAL_MODULE := run-test-jvmti-java
+
+GENERATED_SRC_DIR := $(call local-generated-sources-dir)
+JVMTI_RUN_TEST_GENERATED_FILES := \
+ $(foreach NR,$(JVMTI_RUN_TEST_GENERATED_NUMBERS),$(GENERATED_SRC_DIR)/results.$(NR).expected.txt)
+
+define GEN_JVMTI_RUN_TEST_GENERATED_FILE
+
+GEN_INPUT := $(wildcard $(LOCAL_PATH)/src/$(1)*/expected.txt)
+GEN_OUTPUT := $(GENERATED_SRC_DIR)/results.$(1).expected.txt
+$$(GEN_OUTPUT): $$(GEN_INPUT)
+ cp $$< $$@
+
+GEN_INPUT :=
+GEN_OUTPUT :=
+
+endef
+
+$(foreach NR,$(JVMTI_RUN_TEST_GENERATED_NUMBERS),\
+ $(eval $(call GEN_JVMTI_RUN_TEST_GENERATED_FILE,$(NR))))
+LOCAL_JAVA_RESOURCE_FILES := $(JVMTI_RUN_TEST_GENERATED_FILES)
+
+# Avoid linking against any @hide APIs.
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_JAVA_LIBRARY)
+
+include $(CLEAR_VARS)
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/hostsidetests/jvmti/run-tests/src b/hostsidetests/jvmti/run-tests/src
new file mode 120000
index 0000000..0291142
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/src
@@ -0,0 +1 @@
+../../../../art/test
\ No newline at end of file
diff --git a/hostsidetests/jvmti/run-tests/test-981/Android.mk b/hostsidetests/jvmti/run-tests/test-912/Android.mk
similarity index 89%
rename from hostsidetests/jvmti/run-tests/test-981/Android.mk
rename to hostsidetests/jvmti/run-tests/test-912/Android.mk
index 151379b..d56f94a 100644
--- a/hostsidetests/jvmti/run-tests/test-981/Android.mk
+++ b/hostsidetests/jvmti/run-tests/test-912/Android.mk
@@ -16,10 +16,10 @@
include $(CLEAR_VARS)
-LOCAL_MODULE := CtsJvmtiRunTest981HostTestCases
+LOCAL_MODULE := CtsJvmtiRunTest912HostTestCases
LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiHostTestBase
LOCAL_MODULE_TAGS := tests
-LOCAL_COMPATIBILITY_SUITE := cts general-tests
+LOCAL_COMPATIBILITY_SUITE := cts
include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/hostsidetests/jvmti/run-tests/test-981/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-912/AndroidTest.xml
similarity index 75%
rename from hostsidetests/jvmti/run-tests/test-981/AndroidTest.xml
rename to hostsidetests/jvmti/run-tests/test-912/AndroidTest.xml
index e6351d3..697beb2 100644
--- a/hostsidetests/jvmti/run-tests/test-981/AndroidTest.xml
+++ b/hostsidetests/jvmti/run-tests/test-912/AndroidTest.xml
@@ -14,14 +14,14 @@
limitations under the License.
-->
<configuration description="Config for CTS JVMTI test cases">
- <option name="config-descriptor:metadata" key="component" value="art" />
- <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <target_preparer class="android.jvmti.cts.JvmtiPreparer">
<option name="cleanup-apks" value="true" />
- <option name="test-file-name" value="CtsJvmtiRunTest981DeviceApp.apk" />
+ <option name="test-file-name" value="CtsJvmtiRunTest912DeviceApp.apk" />
+ <option name="package-name" value="android.jvmti.cts.run_test_912" />
</target_preparer>
<test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
- <option name="jar" value="CtsJvmtiRunTest981HostTestCases.jar" />
- <option name="set-option" value="test-file-name:CtsJvmtiRunTest981DeviceApp.apk" />
- <option name="set-option" value="package-name:android.jvmti.cts.run_test_981" />
+ <option name="jar" value="CtsJvmtiRunTest912HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest912DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_912" />
</test>
</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-981/app/Android.mk b/hostsidetests/jvmti/run-tests/test-912/app/Android.mk
similarity index 91%
rename from hostsidetests/jvmti/run-tests/test-981/app/Android.mk
rename to hostsidetests/jvmti/run-tests/test-912/app/Android.mk
index 88727c2..58d4156 100644
--- a/hostsidetests/jvmti/run-tests/test-981/app/Android.mk
+++ b/hostsidetests/jvmti/run-tests/test-912/app/Android.mk
@@ -21,13 +21,13 @@
LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_SRC_FILES :=
-LOCAL_COMPATIBILITY_SUITE := cts general-tests
+LOCAL_COMPATIBILITY_SUITE := cts
LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
LOCAL_MULTILIB := both
LOCAL_SDK_VERSION := current
# TODO: Refactor. This is the only thing every changing.
-LOCAL_PACKAGE_NAME := CtsJvmtiRunTest981DeviceApp
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest912DeviceApp
include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-981/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-912/app/AndroidManifest.xml
similarity index 90%
rename from hostsidetests/jvmti/run-tests/test-981/app/AndroidManifest.xml
rename to hostsidetests/jvmti/run-tests/test-912/app/AndroidManifest.xml
index a0e898a..d689692 100644
--- a/hostsidetests/jvmti/run-tests/test-981/app/AndroidManifest.xml
+++ b/hostsidetests/jvmti/run-tests/test-912/app/AndroidManifest.xml
@@ -16,11 +16,11 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.jvmti.cts.run_test_981">
+ package="android.jvmti.cts.run_test_912">
<application android:debuggable="true">
<uses-library android:name="android.test.runner" />
- <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="981" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="912" />
<activity android:name="android.jvmti.JvmtiActivity" >
</activity>
</application>
@@ -29,7 +29,7 @@
<instrumentation
android:name="android.support.test.runner.AndroidJUnitRunner"
android:label="CTS tests for JVMTI"
- android:targetPackage="android.jvmti.cts.run_test_981" >
+ android:targetPackage="android.jvmti.cts.run_test_912" >
</instrumentation>
</manifest>
diff --git a/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk
index bc09dc4..7e2753f 100644
--- a/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk
+++ b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk
@@ -20,8 +20,6 @@
LOCAL_MODULE_TAGS := tests
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
LOCAL_JNI_SHARED_LIBRARIES := libstaticsharednativelibprovider
LOCAL_PACKAGE_NAME := CtsStaticSharedNativeLibProvider
diff --git a/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk
index 0abc351d..c2bc395 100644
--- a/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk
+++ b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk
@@ -20,8 +20,6 @@
LOCAL_MODULE_TAGS := tests
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
LOCAL_JNI_SHARED_LIBRARIES := libstaticsharednativelibprovider
LOCAL_PACKAGE_NAME := CtsStaticSharedNativeLibProvider1
diff --git a/hostsidetests/security/securityPatch/CVE-2016-6730/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-6730/Android.mk
index 350a4fe..309c140 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-6730/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-6730/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-6731/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-6731/Android.mk
index 4e14be4..e0c72b0 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-6731/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-6731/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-6732/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-6732/Android.mk
index 7c289a4..f912c1d 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-6732/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-6732/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-6733/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-6733/Android.mk
index a535f0b..10934aa 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-6733/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-6733/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-6734/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-6734/Android.mk
index 9450db9..92e6db0 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-6734/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-6734/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-6735/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-6735/Android.mk
index d089c40..aec692b 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-6735/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-6735/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-6736/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-6736/Android.mk
index bb6efc8..598caa4 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-6736/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-6736/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8412/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8412/Android.mk
index 197690f..f5e3563 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8412/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8412/Android.mk
@@ -26,10 +26,5 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8424/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8424/Android.mk
index 2b33fd4..7e8d5e9 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8424/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8424/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8425/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8425/Android.mk
index 8b1ab64..13fa080 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8425/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8425/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8426/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8426/Android.mk
index c5c7521..07f3e6c 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8426/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8426/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8427/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8427/Android.mk
index 5e4c323..7d35724 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8427/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8427/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8428/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8428/Android.mk
index dd68436..e617f1b 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8428/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8428/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8429/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8429/Android.mk
index 438a578..2370ce3 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8429/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8429/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8430/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8430/Android.mk
index f0a0e60..d20857a 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8430/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8430/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8431/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8431/Android.mk
index ccfbab8..07f5f5e 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8431/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8431/Android.mk
@@ -26,10 +26,5 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8432/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8432/Android.mk
index 235c323..9c7b122 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8432/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8432/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8434/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8434/Android.mk
index 8c8cc35..8c092b3 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8434/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8434/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8435/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8435/Android.mk
index 6dbedc1..a7f72f9 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8435/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8435/Android.mk
@@ -26,10 +26,5 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8444/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8444/Android.mk
index 2e667ab..1f48ff8 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8444/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8444/Android.mk
@@ -26,10 +26,5 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8448/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8448/Android.mk
index 155f72b..4b64b19 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8448/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8448/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8449/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8449/Android.mk
index a905cc9..d98f22f 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8449/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8449/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8460/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8460/Android.mk
index 51f8169..29c7e26 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8460/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8460/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS := -Wall -W -g -O2 -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-8482/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-8482/Android.mk
index 16ceff2..bdcdb20 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-8482/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-8482/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2016-9120/Android.mk b/hostsidetests/security/securityPatch/CVE-2016-9120/Android.mk
index b5d138d..1a6ed8e 100644
--- a/hostsidetests/security/securityPatch/CVE-2016-9120/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2016-9120/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2017-0403/Android.mk b/hostsidetests/security/securityPatch/CVE-2017-0403/Android.mk
index bd84bec..92657e4 100644
--- a/hostsidetests/security/securityPatch/CVE-2017-0403/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2017-0403/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2017-0404/Android.mk b/hostsidetests/security/securityPatch/CVE-2017-0404/Android.mk
index 66978e0..47d65ac 100644
--- a/hostsidetests/security/securityPatch/CVE-2017-0404/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2017-0404/Android.mk
@@ -26,10 +26,6 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2017-0429/Android.mk b/hostsidetests/security/securityPatch/CVE-2017-0429/Android.mk
index 495a935..3b36fde 100644
--- a/hostsidetests/security/securityPatch/CVE-2017-0429/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2017-0429/Android.mk
@@ -26,10 +26,5 @@
LOCAL_CTS_TEST_PACKAGE := android.security.cts
LOCAL_ARM_MODE := arm
-CFLAGS += -Wall -W -g -O2 -Wimplicit -D_FORTIFY_SOURCE=2 -D__linux__ -Wdeclaration-after-statement
-CFLAGS += -Wformat=2 -Winit-self -Wnested-externs -Wpacked -Wshadow -Wswitch-enum -Wundef
-CFLAGS += -Wwrite-strings -Wno-format-nonliteral -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Iinclude -fPIE
LOCAL_LDFLAGS += -fPIE -pie
-LDFLAGS += -rdynamic
include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2017-0564/kernel-headers/linux/ion.h b/hostsidetests/security/securityPatch/CVE-2017-0564/kernel-headers/linux/ion.h
new file mode 100644
index 0000000..7b5b031
--- /dev/null
+++ b/hostsidetests/security/securityPatch/CVE-2017-0564/kernel-headers/linux/ion.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_ION_H
+#define _UAPI_LINUX_ION_H
+#include <linux/ioctl.h>
+#include <linux/types.h>
+typedef int ion_user_handle_t;
+enum ion_heap_type {
+ ION_HEAP_TYPE_SYSTEM,
+ ION_HEAP_TYPE_SYSTEM_CONTIG,
+ ION_HEAP_TYPE_CARVEOUT,
+ ION_HEAP_TYPE_CHUNK,
+ ION_HEAP_TYPE_DMA,
+ ION_HEAP_TYPE_CUSTOM,
+};
+#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8)
+#define ION_FLAG_CACHED 1
+#define ION_FLAG_CACHED_NEEDS_SYNC 2
+struct ion_allocation_data {
+ size_t len;
+ size_t align;
+ unsigned int heap_id_mask;
+ unsigned int flags;
+ ion_user_handle_t handle;
+};
+struct ion_fd_data {
+ ion_user_handle_t handle;
+ int fd;
+};
+struct ion_handle_data {
+ ion_user_handle_t handle;
+};
+struct ion_custom_data {
+ unsigned int cmd;
+ unsigned long arg;
+};
+#define MAX_HEAP_NAME 32
+struct ion_heap_data {
+ char name[MAX_HEAP_NAME];
+ __u32 type;
+ __u32 heap_id;
+ __u32 reserved0;
+ __u32 reserved1;
+ __u32 reserved2;
+};
+struct ion_heap_query {
+ __u32 cnt;
+ __u32 reserved0;
+ __u64 heaps;
+ __u32 reserved1;
+ __u32 reserved2;
+};
+#define ION_IOC_MAGIC 'I'
+#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
+#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
+#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
+#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
+#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
+#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
+#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
+#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query)
+#endif
diff --git a/hostsidetests/security/securityPatch/CVE-2017-0564/original-kernel-headers/linux/ion.h b/hostsidetests/security/securityPatch/CVE-2017-0564/original-kernel-headers/linux/ion.h
new file mode 100644
index 0000000..14cd873
--- /dev/null
+++ b/hostsidetests/security/securityPatch/CVE-2017-0564/original-kernel-headers/linux/ion.h
@@ -0,0 +1,236 @@
+/*
+ * drivers/staging/android/uapi/ion.h
+ *
+ * Copyright (C) 2011 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _UAPI_LINUX_ION_H
+#define _UAPI_LINUX_ION_H
+
+#include <linux/ioctl.h>
+#include <linux/types.h>
+
+typedef int ion_user_handle_t;
+
+/**
+ * enum ion_heap_types - list of all possible types of heaps
+ * @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc
+ * @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc
+ * @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved
+ * carveout heap, allocations are physically
+ * contiguous
+ * @ION_HEAP_TYPE_DMA: memory allocated via DMA API
+ * @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask
+ * is used to identify the heaps, so only 32
+ * total heap types are supported
+ */
+enum ion_heap_type {
+ ION_HEAP_TYPE_SYSTEM,
+ ION_HEAP_TYPE_SYSTEM_CONTIG,
+ ION_HEAP_TYPE_CARVEOUT,
+ ION_HEAP_TYPE_CHUNK,
+ ION_HEAP_TYPE_DMA,
+ ION_HEAP_TYPE_CUSTOM, /*
+ * must be last so device specific heaps always
+ * are at the end of this enum
+ */
+};
+
+#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8)
+
+/**
+ * allocation flags - the lower 16 bits are used by core ion, the upper 16
+ * bits are reserved for use by the heaps themselves.
+ */
+
+/*
+ * mappings of this buffer should be cached, ion will do cache maintenance
+ * when the buffer is mapped for dma
+ */
+#define ION_FLAG_CACHED 1
+
+/*
+ * mappings of this buffer will created at mmap time, if this is set
+ * caches must be managed manually
+ */
+#define ION_FLAG_CACHED_NEEDS_SYNC 2
+
+/**
+ * DOC: Ion Userspace API
+ *
+ * create a client by opening /dev/ion
+ * most operations handled via following ioctls
+ *
+ */
+
+/**
+ * struct ion_allocation_data - metadata passed from userspace for allocations
+ * @len: size of the allocation
+ * @align: required alignment of the allocation
+ * @heap_id_mask: mask of heap ids to allocate from
+ * @flags: flags passed to heap
+ * @handle: pointer that will be populated with a cookie to use to
+ * refer to this allocation
+ *
+ * Provided by userspace as an argument to the ioctl
+ */
+struct ion_allocation_data {
+ size_t len;
+ size_t align;
+ unsigned int heap_id_mask;
+ unsigned int flags;
+ ion_user_handle_t handle;
+};
+
+/**
+ * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair
+ * @handle: a handle
+ * @fd: a file descriptor representing that handle
+ *
+ * For ION_IOC_SHARE or ION_IOC_MAP userspace populates the handle field with
+ * the handle returned from ion alloc, and the kernel returns the file
+ * descriptor to share or map in the fd field. For ION_IOC_IMPORT, userspace
+ * provides the file descriptor and the kernel returns the handle.
+ */
+struct ion_fd_data {
+ ion_user_handle_t handle;
+ int fd;
+};
+
+/**
+ * struct ion_handle_data - a handle passed to/from the kernel
+ * @handle: a handle
+ */
+struct ion_handle_data {
+ ion_user_handle_t handle;
+};
+
+/**
+ * struct ion_custom_data - metadata passed to/from userspace for a custom ioctl
+ * @cmd: the custom ioctl function to call
+ * @arg: additional data to pass to the custom ioctl, typically a user
+ * pointer to a predefined structure
+ *
+ * This works just like the regular cmd and arg fields of an ioctl.
+ */
+struct ion_custom_data {
+ unsigned int cmd;
+ unsigned long arg;
+};
+
+#define MAX_HEAP_NAME 32
+
+/**
+ * struct ion_heap_data - data about a heap
+ * @name - first 32 characters of the heap name
+ * @type - heap type
+ * @heap_id - heap id for the heap
+ */
+struct ion_heap_data {
+ char name[MAX_HEAP_NAME];
+ __u32 type;
+ __u32 heap_id;
+ __u32 reserved0;
+ __u32 reserved1;
+ __u32 reserved2;
+};
+
+/**
+ * struct ion_heap_query - collection of data about all heaps
+ * @cnt - total number of heaps to be copied
+ * @heaps - buffer to copy heap data
+ */
+struct ion_heap_query {
+ __u32 cnt; /* Total number of heaps to be copied */
+ __u32 reserved0; /* align to 64bits */
+ __u64 heaps; /* buffer to be populated */
+ __u32 reserved1;
+ __u32 reserved2;
+};
+
+#define ION_IOC_MAGIC 'I'
+
+/**
+ * DOC: ION_IOC_ALLOC - allocate memory
+ *
+ * Takes an ion_allocation_data struct and returns it with the handle field
+ * populated with the opaque handle for the allocation.
+ */
+#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, \
+ struct ion_allocation_data)
+
+/**
+ * DOC: ION_IOC_FREE - free memory
+ *
+ * Takes an ion_handle_data struct and frees the handle.
+ */
+#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
+
+/**
+ * DOC: ION_IOC_MAP - get a file descriptor to mmap
+ *
+ * Takes an ion_fd_data struct with the handle field populated with a valid
+ * opaque handle. Returns the struct with the fd field set to a file
+ * descriptor open in the current address space. This file descriptor
+ * can then be used as an argument to mmap.
+ */
+#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
+
+/**
+ * DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation
+ *
+ * Takes an ion_fd_data struct with the handle field populated with a valid
+ * opaque handle. Returns the struct with the fd field set to a file
+ * descriptor open in the current address space. This file descriptor
+ * can then be passed to another process. The corresponding opaque handle can
+ * be retrieved via ION_IOC_IMPORT.
+ */
+#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
+
+/**
+ * DOC: ION_IOC_IMPORT - imports a shared file descriptor
+ *
+ * Takes an ion_fd_data struct with the fd field populated with a valid file
+ * descriptor obtained from ION_IOC_SHARE and returns the struct with the handle
+ * filed set to the corresponding opaque handle.
+ */
+#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
+
+/**
+ * DOC: ION_IOC_SYNC - syncs a shared file descriptors to memory
+ *
+ * Deprecated in favor of using the dma_buf api's correctly (syncing
+ * will happen automatically when the buffer is mapped to a device).
+ * If necessary should be used after touching a cached buffer from the cpu,
+ * this will make the buffer in memory coherent.
+ */
+#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
+
+/**
+ * DOC: ION_IOC_CUSTOM - call architecture specific ion ioctl
+ *
+ * Takes the argument of the architecture specific ioctl to call and
+ * passes appropriate userdata for that ioctl
+ */
+#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
+
+/**
+ * DOC: ION_IOC_HEAP_QUERY - information about available heaps
+ *
+ * Takes an ion_heap_query structure and populates information about
+ * available Ion heaps.
+ */
+#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, \
+ struct ion_heap_query)
+
+#endif /* _UAPI_LINUX_ION_H */
diff --git a/hostsidetests/security/securityPatch/CVE-2017-0564/poc.c b/hostsidetests/security/securityPatch/CVE-2017-0564/poc.c
index 7734d4c..ae5ad40 100644
--- a/hostsidetests/security/securityPatch/CVE-2017-0564/poc.c
+++ b/hostsidetests/security/securityPatch/CVE-2017-0564/poc.c
@@ -29,7 +29,11 @@
#include <string.h>
#include <fcntl.h>
#include <errno.h>
-#include <linux/ion.h>
+
+// Include a fixed version of the ion.h file because it changes per kernel.
+// This test is going to be extremely brittle due to it's dependency on
+// a structure that is going to change with different kernels.
+#include "kernel-headers/linux/ion.h"
#define ION_HEAP(bit) (1 << (bit))
@@ -73,7 +77,7 @@
#ifdef NEW_ION
.heap_id_mask = ion_type,
//.flags = ION_SECURE | ION_FORCE_CONTIGUOUS,
- .flags = (1 << 0),
+ //.flags = (1 << 0),
.flags = 0x0,
#else
.flags = ION_SECURE | ION_FORCE_CONTIGUOUS | ION_HEAP(ION_CP_MM_HEAP_ID),
@@ -165,7 +169,7 @@
int main()
{
- int ret, i, count;
+ int ret, count;
pthread_t tid_free[2];
count = 0;
@@ -178,6 +182,7 @@
return -1;
}
+ size_t i;
for (i=0; i < sizeof(ion_type)/sizeof(ion_type[0]); i++) {
ret = ion_alloc(ion_fd, 0x1000, &ion_handle, ion_type[i]);
if (ret == 0) {
diff --git a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerFreeformStackTests.java b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerFreeformStackTests.java
index df583d9..a1d76c8 100644
--- a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerFreeformStackTests.java
+++ b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerFreeformStackTests.java
@@ -33,6 +33,9 @@
private static final int TEST_TASK_OFFSET_2 = 100;
private static final int TEST_TASK_SIZE_1 = 900;
private static final int TEST_TASK_SIZE_2 = TEST_TASK_SIZE_1 * 2;
+ private static final int TEST_TASK_SIZE_DP_1 = 220;
+ private static final int TEST_TASK_SIZE_DP_2 = TEST_TASK_SIZE_DP_1 * 2;
+
// NOTE: Launching the FreeformActivity will automatically launch the TestActivity
// with bounds (0, 0, 900, 900)
private static final String FREEFORM_ACTIVITY = "FreeformActivity";
@@ -94,18 +97,27 @@
return;
}
+ final int displayId = mAmWmState.getAmState().getStackById(
+ ActivityManagerTestBase.FREEFORM_WORKSPACE_STACK_ID).mDisplayId;
+ final int densityDpi =
+ mAmWmState.getWmState().getDisplay(displayId).getDpi();
+ final int testTaskSize1 =
+ ActivityAndWindowManagersState.dpToPx(TEST_TASK_SIZE_DP_1, densityDpi);
+ final int testTaskSize2 =
+ ActivityAndWindowManagersState.dpToPx(TEST_TASK_SIZE_DP_2, densityDpi);
+
resizeActivityTask(TEST_ACTIVITY,
- TEST_TASK_OFFSET, TEST_TASK_OFFSET, TEST_TASK_SIZE_1, TEST_TASK_SIZE_2);
+ TEST_TASK_OFFSET, TEST_TASK_OFFSET, testTaskSize1, testTaskSize2);
resizeActivityTask(NO_RELAUNCH_ACTIVITY,
- TEST_TASK_OFFSET_2, TEST_TASK_OFFSET_2, TEST_TASK_SIZE_1, TEST_TASK_SIZE_2);
+ TEST_TASK_OFFSET_2, TEST_TASK_OFFSET_2, testTaskSize1, testTaskSize2);
mAmWmState.computeState(mDevice, new String[]{TEST_ACTIVITY, NO_RELAUNCH_ACTIVITY});
final String logSeparator = clearLogcat();
resizeActivityTask(TEST_ACTIVITY,
- TEST_TASK_OFFSET, TEST_TASK_OFFSET, TEST_TASK_SIZE_2, TEST_TASK_SIZE_1);
+ TEST_TASK_OFFSET, TEST_TASK_OFFSET, testTaskSize2, testTaskSize1);
resizeActivityTask(NO_RELAUNCH_ACTIVITY,
- TEST_TASK_OFFSET_2, TEST_TASK_OFFSET_2, TEST_TASK_SIZE_2, TEST_TASK_SIZE_1);
+ TEST_TASK_OFFSET_2, TEST_TASK_OFFSET_2, testTaskSize2, testTaskSize1);
mAmWmState.computeState(mDevice, new String[]{TEST_ACTIVITY, NO_RELAUNCH_ACTIVITY});
assertActivityLifecycle(TEST_ACTIVITY, true /* relaunched */, logSeparator);
diff --git a/hostsidetests/tzdata/Android.mk b/hostsidetests/tzdata/Android.mk
index 6eab01c..3cee8b5 100644
--- a/hostsidetests/tzdata/Android.mk
+++ b/hostsidetests/tzdata/Android.mk
@@ -23,7 +23,7 @@
LOCAL_JAVA_LIBRARIES := tradefed
-LOCAL_STATIC_JAVA_LIBRARIES := tzdata-testing-host tzdata_shared2-host tzdata_tools2-host
+LOCAL_STATIC_JAVA_LIBRARIES := tzdata-testing-host time_zone_distro-host time_zone_distro_tools-host
LOCAL_CTS_TEST_PACKAGE := android.host.tzdata
diff --git a/hostsidetests/tzdata/src/com/android/cts/tzdata/TzDataCheckTest.java b/hostsidetests/tzdata/src/com/android/cts/tzdata/TzDataCheckTest.java
index c059e89..2e9707c 100644
--- a/hostsidetests/tzdata/src/com/android/cts/tzdata/TzDataCheckTest.java
+++ b/hostsidetests/tzdata/src/com/android/cts/tzdata/TzDataCheckTest.java
@@ -18,6 +18,9 @@
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.testtype.DeviceTestCase;
+import com.android.timezone.distro.DistroVersion;
+import com.android.timezone.distro.TimeZoneDistro;
+import com.android.timezone.distro.tools.TimeZoneDistroBuilder;
import java.io.File;
import java.io.FileOutputStream;
@@ -28,10 +31,7 @@
import java.util.Comparator;
import java.util.StringJoiner;
import java.util.function.Consumer;
-import libcore.tzdata.shared2.DistroVersion;
-import libcore.tzdata.shared2.TimeZoneDistro;
import libcore.tzdata.testing.ZoneInfoTestHelper;
-import libcore.tzdata.update2.tools.TimeZoneDistroBuilder;
import static org.junit.Assert.assertArrayEquals;
@@ -56,28 +56,28 @@
/**
* The name of the directory containing the current time zone rules data beneath
- * {@link #mDataDir}. Also known to {@link libcore.tzdata.update2.TimeZoneDistroInstaller} and
+ * {@link #mDataDir}. Also known to {@link com.android.timezone.distro.installer.TimeZoneDistroInstaller} and
* tzdatacheck.cpp.
*/
private static final String CURRENT_DIR_NAME = "current";
/**
* The name of the directory containing the staged time zone rules data beneath
- * {@link #mDataDir}. Also known to {@link libcore.tzdata.update2.TimeZoneDistroInstaller} and
+ * {@link #mDataDir}. Also known to {@link com.android.timezone.distro.installer.TimeZoneDistroInstaller} and
* tzdatacheck.cpp.
*/
private static final String STAGED_DIR_NAME = "staged";
/**
* The name of the file inside the staged directory that indicates the staged operation is an
- * uninstall. Also known to {@link libcore.tzdata.update2.TimeZoneDistroInstaller} and
+ * uninstall. Also known to {@link com.android.timezone.distro.installer.TimeZoneDistroInstaller} and
* tzdatacheck.cpp.
*/
private static final String UNINSTALL_TOMBSTONE_FILE_NAME = "STAGED_UNINSTALL_TOMBSTONE";
/**
* The name of the /system time zone data file. Also known to
- * {@link libcore.tzdata.update2.TimeZoneDistroInstaller} and tzdatacheck.cpp.
+ * {@link com.android.timezone.distro.installer.TimeZoneDistroInstaller} and tzdatacheck.cpp.
*/
private static final String SYSTEM_TZDATA_FILE_NAME = "tzdata";
@@ -228,8 +228,8 @@
// Create a current installed distro.
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
- TimeZoneDistro distro = createValidDistroBuilder().build();
- unpackOnHost(dataCurrentDir, distro);
+ byte[] distroBytes = createValidDistroBuilder().buildBytes();
+ unpackOnHost(dataCurrentDir, distroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -252,8 +252,8 @@
// Create a staged install.
PathPair dataStagedDir = mDataDir.createSubPath(STAGED_DIR_NAME);
- TimeZoneDistro distro = createValidDistroBuilder().build();
- unpackOnHost(dataStagedDir, distro);
+ byte[] distroBytes = createValidDistroBuilder().buildBytes();
+ unpackOnHost(dataStagedDir, distroBytes);
// Create a file with the same name as the directory that tzdatacheck expects.
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
@@ -268,7 +268,7 @@
// Assert the device was left in a valid "installed" state.
assertDevicePathDoesNotExist(dataStagedDir);
- assertDeviceDirContainsDistro(dataCurrentDir, distro);
+ assertDeviceDirContainsDistro(dataCurrentDir, distroBytes);
}
// {dataDir}/staged contains an install, but there is nothing to replace.
@@ -282,8 +282,8 @@
// Create a staged install.
PathPair dataStagedDir = mDataDir.createSubPath(STAGED_DIR_NAME);
- TimeZoneDistro stagedDistro = createValidDistroBuilder().build();
- unpackOnHost(dataStagedDir, stagedDistro);
+ byte[] stagedDistroBytes = createValidDistroBuilder().buildBytes();
+ unpackOnHost(dataStagedDir, stagedDistroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -294,7 +294,7 @@
// Assert the device was left in a valid "installed" state.
assertDevicePathDoesNotExist(dataStagedDir);
- assertDeviceDirContainsDistro(dataCurrentDir, stagedDistro);
+ assertDeviceDirContainsDistro(dataCurrentDir, stagedDistroBytes);
}
// {dataDir}/staged contains an install, and there is something to replace.
@@ -311,17 +311,17 @@
// Create a staged uninstall.
PathPair dataStagedDir = mDataDir.createSubPath(STAGED_DIR_NAME);
- TimeZoneDistro stagedDistro = createValidDistroBuilder()
+ byte[] stagedDistroBytes = createValidDistroBuilder()
.setDistroVersion(stagedDistroVersion)
- .build();
- unpackOnHost(dataStagedDir, stagedDistro);
+ .buildBytes();
+ unpackOnHost(dataStagedDir, stagedDistroBytes);
// Create a current installed distro.
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
- TimeZoneDistro currentDistro = createValidDistroBuilder()
+ byte[] currentDistroBytes = createValidDistroBuilder()
.setDistroVersion(currentDistroVersion)
- .build();
- unpackOnHost(dataCurrentDir, currentDistro);
+ .buildBytes();
+ unpackOnHost(dataCurrentDir, currentDistroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -333,7 +333,7 @@
// Assert the device was left in a valid "installed" state.
// The stagedDistro should now be the one in the current dir.
assertDevicePathDoesNotExist(dataStagedDir);
- assertDeviceDirContainsDistro(dataCurrentDir, stagedDistro);
+ assertDeviceDirContainsDistro(dataCurrentDir, stagedDistroBytes);
}
// {dataDir}/staged contains an invalid install, and there is something to replace.
@@ -347,15 +347,15 @@
// Create a staged uninstall which contains invalid.
PathPair dataStagedDir = mDataDir.createSubPath(STAGED_DIR_NAME);
- TimeZoneDistro stagedDistro = createValidDistroBuilder()
+ byte[] stagedDistroBytes = createValidDistroBuilder()
.clearVersionForTests()
- .buildUnvalidated();
- unpackOnHost(dataStagedDir, stagedDistro);
+ .buildUnvalidatedBytes();
+ unpackOnHost(dataStagedDir, stagedDistroBytes);
// Create a current installed distro.
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
- TimeZoneDistro currentDistro = createValidDistroBuilder().build();
- unpackOnHost(dataCurrentDir, currentDistro);
+ byte[] currentDistroBytes = createValidDistroBuilder().buildBytes();
+ unpackOnHost(dataCurrentDir, currentDistroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -413,10 +413,10 @@
// Set up the /data directory structure on host.
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
- TimeZoneDistro distroWithoutAVersionFile = createValidDistroBuilder()
+ byte[] distroWithoutAVersionFileBytes = createValidDistroBuilder()
.clearVersionForTests()
- .buildUnvalidated();
- unpackOnHost(dataCurrentDir, distroWithoutAVersionFile);
+ .buildUnvalidatedBytes();
+ unpackOnHost(dataCurrentDir, distroWithoutAVersionFileBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -435,7 +435,7 @@
// Set up the /data directory structure on host.
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
- unpackOnHost(dataCurrentDir, createValidDistroBuilder().build());
+ unpackOnHost(dataCurrentDir, createValidDistroBuilder().buildBytes());
// Replace the distro version file with a short file.
Path distroVersionFile =
dataCurrentDir.hostPath.resolve(TimeZoneDistro.DISTRO_VERSION_FILE_NAME);
@@ -459,7 +459,7 @@
// Set up the /data directory structure on host.
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
- unpackOnHost(dataCurrentDir, createValidDistroBuilder().build());
+ unpackOnHost(dataCurrentDir, createValidDistroBuilder().buildBytes());
// Replace the distro version file with junk.
Path distroVersionFile =
@@ -489,10 +489,10 @@
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
DistroVersion oldMajorDistroVersion = new DistroVersion(
DistroVersion.CURRENT_FORMAT_MAJOR_VERSION - 1, 1, VALID_RULES_VERSION, 1);
- TimeZoneDistro distro = createValidDistroBuilder()
+ byte[] distroBytes = createValidDistroBuilder()
.setDistroVersion(oldMajorDistroVersion)
- .build();
- unpackOnHost(dataCurrentDir, distro);
+ .buildBytes();
+ unpackOnHost(dataCurrentDir, distroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -515,10 +515,10 @@
DistroVersion.CURRENT_FORMAT_MAJOR_VERSION + 1,
DistroVersion.CURRENT_FORMAT_MINOR_VERSION,
VALID_RULES_VERSION, VALID_REVISION);
- TimeZoneDistro distro = createValidDistroBuilder()
+ byte[] distroBytes = createValidDistroBuilder()
.setDistroVersion(newMajorDistroVersion)
- .build();
- unpackOnHost(dataCurrentDir, distro);
+ .buildBytes();
+ unpackOnHost(dataCurrentDir, distroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -541,10 +541,10 @@
DistroVersion.CURRENT_FORMAT_MAJOR_VERSION,
DistroVersion.CURRENT_FORMAT_MINOR_VERSION - 1,
VALID_RULES_VERSION, 1);
- TimeZoneDistro distro = createValidDistroBuilder()
+ byte[] distroBytes = createValidDistroBuilder()
.setDistroVersion(oldMinorDistroVersion)
- .build();
- unpackOnHost(dataCurrentDir, distro);
+ .buildBytes();
+ unpackOnHost(dataCurrentDir, distroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -568,10 +568,10 @@
DistroVersion.CURRENT_FORMAT_MAJOR_VERSION,
DistroVersion.CURRENT_FORMAT_MINOR_VERSION + 1,
VALID_RULES_VERSION, VALID_REVISION);
- TimeZoneDistro distro = createValidDistroBuilder()
+ byte[] distroBytes = createValidDistroBuilder()
.setDistroVersion(newMajorDistroVersion)
- .build();
- unpackOnHost(dataCurrentDir, distro);
+ .buildBytes();
+ unpackOnHost(dataCurrentDir, distroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -580,7 +580,7 @@
assertEquals(0, runTzDataCheckOnDevice());
// Assert the current data directory was not touched.
- assertDeviceDirContainsDistro(dataCurrentDir, distro);
+ assertDeviceDirContainsDistro(dataCurrentDir, distroBytes);
}
// {dataDir}/current is valid but the tzdata file in /system is missing.
@@ -589,8 +589,8 @@
// Set up the /data directory structure on host.
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
- TimeZoneDistro validDistro = createValidDistroBuilder().build();
- unpackOnHost(dataCurrentDir, validDistro);
+ byte[] validDistroBytes = createValidDistroBuilder().buildBytes();
+ unpackOnHost(dataCurrentDir, validDistroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -599,7 +599,7 @@
assertEquals(6, runTzDataCheckOnDevice());
// Assert the current data directory was not touched.
- assertDeviceDirContainsDistro(dataCurrentDir, validDistro);
+ assertDeviceDirContainsDistro(dataCurrentDir, validDistroBytes);
}
// {dataDir}/current is valid but the tzdata file in /system has an invalid header.
@@ -610,8 +610,8 @@
// Set up the /data directory structure on host.
PathPair dataCurrentDir = mDataDir.createSubPath(CURRENT_DIR_NAME);
- TimeZoneDistro validDistro = createValidDistroBuilder().build();
- unpackOnHost(dataCurrentDir, validDistro);
+ byte[] validDistroBytes = createValidDistroBuilder().buildBytes();
+ unpackOnHost(dataCurrentDir, validDistroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -620,7 +620,7 @@
assertEquals(7, runTzDataCheckOnDevice());
// Assert the current data directory was not touched.
- assertDeviceDirContainsDistro(dataCurrentDir, validDistro);
+ assertDeviceDirContainsDistro(dataCurrentDir, validDistroBytes);
}
// {dataDir}/current is valid and the tzdata file in /system is older.
@@ -635,11 +635,11 @@
DistroVersion distroVersion = new DistroVersion(
DistroVersion.CURRENT_FORMAT_MAJOR_VERSION,
DistroVersion.CURRENT_FORMAT_MINOR_VERSION, distroRulesVersion, VALID_REVISION);
- TimeZoneDistro distro = createValidDistroBuilder()
+ byte[] distroBytes = createValidDistroBuilder()
.setDistroVersion(distroVersion)
.setTzDataFile(createValidTzDataBytes(distroRulesVersion))
- .build();
- unpackOnHost(dataCurrentDir, distro);
+ .buildBytes();
+ unpackOnHost(dataCurrentDir, distroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -648,7 +648,7 @@
assertEquals(0, runTzDataCheckOnDevice());
// Assert the current data directory was not touched.
- assertDeviceDirContainsDistro(dataCurrentDir, distro);
+ assertDeviceDirContainsDistro(dataCurrentDir, distroBytes);
}
// {dataDir}/current is valid and the tzdata file in /system is the same (and should be kept).
@@ -662,11 +662,11 @@
DistroVersion distroVersion = new DistroVersion(
DistroVersion.CURRENT_FORMAT_MAJOR_VERSION,
DistroVersion.CURRENT_FORMAT_MINOR_VERSION, systemRulesVersion, VALID_REVISION);
- TimeZoneDistro distro = createValidDistroBuilder()
+ byte[] distroBytes = createValidDistroBuilder()
.setDistroVersion(distroVersion)
.setTzDataFile(createValidTzDataBytes(systemRulesVersion))
- .build();
- unpackOnHost(dataCurrentDir, distro);
+ .buildBytes();
+ unpackOnHost(dataCurrentDir, distroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -675,7 +675,7 @@
assertEquals(0, runTzDataCheckOnDevice());
// Assert the current data directory was not touched.
- assertDeviceDirContainsDistro(dataCurrentDir, distro);
+ assertDeviceDirContainsDistro(dataCurrentDir, distroBytes);
}
// {dataDir}/current is valid and the tzdata file in /system is the newer.
@@ -692,11 +692,11 @@
DistroVersion.CURRENT_FORMAT_MINOR_VERSION,
distroRulesVersion,
VALID_REVISION);
- TimeZoneDistro distro = createValidDistroBuilder()
+ byte[] distroBytes = createValidDistroBuilder()
.setDistroVersion(distroVersion)
.setTzDataFile(createValidTzDataBytes(distroRulesVersion))
- .build();
- unpackOnHost(dataCurrentDir, distro);
+ .buildBytes();
+ unpackOnHost(dataCurrentDir, distroBytes);
// Push the host test directory and contents to the device.
pushHostTestDirToDevice();
@@ -722,9 +722,9 @@
new FileOutputStream(uninstallTombstoneFile.hostFile()).close();
}
- private static void unpackOnHost(PathPair path, TimeZoneDistro distro) throws Exception {
+ private static void unpackOnHost(PathPair path, byte[] distroBytes) throws Exception {
createHostDirectory(path);
- distro.extractTo(path.hostFile());
+ new TimeZoneDistro(distroBytes).extractTo(path.hostFile());
}
private static TimeZoneDistroBuilder createValidDistroBuilder() throws Exception {
@@ -910,7 +910,7 @@
assertTrue(getDevice().doesFileExist(path.devicePath));
}
- private void assertDeviceDirContainsDistro(PathPair distroPath, TimeZoneDistro expectedDistro)
+ private void assertDeviceDirContainsDistro(PathPair distroPath, byte[] expectedDistroBytes)
throws Exception {
// Pull back just the version file and compare it.
File localFile = mTestRootDir.createSubPath("temp.file").hostFile();
@@ -921,7 +921,8 @@
getDevice().pullFile(remoteVersionFile, localFile));
byte[] bytes = Files.readAllBytes(localFile.toPath());
- assertArrayEquals(bytes, expectedDistro.getDistroVersion().toBytes());
+ assertArrayEquals(bytes,
+ new TimeZoneDistro(expectedDistroBytes).getDistroVersion().toBytes());
} finally {
localFile.delete();
}
diff --git a/suite/audio_quality/lib/Android.mk b/suite/audio_quality/lib/Android.mk
index cd19e85..2b3c22a 100644
--- a/suite/audio_quality/lib/Android.mk
+++ b/suite/audio_quality/lib/Android.mk
@@ -19,7 +19,7 @@
LOCAL_SRC_FILES := $(call all-subdir-cpp-files)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/src
LOCAL_STATIC_LIBRARIES += libutils liblog libtinyalsa libcutils libtinyxml2
-LOCAL_CFLAGS:= -g -fno-exceptions
+LOCAL_CFLAGS:= -g -fno-exceptions -Wno-unused-parameter
LOCAL_LDFLAGS:= -g -lrt -ldl -lm -fno-exceptions
LOCAL_MODULE_HOST_OS := linux
LOCAL_MODULE:= libcts_audio_quality
diff --git a/suite/audio_quality/lib/src/task/ModelBuilder.cpp b/suite/audio_quality/lib/src/task/ModelBuilder.cpp
index 78e5138..f1a506b 100644
--- a/suite/audio_quality/lib/src/task/ModelBuilder.cpp
+++ b/suite/audio_quality/lib/src/task/ModelBuilder.cpp
@@ -87,7 +87,7 @@
{
XMLDocument doc;
int error = doc.LoadFile(xmlFileName.string());
- if (error != XML_NO_ERROR) {
+ if (error != XML_SUCCESS) {
LOGE("ModelBuilder::parseTestDescriptionXml cannot load file %s: %d", xmlFileName.string(), error);
return NULL;
}
diff --git a/suite/audio_quality/test/Android.mk b/suite/audio_quality/test/Android.mk
index 7a84802..f8fe13c 100644
--- a/suite/audio_quality/test/Android.mk
+++ b/suite/audio_quality/test/Android.mk
@@ -33,7 +33,7 @@
# need to keep everything in libcts_.. Otherwise, linker will drop some
# functions and linker error happens
LOCAL_WHOLE_STATIC_LIBRARIES := libcts_audio_quality
-LOCAL_CFLAGS:= -g -fno-exceptions
+LOCAL_CFLAGS:= -g -fno-exceptions -Wno-unused-parameter
LOCAL_LDFLAGS:= -g -lrt -ldl -lm -fno-exceptions -lpthread
LOCAL_CXX_STL := libc++_static
LOCAL_MODULE_HOST_OS := linux
diff --git a/suite/audio_quality/test/LogTest.cpp b/suite/audio_quality/test/LogTest.cpp
index 4412338..51cde10 100644
--- a/suite/audio_quality/test/LogTest.cpp
+++ b/suite/audio_quality/test/LogTest.cpp
@@ -14,6 +14,7 @@
* the License.
*/
+#include <inttypes.h>
#include <stdint.h>
#include <gtest/gtest.h>
@@ -46,12 +47,14 @@
int64_t d = 3;
int64_t e = 4;
int64_t f = 5;
- printf("printf %lld %lld %lld %lld %lld %lld\n", a, b, c, d, e, f);
- LOGD( "logd %lld %lld %lld %lld %lld %lld", a, b, c, d, e, f);
- LOGV( "logv %lld %lld %lld %lld %lld %lld", a, b, c, d, e, f);
- LOGI( "logi %lld %lld %lld %lld %lld %lld", a, b, c, d, e, f);
- LOGW( "logw %lld %lld %lld %lld %lld %lld", a, b, c, d, e, f);
- LOGE( "loge %lld %lld %lld %lld %lld %lld", a, b, c, d, e, f);
+#define PrintABCDEF "%" PRId64 " %" PRId64 " %" PRId64 " %" PRId64 " %" PRId64 \
+ " %" PRId64
+ printf("printf " PrintABCDEF "\n", a, b, c, d, e, f);
+ LOGD( "logd " PrintABCDEF, a, b, c, d, e, f);
+ LOGV( "logv " PrintABCDEF, a, b, c, d, e, f);
+ LOGI( "logi " PrintABCDEF, a, b, c, d, e, f);
+ LOGW( "logw " PrintABCDEF, a, b, c, d, e, f);
+ LOGE( "loge " PrintABCDEF, a, b, c, d, e, f);
Log::Instance()->setLogLevel(level);
}
diff --git a/tests/dram/jni/Android.mk b/tests/dram/jni/Android.mk
index 4469cc4..1021aaa 100644
--- a/tests/dram/jni/Android.mk
+++ b/tests/dram/jni/Android.mk
@@ -26,4 +26,6 @@
LOCAL_SDK_VERSION := 14
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/jdwp/AndroidTest.xml b/tests/jdwp/AndroidTest.xml
index 192ba78..72d26b1 100644
--- a/tests/jdwp/AndroidTest.xml
+++ b/tests/jdwp/AndroidTest.xml
@@ -39,5 +39,8 @@
<option name="known-failures" value="/expectations/jdwp-known-failures.txt" />
<option name="runtime-hint" value="16m" />
+ <!-- Temporary work around to avoid running android.test.AndroidTestCase. -->
+ <!-- TODO(64541592) - remove once AndroidTestCase is not statically included. -->
+ <option name="exclude-filter" value="android.test.AndroidTestCase" />
</test>
</configuration>
diff --git a/tests/libcore/luni/Android.mk b/tests/libcore/luni/Android.mk
index 7b5d733..3541360 100644
--- a/tests/libcore/luni/Android.mk
+++ b/tests/libcore/luni/Android.mk
@@ -24,8 +24,8 @@
core-tests \
cts-core-test-runner \
mockito-target-minus-junit4 \
- tzdata_shared2-tests \
- tzdata_update2-tests
+ time_zone_distro-tests \
+ time_zone_distro_installer-tests
# Don't include this package in any target
LOCAL_MODULE_TAGS := tests
@@ -38,7 +38,8 @@
LOCAL_DX_FLAGS := --multi-dex
LOCAL_PROGUARD_ENABLED := disabled
-
+# Keep META-INF/ resources from LOCAL_STATIC_JAVA_LIBRARIES. http://b/62341677
+LOCAL_DONT_DELETE_JAR_META_INF := true
LOCAL_JNI_SHARED_LIBRARIES := libjavacoretests libsqlite_jni libnativehelper_compat_libc++ libc++
# Include both the 32 and 64 bit versions of libjavacoretests,
diff --git a/tests/libcore/ojluni/Android.mk b/tests/libcore/ojluni/Android.mk
index a6e378f..adc06b0 100644
--- a/tests/libcore/ojluni/Android.mk
+++ b/tests/libcore/ojluni/Android.mk
@@ -30,6 +30,9 @@
LOCAL_DEX_PREOPT := false
LOCAL_JACK_FLAGS := --multi-dex native
+# Keep META-INF/ resources from LOCAL_STATIC_JAVA_LIBRARIES. http://b/62231394
+LOCAL_DONT_DELETE_JAR_META_INF := true
+
LOCAL_PROGUARD_ENABLED := disabled
# Include both the 32 and 64 bit versions of libjavacoretests,
diff --git a/tests/libcore/wycheproof-bc/Android.mk b/tests/libcore/wycheproof-bc/Android.mk
new file mode 100644
index 0000000..3751ac5
--- /dev/null
+++ b/tests/libcore/wycheproof-bc/Android.mk
@@ -0,0 +1,49 @@
+# Copyright (C) 2017 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_PACKAGE_NAME := CtsLibcoreWycheproofBCTestCases
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ cts-core-test-runner \
+ wycheproof
+
+LOCAL_JAVA_LIBRARIES := bouncycastle
+
+# Don't include this package in any target
+LOCAL_MODULE_TAGS := tests
+
+# When built, explicitly put it in the data partition.
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+
+LOCAL_SRC_FILES := $(call all-java-files-under,src)
+
+LOCAL_DEX_PREOPT := false
+LOCAL_JACK_FLAGS := --multi-dex native
+
+LOCAL_PROGUARD_ENABLED := disabled
+
+# Include both the 32 and 64 bit versions of libjavacoretests,
+# where applicable.
+LOCAL_MULTILIB := both
+
+# Tag this module as a cts test artifact
+LOCAL_COMPATIBILITY_SUITE := cts
+
+LOCAL_JAVA_RESOURCE_FILES := libcore/expectations/knownfailures.txt
+
+include $(BUILD_CTS_SUPPORT_PACKAGE)
diff --git a/tests/vm-tests-tf/AndroidManifest.xml b/tests/libcore/wycheproof-bc/AndroidManifest.xml
similarity index 69%
rename from tests/vm-tests-tf/AndroidManifest.xml
rename to tests/libcore/wycheproof-bc/AndroidManifest.xml
index 2a2f40a..15c5fd5 100644
--- a/tests/vm-tests-tf/AndroidManifest.xml
+++ b/tests/libcore/wycheproof-bc/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- * Copyright (C) 2007 The Android Open Source Project
+ * Copyright (C) 2017 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.
@@ -15,15 +15,14 @@
* limitations under the License.
-->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.core.vm-tests-tf">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android.libcore.cts.wycheproof.bouncycastle">
<uses-permission android:name="android.permission.INTERNET" />
<application>
<uses-library android:name="android.test.runner" />
</application>
- <instrumentation android:name="android.test.InstrumentationCoreTestRunner"
- android:targetPackage="android.core.vm-tests-tf"
- android:label="cts trade federation vm tests"/>
+ <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:targetPackage="android.libcore.cts.wycheproof.bouncycastle"
+ android:label="CTS Libcore Wycheproof Bouncy Castle test cases" />
</manifest>
diff --git a/tests/libcore/wycheproof-bc/AndroidTest.xml b/tests/libcore/wycheproof-bc/AndroidTest.xml
new file mode 100644
index 0000000..9c3a50a
--- /dev/null
+++ b/tests/libcore/wycheproof-bc/AndroidTest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+<configuration description="Config for CTS Libcore Wycheproof Bouncy Castle test cases">
+ <option name="config-descriptor:metadata" key="component" value="libcore" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <!-- this has just the instrumentation which acts as the tests we want to run -->
+ <option name="test-file-name" value="CtsLibcoreWycheproofBCTestCases.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.testtype.LibcoreTest" >
+ <option name="package" value="android.libcore.cts.wycheproof.bouncycastle" />
+ <!-- The individual test cases don't work unless they're run in the
+ context of one of the suites, so we have to limit the test
+ infrastructure to only running the test suites. -->
+ <option name="test-package" value="android.libcore.cts.wycheproof" />
+ <option name="instrumentation-arg" key="listener"
+ value="com.android.cts.runner.CtsTestRunListener" />
+ <option name="instrumentation-arg" key="filter"
+ value="com.android.cts.core.runner.ExpectationBasedFilter" />
+ <option name="core-expectation" value="/knownfailures.txt" />
+ <option name="runtime-hint" value="10m"/>
+ </test>
+</configuration>
diff --git a/tests/libcore/wycheproof/src/android/libcore/cts/wycheproof/BouncyCastleSupportProvider.java b/tests/libcore/wycheproof-bc/src/android/libcore/cts/wycheproof/BouncyCastleSupportProvider.java
similarity index 100%
rename from tests/libcore/wycheproof/src/android/libcore/cts/wycheproof/BouncyCastleSupportProvider.java
rename to tests/libcore/wycheproof-bc/src/android/libcore/cts/wycheproof/BouncyCastleSupportProvider.java
diff --git a/tests/libcore/wycheproof/src/android/libcore/cts/wycheproof/BouncyCastleTest.java b/tests/libcore/wycheproof-bc/src/android/libcore/cts/wycheproof/BouncyCastleTest.java
similarity index 100%
rename from tests/libcore/wycheproof/src/android/libcore/cts/wycheproof/BouncyCastleTest.java
rename to tests/libcore/wycheproof-bc/src/android/libcore/cts/wycheproof/BouncyCastleTest.java
diff --git a/tests/libcore/wycheproof/Android.mk b/tests/libcore/wycheproof/Android.mk
index c14da89..4d5ccf2 100644
--- a/tests/libcore/wycheproof/Android.mk
+++ b/tests/libcore/wycheproof/Android.mk
@@ -16,15 +16,13 @@
include $(CLEAR_VARS)
-LOCAL_PACKAGE_NAME := CtsLibcoreWycheproofTestCases
+LOCAL_PACKAGE_NAME := CtsLibcoreWycheproofConscryptTestCases
LOCAL_STATIC_JAVA_LIBRARIES := \
cts-core-test-runner \
wycheproof
-LOCAL_JAVA_LIBRARIES := \
- bouncycastle \
- conscrypt
+LOCAL_JAVA_LIBRARIES := conscrypt
# Don't include this package in any target
LOCAL_MODULE_TAGS := tests
diff --git a/tests/libcore/wycheproof/AndroidManifest.xml b/tests/libcore/wycheproof/AndroidManifest.xml
index 09b9da1..765c677 100644
--- a/tests/libcore/wycheproof/AndroidManifest.xml
+++ b/tests/libcore/wycheproof/AndroidManifest.xml
@@ -15,14 +15,14 @@
* limitations under the License.
-->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android.libcore.cts.wycheproof">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android.libcore.cts.wycheproof.conscrypt">
<uses-permission android:name="android.permission.INTERNET" />
<application>
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
- android:targetPackage="android.libcore.cts.wycheproof"
- android:label="CTS Libcore Wycheproof test cases" />
+ android:targetPackage="android.libcore.cts.wycheproof.conscrypt"
+ android:label="CTS Libcore Wycheproof Conscrypt test cases" />
</manifest>
diff --git a/tests/libcore/wycheproof/AndroidTest.xml b/tests/libcore/wycheproof/AndroidTest.xml
index 2d303d2..b5874fd 100644
--- a/tests/libcore/wycheproof/AndroidTest.xml
+++ b/tests/libcore/wycheproof/AndroidTest.xml
@@ -13,15 +13,15 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<configuration description="Config for CTS Libcore Wycheproof test cases">
+<configuration description="Config for CTS Libcore Wycheproof Conscrypt test cases">
<option name="config-descriptor:metadata" key="component" value="libcore" />
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="cleanup-apks" value="true" />
<!-- this has just the instrumentation which acts as the tests we want to run -->
- <option name="test-file-name" value="CtsLibcoreWycheproofTestCases.apk" />
+ <option name="test-file-name" value="CtsLibcoreWycheproofConscryptTestCases.apk" />
</target_preparer>
<test class="com.android.compatibility.testtype.LibcoreTest" >
- <option name="package" value="android.libcore.cts.wycheproof" />
+ <option name="package" value="android.libcore.cts.wycheproof.conscrypt" />
<!-- The individual test cases don't work unless they're run in the
context of one of the suites, so we have to limit the test
infrastructure to only running the test suites. -->
diff --git a/tests/openglperf2/jni/Android.mk b/tests/openglperf2/jni/Android.mk
index c2bb7a8..174375d 100644
--- a/tests/openglperf2/jni/Android.mk
+++ b/tests/openglperf2/jni/Android.mk
@@ -21,6 +21,8 @@
# Needed in order to use fences for synchronization
LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES -funsigned-char
+LOCAL_CFLAGS += -Wno-unused-parameter
+
# Get all cpp files but not hidden files
LOCAL_SRC_FILES := $(call all-subdir-cpp-files)
diff --git a/tests/simplecpu/jni/Android.mk b/tests/simplecpu/jni/Android.mk
index 877f1b6..c5f072e 100644
--- a/tests/simplecpu/jni/Android.mk
+++ b/tests/simplecpu/jni/Android.mk
@@ -26,4 +26,6 @@
LOCAL_SDK_VERSION := 14
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/accounts/Android.mk b/tests/tests/accounts/Android.mk
index a3c1f92..f07fe9b 100644
--- a/tests/tests/accounts/Android.mk
+++ b/tests/tests/accounts/Android.mk
@@ -22,7 +22,9 @@
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_STATIC_JAVA_LIBRARIES := \
- CtsAccountTestsCommon ctstestrunner legacy-android-test
+ CtsAccountTestsCommon ctstestrunner
+
+LOCAL_JAVA_LIBRARIES := legacy-android-test
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/bionic/Android.build.copy.libs.mk b/tests/tests/bionic/Android.build.copy.libs.mk
index 1d43a364..5016e33 100644
--- a/tests/tests/bionic/Android.build.copy.libs.mk
+++ b/tests/tests/bionic/Android.build.copy.libs.mk
@@ -112,6 +112,13 @@
private_namespace_libs/libnstest_root.so \
public_namespace_libs/libnstest_public.so \
public_namespace_libs/libnstest_public_internal.so \
+ ld_preload_test_helper/ld_preload_test_helper \
+ ld_preload_test_helper_lib1.so \
+ ld_preload_test_helper_lib2.so \
+ ld_config_test_helper/ld_config_test_helper \
+ ns2/ld_config_test_helper_lib1.so \
+ ns2/ld_config_test_helper_lib2.so \
+ ld_config_test_helper_lib3.so \
# These libraries are not built for mips.
my_bionic_testlib_files_non_mips := \
diff --git a/tests/tests/calendarcommon/Android.mk b/tests/tests/calendarcommon/Android.mk
index 042e260..9d7091a 100644
--- a/tests/tests/calendarcommon/Android.mk
+++ b/tests/tests/calendarcommon/Android.mk
@@ -25,7 +25,9 @@
# When built, explicitly put it in the data partition.
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner legacy-android-test
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
+
+LOCAL_JAVA_LIBRARIES := legacy-android-test
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/dpi2/Android.mk b/tests/tests/dpi2/Android.mk
index 1fcedf1..3819d01 100644
--- a/tests/tests/dpi2/Android.mk
+++ b/tests/tests/dpi2/Android.mk
@@ -20,6 +20,8 @@
# We use the DefaultManifestAttributesTest from the android.cts.dpi package.
LOCAL_STATIC_JAVA_LIBRARIES := android.cts.dpi ctstestrunner junit
+LOCAL_JAVA_LIBRARIES := legacy-android-test
+
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CtsDpiTestCases2
diff --git a/tests/tests/drm/jni/Android.mk b/tests/tests/drm/jni/Android.mk
index 87f00a4..fe9a041 100644
--- a/tests/tests/drm/jni/Android.mk
+++ b/tests/tests/drm/jni/Android.mk
@@ -30,4 +30,6 @@
LOCAL_SHARED_LIBRARIES := liblog libdl
LOCAL_SDK_VERSION := 23
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/jni/libjninamespacea1/namespacea1.cpp b/tests/tests/jni/libjninamespacea1/namespacea1.cpp
index decb4f1..8a79c3c 100644
--- a/tests/tests/jni/libjninamespacea1/namespacea1.cpp
+++ b/tests/tests/jni/libjninamespacea1/namespacea1.cpp
@@ -18,7 +18,7 @@
#include <android/log.h>
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,"namespacea1",__VA_ARGS__)
diff --git a/tests/tests/jni/libjninamespacea2/namespacea2.cpp b/tests/tests/jni/libjninamespacea2/namespacea2.cpp
index 809266e..49f055e 100644
--- a/tests/tests/jni/libjninamespacea2/namespacea2.cpp
+++ b/tests/tests/jni/libjninamespacea2/namespacea2.cpp
@@ -18,7 +18,7 @@
#include <android/log.h>
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,"namespacea2",__VA_ARGS__)
diff --git a/tests/tests/jni/libjninamespaceb/namespaceb.cpp b/tests/tests/jni/libjninamespaceb/namespaceb.cpp
index b3bedcb..4c48627 100644
--- a/tests/tests/jni/libjninamespaceb/namespaceb.cpp
+++ b/tests/tests/jni/libjninamespaceb/namespaceb.cpp
@@ -18,7 +18,7 @@
#include <android/log.h>
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,"namespaceb",__VA_ARGS__)
diff --git a/tests/tests/jni/libjnitest/Android.mk b/tests/tests/jni/libjnitest/Android.mk
index 7140de4..0703722 100644
--- a/tests/tests/jni/libjnitest/Android.mk
+++ b/tests/tests/jni/libjnitest/Android.mk
@@ -42,4 +42,6 @@
LOCAL_SDK_VERSION := 23
LOCAL_NDK_STL_VARIANT := c++_static
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/jni/libjnitest/android_jni_cts_InstanceNonce.c b/tests/tests/jni/libjnitest/android_jni_cts_InstanceNonce.c
index 3fda82a..cb44b42a 100644
--- a/tests/tests/jni/libjnitest/android_jni_cts_InstanceNonce.c
+++ b/tests/tests/jni/libjnitest/android_jni_cts_InstanceNonce.c
@@ -20,7 +20,7 @@
*/
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
#include <stdbool.h>
#include <string.h>
diff --git a/tests/tests/jni/libjnitest/android_jni_cts_JniCTest.c b/tests/tests/jni/libjnitest/android_jni_cts_JniCTest.c
index 23278dc..cca5383 100644
--- a/tests/tests/jni/libjnitest/android_jni_cts_JniCTest.c
+++ b/tests/tests/jni/libjnitest/android_jni_cts_JniCTest.c
@@ -19,7 +19,7 @@
*/
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
/*
diff --git a/tests/tests/jni/libjnitest/android_jni_cts_JniCppTest.cpp b/tests/tests/jni/libjnitest/android_jni_cts_JniCppTest.cpp
index 38829a0..b0937f4 100644
--- a/tests/tests/jni/libjnitest/android_jni_cts_JniCppTest.cpp
+++ b/tests/tests/jni/libjnitest/android_jni_cts_JniCppTest.cpp
@@ -19,7 +19,7 @@
*/
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
/*
diff --git a/tests/tests/jni/libjnitest/android_jni_cts_JniStaticTest.cpp b/tests/tests/jni/libjnitest/android_jni_cts_JniStaticTest.cpp
index 5e8bea0..aa5651f 100644
--- a/tests/tests/jni/libjnitest/android_jni_cts_JniStaticTest.cpp
+++ b/tests/tests/jni/libjnitest/android_jni_cts_JniStaticTest.cpp
@@ -19,7 +19,7 @@
*/
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
extern "C" JNIEXPORT jint JNICALL Java_android_jni_cts_ClassLoaderHelper_nativeGetHashCode(
JNIEnv* env,
diff --git a/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp b/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp
index 504ae01..33a9a1d 100644
--- a/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp
+++ b/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp
@@ -22,7 +22,6 @@
#include <dlfcn.h>
#include <fcntl.h>
#include <jni.h>
-#include <JNIHelp.h>
#include <libgen.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -34,8 +33,9 @@
#include <unordered_set>
#include <vector>
-#include "ScopedLocalRef.h"
-#include "ScopedUtfChars.h"
+#include <nativehelper/JNIHelp.h>
+#include <nativehelper/ScopedLocalRef.h>
+#include <nativehelper/ScopedUtfChars.h>
#if defined(__LP64__)
static const std::string kSystemLibraryPath = "/system/lib64";
diff --git a/tests/tests/jni/libjnitest/android_jni_cts_StaticNonce.c b/tests/tests/jni/libjnitest/android_jni_cts_StaticNonce.c
index ada2bf8..4e330e5 100644
--- a/tests/tests/jni/libjnitest/android_jni_cts_StaticNonce.c
+++ b/tests/tests/jni/libjnitest/android_jni_cts_StaticNonce.c
@@ -20,7 +20,7 @@
*/
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
#include <stdbool.h>
#include <string.h>
diff --git a/tests/tests/jni/libjnitest/macroized_tests.c b/tests/tests/jni/libjnitest/macroized_tests.c
index 130b378..e8ac08f 100644
--- a/tests/tests/jni/libjnitest/macroized_tests.c
+++ b/tests/tests/jni/libjnitest/macroized_tests.c
@@ -182,13 +182,13 @@
// TODO: Missing functions:
// AllocObject
-static char *help_CallBooleanMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallBooleanMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"returnBoolean", "()Z");
if (method == NULL) {
@@ -287,13 +287,13 @@
return help_CallBooleanMethod(env, STATIC_VA);
}
-static char *help_CallByteMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallByteMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"returnByte", "()B");
if (method == NULL) {
@@ -392,13 +392,13 @@
return help_CallByteMethod(env, STATIC_VA);
}
-static char *help_CallShortMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallShortMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"returnShort", "()S");
if (method == NULL) {
@@ -497,13 +497,13 @@
return help_CallShortMethod(env, STATIC_VA);
}
-static char *help_CallCharMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallCharMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"returnChar", "()C");
if (method == NULL) {
@@ -602,13 +602,13 @@
return help_CallCharMethod(env, STATIC_VA);
}
-static char *help_CallIntMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallIntMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"returnInt", "()I");
if (method == NULL) {
@@ -707,13 +707,13 @@
return help_CallIntMethod(env, STATIC_VA);
}
-static char *help_CallLongMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallLongMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"returnLong", "()J");
if (method == NULL) {
@@ -812,13 +812,13 @@
return help_CallLongMethod(env, STATIC_VA);
}
-static char *help_CallFloatMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallFloatMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"returnFloat", "()F");
if (method == NULL) {
@@ -917,13 +917,13 @@
return help_CallFloatMethod(env, STATIC_VA);
}
-static char *help_CallDoubleMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallDoubleMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"returnDouble", "()D");
if (method == NULL) {
@@ -1022,13 +1022,13 @@
return help_CallDoubleMethod(env, STATIC_VA);
}
-static char *help_CallVoidMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallVoidMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"nop", "()V");
if (method == NULL) {
@@ -1127,13 +1127,13 @@
return help_CallVoidMethod(env, STATIC_VA);
}
-static char *help_CallObjectMethod(JNIEnv *env, callType ct, ...) {
+static char *help_CallObjectMethod(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"returnString", "()Ljava/lang/String;");
if (method == NULL) {
@@ -1250,13 +1250,13 @@
return help_CallObjectMethod(env, STATIC_VA);
}
-static char *help_TakeOneOfEach(JNIEnv *env, callType ct, ...) {
+static char *help_TakeOneOfEach(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"takeOneOfEach", "(DFJICSBZLjava/lang/String;)Z");
if (method == NULL) {
@@ -1372,13 +1372,13 @@
(jboolean) true, biscuits);
}
-static char *help_TakeCoolHandLuke(JNIEnv *env, callType ct, ...) {
+static char *help_TakeCoolHandLuke(JNIEnv *env, int ct, ...) {
va_list args;
va_start(args, ct);
char *msg;
jobject o = getStandardInstance(env);
- jmethodID method = findAppropriateMethod(env, &msg, ct,
+ jmethodID method = findAppropriateMethod(env, &msg, (callType)ct,
"takeCoolHandLuke",
"(IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII)Z");
diff --git a/tests/tests/media/libmediandkjni/codec-utils-jni.cpp b/tests/tests/media/libmediandkjni/codec-utils-jni.cpp
index cb4363e..d7bd74e 100644
--- a/tests/tests/media/libmediandkjni/codec-utils-jni.cpp
+++ b/tests/tests/media/libmediandkjni/codec-utils-jni.cpp
@@ -24,8 +24,8 @@
#include <sys/types.h>
#include <jni.h>
-#include <ScopedLocalRef.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
+#include <nativehelper/ScopedLocalRef.h>
#include <math.h>
diff --git a/tests/tests/media/libmediandkjni/native-mediadrm-jni.cpp b/tests/tests/media/libmediandkjni/native-mediadrm-jni.cpp
index aa549b2..6cf9a89 100644
--- a/tests/tests/media/libmediandkjni/native-mediadrm-jni.cpp
+++ b/tests/tests/media/libmediandkjni/native-mediadrm-jni.cpp
@@ -24,7 +24,7 @@
#include <assert.h>
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
#include <android/native_window_jni.h>
diff --git a/tests/tests/media/res/raw/gb18030_utf8_mixed_1.mp3 b/tests/tests/media/res/raw/gb18030_utf8_mixed_1.mp3
new file mode 100644
index 0000000..af2c7ac
--- /dev/null
+++ b/tests/tests/media/res/raw/gb18030_utf8_mixed_1.mp3
Binary files differ
diff --git a/tests/tests/media/res/raw/gb18030_utf8_mixed_2.mp3 b/tests/tests/media/res/raw/gb18030_utf8_mixed_2.mp3
new file mode 100644
index 0000000..d1c88fe
--- /dev/null
+++ b/tests/tests/media/res/raw/gb18030_utf8_mixed_2.mp3
Binary files differ
diff --git a/tests/tests/media/res/raw/gb18030_utf8_mixed_3.mp3 b/tests/tests/media/res/raw/gb18030_utf8_mixed_3.mp3
new file mode 100644
index 0000000..ddae12f
--- /dev/null
+++ b/tests/tests/media/res/raw/gb18030_utf8_mixed_3.mp3
Binary files differ
diff --git a/tests/tests/media/res/raw/iso88591_utf8_mixed_1.mp3 b/tests/tests/media/res/raw/iso88591_utf8_mixed_1.mp3
new file mode 100644
index 0000000..78bad13
--- /dev/null
+++ b/tests/tests/media/res/raw/iso88591_utf8_mixed_1.mp3
Binary files differ
diff --git a/tests/tests/media/res/raw/iso88591_utf8_mixed_2.mp3 b/tests/tests/media/res/raw/iso88591_utf8_mixed_2.mp3
new file mode 100644
index 0000000..c7d8429
--- /dev/null
+++ b/tests/tests/media/res/raw/iso88591_utf8_mixed_2.mp3
Binary files differ
diff --git a/tests/tests/media/res/raw/iso88591_utf8_mixed_3.mp3 b/tests/tests/media/res/raw/iso88591_utf8_mixed_3.mp3
new file mode 100644
index 0000000..c8d4afa
--- /dev/null
+++ b/tests/tests/media/res/raw/iso88591_utf8_mixed_3.mp3
Binary files differ
diff --git a/tests/tests/media/src/android/media/cts/MediaScannerTest.java b/tests/tests/media/src/android/media/cts/MediaScannerTest.java
index 3a12e3b..137b7cf 100644
--- a/tests/tests/media/src/android/media/cts/MediaScannerTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaScannerTest.java
@@ -470,7 +470,20 @@
new MediaScanEntry(R.raw.iso88591_13,
new String[] {"Michael Bublé", "Crazy Love", "Michael Bublé", "Haven't Met You Yet", null}),
new MediaScanEntry(R.raw.utf16_1,
- new String[] {"Shakira", "Latin Mix USA", "Shakira", "Estoy Aquí", null})
+ new String[] {"Shakira", "Latin Mix USA", "Shakira", "Estoy Aquí", null}),
+ // Tags are encoded in different charsets.
+ new MediaScanEntry(R.raw.iso88591_utf8_mixed_1,
+ new String[] {"刘昊霖/kidult.", "鱼干铺里", "刘昊霖/kidult.", "Colin Wine's Mailbox", null}),
+ new MediaScanEntry(R.raw.iso88591_utf8_mixed_2,
+ new String[] {"冰块先生/郭美孜", "hey jude", "冰块先生/郭美孜", "Hey Jude", null}),
+ new MediaScanEntry(R.raw.iso88591_utf8_mixed_3,
+ new String[] {"Toy王奕/Tizzy T/满舒克", "1993", "Toy王奕/Tizzy T/满舒克", "Me&Ma Bros", null}),
+ new MediaScanEntry(R.raw.gb18030_utf8_mixed_1,
+ new String[] {"张国荣", "钟情张国荣", null, "左右手", null}),
+ new MediaScanEntry(R.raw.gb18030_utf8_mixed_2,
+ new String[] {"纵贯线", "Live in Taipei 出发\\/终点站", null, "皇后大道东(Live)", null}),
+ new MediaScanEntry(R.raw.gb18030_utf8_mixed_3,
+ new String[] {"谭咏麟", "二十年白金畅销金曲全记录", null, "知心当玩偶", null})
};
public void testEncodingDetection() throws Exception {
diff --git a/tests/tests/mediastress/jni/Android.mk b/tests/tests/mediastress/jni/Android.mk
index 164e302..6756bc3 100644
--- a/tests/tests/mediastress/jni/Android.mk
+++ b/tests/tests/mediastress/jni/Android.mk
@@ -29,4 +29,6 @@
LOCAL_SHARED_LIBRARIES := libandroid libnativehelper_compat_libc++ liblog libOpenMAXAL
LOCAL_CXX_STL := libc++_static
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/net/jni/Android.mk b/tests/tests/net/jni/Android.mk
index 0ec8d28..887e95e 100644
--- a/tests/tests/net/jni/Android.mk
+++ b/tests/tests/net/jni/Android.mk
@@ -27,6 +27,9 @@
LOCAL_SHARED_LIBRARIES := libnativehelper_compat_libc++ liblog
LOCAL_CXX_STL := libc++_static
+
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
diff --git a/tests/tests/opengl/libopengltest/Android.mk b/tests/tests/opengl/libopengltest/Android.mk
index afa94dc..f05fd8c 100755
--- a/tests/tests/opengl/libopengltest/Android.mk
+++ b/tests/tests/opengl/libopengltest/Android.mk
@@ -39,6 +39,9 @@
LOCAL_CXX_STL := libc++_static
LOCAL_SHARED_LIBRARIES := libGLESv2 liblog
+
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/opengl/libopengltest/gl2_jni_libone.cpp b/tests/tests/opengl/libopengltest/gl2_jni_libone.cpp
index fe49b1b..a511f9a 100755
--- a/tests/tests/opengl/libopengltest/gl2_jni_libone.cpp
+++ b/tests/tests/opengl/libopengltest/gl2_jni_libone.cpp
@@ -135,7 +135,7 @@
jclass obj, jint pCategory, jint pSubCategory, jfloatArray color)
{
LOGI("Inside draw %d %d", pCategory, pSubCategory);
- jfloatArray result;
+ jfloatArray result = nullptr;
if(pCategory == 3){
if(pSubCategory == 1){
result = env->NewFloatArray(4);
@@ -143,8 +143,8 @@
jfloat *lColor = env->GetFloatArrayElements(color,0);
float * actualColor = drawColorOne(lColor);
- for( int i= 0; i < sizeof(actualColor); i++) {
- LOGI("actualColor[%d] ; %f", i, actualColor[i]);
+ for(unsigned i = 0; i < sizeof(actualColor); i++) {
+ LOGI("actualColor[%u] ; %f", i, actualColor[i]);
}
env->SetFloatArrayRegion(result, 0, 4, actualColor);
}
diff --git a/tests/tests/openglperf/jni/Android.mk b/tests/tests/openglperf/jni/Android.mk
index d6df59b..3fe448a 100644
--- a/tests/tests/openglperf/jni/Android.mk
+++ b/tests/tests/openglperf/jni/Android.mk
@@ -28,4 +28,6 @@
LOCAL_SDK_VERSION := 14
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/os/assets/platform_versions.txt b/tests/tests/os/assets/platform_versions.txt
index ae9a76b..c47e490 100644
--- a/tests/tests/os/assets/platform_versions.txt
+++ b/tests/tests/os/assets/platform_versions.txt
@@ -1 +1,4 @@
8.0.0
+8.0.1
+OMR1
+P
diff --git a/tests/tests/os/jni/Android.mk b/tests/tests/os/jni/Android.mk
index ebc03e1..3d79d31 100644
--- a/tests/tests/os/jni/Android.mk
+++ b/tests/tests/os/jni/Android.mk
@@ -55,6 +55,7 @@
LOCAL_CFLAGS += -DARCH_SUPPORTS_SECCOMP
endif
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_CPPFLAGS_arm := -mcpu=generic
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/permission/jni/Android.mk b/tests/tests/permission/jni/Android.mk
index 91c0540..2e64d47 100644
--- a/tests/tests/permission/jni/Android.mk
+++ b/tests/tests/permission/jni/Android.mk
@@ -31,4 +31,6 @@
LOCAL_SDK_VERSION := 23
LOCAL_CPPFLAGS := -std=gnu++11
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/permission/jni/android_permission_cts_FileUtils.cpp b/tests/tests/permission/jni/android_permission_cts_FileUtils.cpp
index 0547be4..22dae69 100644
--- a/tests/tests/permission/jni/android_permission_cts_FileUtils.cpp
+++ b/tests/tests/permission/jni/android_permission_cts_FileUtils.cpp
@@ -25,9 +25,9 @@
#include <grp.h>
#include <pwd.h>
#include <string.h>
-#include <ScopedLocalRef.h>
-#include <ScopedPrimitiveArray.h>
-#include <ScopedUtfChars.h>
+#include <nativehelper/ScopedLocalRef.h>
+#include <nativehelper/ScopedPrimitiveArray.h>
+#include <nativehelper/ScopedUtfChars.h>
static jfieldID gFileStatusDevFieldID;
static jfieldID gFileStatusInoFieldID;
diff --git a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
index b97d109..79ee799 100644
--- a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
@@ -169,6 +169,24 @@
assertFalse(f.canExecute());
}
+ /* b/26813932 */
+ @MediumTest
+ public void testProcInterruptsNotReadable() throws Exception {
+ File f = new File("/proc/interrupts");
+ assertFalse(f.canRead());
+ assertFalse(f.canWrite());
+ assertFalse(f.canExecute());
+ }
+
+ /* b/26813932 */
+ @MediumTest
+ public void testProcStatNotReadable() throws Exception {
+ File f = new File("/proc/stat");
+ assertFalse(f.canRead());
+ assertFalse(f.canWrite());
+ assertFalse(f.canExecute());
+ }
+
@MediumTest
public void testDevMemSane() throws Exception {
File f = new File("/dev/mem");
diff --git a/tests/tests/provider/Android.mk b/tests/tests/provider/Android.mk
index 3b71035..c1d1058 100644
--- a/tests/tests/provider/Android.mk
+++ b/tests/tests/provider/Android.mk
@@ -28,15 +28,14 @@
# Tag this module as a cts test artifact
LOCAL_COMPATIBILITY_SUITE := cts general-tests
-LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common
+LOCAL_JAVA_LIBRARIES := android.test.mock legacy-android-test telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-v4 \
compatibility-device-util \
ctstestrunner \
ub-uiautomator \
- junit \
- legacy-android-test
+ junit
LOCAL_JNI_SHARED_LIBRARIES := libcts_jni libnativehelper_compat_libc++
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java b/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
index bc13144..cf535e8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
@@ -3045,9 +3045,9 @@
RemquoResult expected = remquo(args.inNumerator, args.inDenominator);
// If the expected remainder is NaN, we don't validate the quotient. It's because of
// a division by zero.
- if (expected.remainder != expected.remainder) {
+ if (Float.isNaN(expected.remainder)) {
// Check that the value we got is NaN too.
- if (args.out == args.out) {
+ if (!Float.isNaN(args.out)) {
return "Expected a remainder of NaN but got " + Float.toString(args.out);
}
} else {
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/Target.java b/tests/tests/renderscript/src/android/renderscript/cts/Target.java
index 55d3712..3ac4ff8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/Target.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/Target.java
@@ -341,7 +341,7 @@
mHasRange = false;
mValue = values[0];
for (double f: values) {
- if (f != f) {
+ if (Double.isNaN(f)) {
mCanBeNan = true;
continue;
}
@@ -573,7 +573,7 @@
public boolean couldBe(double a, double extraAllowedError) {
//Log.w("Floaty.couldBe", "Can " + Double.toString(a) + " be " + toString() + "? ");
// Handle the input being a NaN.
- if (a != a) {
+ if (Double.isNaN(a)) {
//Log.w("couldBe", "true because is Naan");
return mCanBeNan;
}
diff --git a/tests/tests/rsblas/libbnnmdata/Android.mk b/tests/tests/rsblas/libbnnmdata/Android.mk
index bbfd289..84fb4e6 100644
--- a/tests/tests/rsblas/libbnnmdata/Android.mk
+++ b/tests/tests/rsblas/libbnnmdata/Android.mk
@@ -14,7 +14,6 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_CLANG := true
LOCAL_MODULE := libbnnmdata_jni
LOCAL_MODULE_TAGS := optional
diff --git a/tests/tests/rscpp/librscpptest/Android.mk b/tests/tests/rscpp/librscpptest/Android.mk
index 36eafe2..47ab6dd3 100644
--- a/tests/tests/rscpp/librscpptest/Android.mk
+++ b/tests/tests/rscpp/librscpptest/Android.mk
@@ -18,7 +18,6 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-LOCAL_CLANG := true
LOCAL_MODULE := librscpptest_jni
LOCAL_MODULE_TAGS := optional
@@ -46,6 +45,7 @@
LOCAL_C_INCLUDES += frameworks/rs
LOCAL_CPPFLAGS := -std=c++11
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_SHARED_LIBRARIES := libdl liblog
LOCAL_STATIC_LIBRARIES := libRScpp_static
diff --git a/tests/tests/security/jni/Android.mk b/tests/tests/security/jni/Android.mk
index 118744e..dd069fe 100644
--- a/tests/tests/security/jni/Android.mk
+++ b/tests/tests/security/jni/Android.mk
@@ -46,4 +46,6 @@
LOCAL_C_INCLUDES += ndk/sources/cpufeatures
LOCAL_STATIC_LIBRARIES := cpufeatures
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/security/jni/android_security_cts_EncryptionTest.cpp b/tests/tests/security/jni/android_security_cts_EncryptionTest.cpp
index 136b52b..47f760a 100644
--- a/tests/tests/security/jni/android_security_cts_EncryptionTest.cpp
+++ b/tests/tests/security/jni/android_security_cts_EncryptionTest.cpp
@@ -18,7 +18,7 @@
#include <cutils/log.h>
#include <cutils/properties.h>
#include <jni.h>
-#include <JNIHelp.h>
+#include <nativehelper/JNIHelp.h>
#include <openssl/aes.h>
#include <openssl/cpu.h>
#include <openssl/evp.h>
diff --git a/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp b/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp
index 1cfde0a..c7975ec 100644
--- a/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp
+++ b/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp
@@ -15,10 +15,10 @@
*/
#include <jni.h>
+#include <nativehelper/JNIHelp.h>
+#include <nativehelper/ScopedLocalRef.h>
+#include <nativehelper/ScopedUtfChars.h>
#include <selinux/selinux.h>
-#include <JNIHelp.h>
-#include <ScopedLocalRef.h>
-#include <ScopedUtfChars.h>
#include <memory>
diff --git a/tests/tests/security/testeffect/Android.mk b/tests/tests/security/testeffect/Android.mk
index a7e3cac..7e4ab93 100644
--- a/tests/tests/security/testeffect/Android.mk
+++ b/tests/tests/security/testeffect/Android.mk
@@ -28,5 +28,6 @@
LOCAL_C_INCLUDES := \
$(call include-path-for, audio-effects)
+LOCAL_CFLAGS := -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/selinux/selinuxTargetSdk/Android.mk b/tests/tests/selinux/selinuxTargetSdk/Android.mk
index 138da59..d2a69f8 100755
--- a/tests/tests/selinux/selinuxTargetSdk/Android.mk
+++ b/tests/tests/selinux/selinuxTargetSdk/Android.mk
@@ -20,8 +20,8 @@
LOCAL_COMPATIBILITY_SUITE := cts general-tests
LOCAL_STATIC_JAVA_LIBRARIES := \
compatibility-device-util \
- ctstestrunner \
- legacy-android-test
+ ctstestrunner
+LOCAL_JAVA_LIBRARIES := legacy-android-test
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CtsSelinuxTargetSdkTestCases
LOCAL_SDK_VERSION := current
diff --git a/tests/tests/view/jni/Android.mk b/tests/tests/view/jni/Android.mk
index 288e250..f1aad68 100644
--- a/tests/tests/view/jni/Android.mk
+++ b/tests/tests/view/jni/Android.mk
@@ -32,6 +32,4 @@
LOCAL_CXX_STL := libc++_static
-LOCAL_CLANG := true
-
include $(BUILD_SHARED_LIBRARY)
diff --git a/tools/vm-tests-tf/Android.mk b/tools/vm-tests-tf/Android.mk
index a0794aa..6b8c85f 100644
--- a/tools/vm-tests-tf/Android.mk
+++ b/tools/vm-tests-tf/Android.mk
@@ -29,6 +29,7 @@
include $(BUILD_JAVA_LIBRARY)
cts-tf-dalvik-lib.jack := $(full_classes_jack)
+cts-tf-dalvik-lib.jar := $(full_classes_jar)
# buildutil java library
# ============================================================
@@ -80,6 +81,8 @@
ifdef LOCAL_JACK_ENABLED
vmteststf_dep_jars += $(cts-tf-dalvik-lib.jack)
+else
+ vmteststf_dep_jars += $(cts-tf-dalvik-lib.jar)
endif
$(LOCAL_BUILT_MODULE): PRIVATE_SRC_FOLDER := $(LOCAL_PATH)/src
@@ -91,23 +94,30 @@
$(LOCAL_BUILT_MODULE): PRIVATE_CLASS_PATH := $(call normalize-path-list, $(vmteststf_dep_jars))
$(LOCAL_BUILT_MODULE): PRIVATE_JACK_VERSION := $(LOCAL_JACK_VERSION)
ifndef LOCAL_JACK_ENABLED
+oj_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,core-oj,,COMMON)/classes.jar
+libart_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,core-libart,,COMMON)/classes.jar
+$(LOCAL_BUILT_MODULE): PRIVATE_DALVIK_SUITE_CLASSPATH := $(oj_jar):$(libart_jar):$(cts-tf-dalvik-lib.jar):$(HOST_OUT_JAVA_LIBRARIES)/tradefed.jar:
$(LOCAL_BUILT_MODULE) : $(vmteststf_dep_jars) $(HOST_OUT_JAVA_LIBRARIES)/tradefed.jar
$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
$(hide) mkdir -p $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/dot/junit $(dir $(PRIVATE_INTERMEDIATES_DEXCORE_JAR))
# generated and compile the host side junit tests
@echo "Write generated Main_*.java files to $(PRIVATE_INTERMEDIATES_MAIN_FILES)"
- $(hide) java \
+ $(hide) $(JAVA) \
$(if $(EXPERIMENTAL_USE_OPENJDK9),--add-exports jdk.jartool/sun.tools.jar=ALL-UNNAMED) \
-cp $(PRIVATE_CLASS_PATH) util.build.BuildDalvikSuite $(PRIVATE_SRC_FOLDER) $(PRIVATE_INTERMEDIATES) \
- $(HOST_OUT_JAVA_LIBRARIES)/cts-tf-dalvik-buildutil.jar:$(HOST_OUT_JAVA_LIBRARIES)/tradefed.jar \
+ $(PRIVATE_DALVIK_SUITE_CLASSPATH) \
$(PRIVATE_INTERMEDIATES_MAIN_FILES) $(PRIVATE_INTERMEDIATES_CLASSES) $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES) $$RUN_VM_TESTS_RTO
@echo "Generate $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)"
- $(hide) jar -cf $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jar \
+ $(hide) $(JAR) -cf $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)-class.jar \
$(addprefix -C $(PRIVATE_INTERMEDIATES_CLASSES) , dot/junit/DxUtil.class dot/junit/DxAbstractMain.class)
- $(hide) $(DX) -JXms16M -JXmx768M --dex --output=$(PRIVATE_INTERMEDIATES_DEXCORE_JAR) \
- $(if $(NO_OPTIMIZE_DX), --no-optimize) $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jar && rm -f $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jar
- $(hide) cd $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/classes && zip -q -r ../../$(notdir $@).jar .
+ $(hide) mkdir -p $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).tmp
+ $(hide) $(DX) -JXms16M -JXmx768M --dex --output=$(PRIVATE_INTERMEDIATES_DEXCORE_JAR).tmp \
+ $(if $(NO_OPTIMIZE_DX), --no-optimize) $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)-class.jar && rm -f $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jar
+ $(hide) cd $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).tmp && zip -q -r $(abspath $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)) .
+ $(hide) cd $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/classes && zip -q -r ../../$(notdir $@) .
$(hide) cd $(dir $@) && zip -q -r $(notdir $@) tests
+oj_jar :=
+libart_jar :=
else # LOCAL_JACK_ENABLED
oj_jack := $(call intermediates-dir-for,JAVA_LIBRARIES,core-oj,,COMMON)/classes.jack
libart_jack := $(call intermediates-dir-for,JAVA_LIBRARIES,core-libart,,COMMON)/classes.jack
@@ -117,11 +127,11 @@
$(hide) mkdir -p $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/dot/junit $(dir $(PRIVATE_INTERMEDIATES_DEXCORE_JAR))
# generated and compile the host side junit tests
@echo "Write generated Main_*.java files to $(PRIVATE_INTERMEDIATES_MAIN_FILES)"
- $(hide) JACK_VERSION=$(PRIVATE_JACK_VERSION) java -cp $(PRIVATE_CLASS_PATH) util.build.JackBuildDalvikSuite $(JACK) $(PRIVATE_SRC_FOLDER) $(PRIVATE_INTERMEDIATES) \
+ $(hide) JACK_VERSION=$(PRIVATE_JACK_VERSION) $(JAVA) -cp $(PRIVATE_CLASS_PATH) util.build.JackBuildDalvikSuite $(JACK) $(PRIVATE_SRC_FOLDER) $(PRIVATE_INTERMEDIATES) \
$(PRIVATE_DALVIK_SUITE_CLASSPATH) \
$(PRIVATE_INTERMEDIATES_MAIN_FILES) $(PRIVATE_INTERMEDIATES_CLASSES) $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES) $$RUN_VM_TESTS_RTO
@echo "Generate $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)"
- $(hide) jar -cf $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)-class.jar \
+ $(hide) $(JAR) -cf $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)-class.jar \
$(addprefix -C $(PRIVATE_INTERMEDIATES_CLASSES) , dot/junit/DxUtil.class dot/junit/DxAbstractMain.class)
$(hide) $(call call-jack) --import $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)-class.jar --output-jack $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jack
$(hide) mkdir -p $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).tmp
diff --git a/tools/vm-tests-tf/src/util/build/JarBuildStep.java b/tools/vm-tests-tf/src/util/build/JarBuildStep.java
index 776e905..7fbe2d5 100644
--- a/tools/vm-tests-tf/src/util/build/JarBuildStep.java
+++ b/tools/vm-tests-tf/src/util/build/JarBuildStep.java
@@ -16,28 +16,36 @@
package util.build;
-import sun.tools.jar.Main;
-
+import java.io.BufferedInputStream;
import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
-
+/**
+ * JarBuildStep takes a single input file and embeds it into a (new) jar file as a single entry.
+ */
public class JarBuildStep extends BuildStep {
- String destFileName;
+ String outputJarEntryName;
private final boolean deleteInputFileAfterBuild;
- public JarBuildStep(BuildFile inputFile, String destFileName,
- BuildFile outputFile, boolean deleteInputFileAfterBuild) {
- super(inputFile, outputFile);
- this.destFileName = destFileName;
+ public JarBuildStep(BuildFile inputFile, String outputJarEntryName,
+ BuildFile outputJarFile, boolean deleteInputFileAfterBuild) {
+ super(inputFile, outputJarFile);
+ this.outputJarEntryName = outputJarEntryName;
this.deleteInputFileAfterBuild = deleteInputFileAfterBuild;
}
@Override
boolean build() {
if (super.build()) {
- File tempFile = new File(inputFile.folder, destFileName);
+ File tempFile = new File(inputFile.folder, outputJarEntryName);
try {
if (!inputFile.fileName.equals(tempFile)) {
copyFile(inputFile.fileName, tempFile);
@@ -56,25 +64,53 @@
+ outDir.getAbsolutePath());
return false;
}
- String[] arguments = new String[] {
- "-cMf", outputFile.fileName.getAbsolutePath(), "-C",
- inputFile.folder.getAbsolutePath(), destFileName};
- Main main = new Main(System.out, System.err, "jar");
- boolean success = main.run(arguments);
- if (success) {
- if (tempFile != null) {
- tempFile.delete();
- }
- if (deleteInputFileAfterBuild) {
- inputFile.fileName.delete();
- }
- } else {
- System.err.println("exception in JarBuildStep while calling jar with args:" +
- " \"-cMf\", "+outputFile.fileName.getAbsolutePath()+", \"-C\"," +
- inputFile.folder.getAbsolutePath()+", "+ destFileName);
+ // Find the input. We'll need to look into the input folder, but check with the
+ // (relative) destination filename (this is effectively removing the inputFile folder
+ // from the entry path in the jar file).
+ Path absoluteInputPath = Paths.get(inputFile.folder.getAbsolutePath())
+ .resolve(outputJarEntryName);
+ File absoluteInputFile = absoluteInputPath.toFile();
+ if (!absoluteInputFile.exists()) {
+ // Something went wrong.
+ throw new IllegalArgumentException(absoluteInputFile.getAbsolutePath());
}
- return success;
+
+ // Use a JarOutputStream to create the output jar file.
+ File jarOutFile = outputFile.fileName;
+ try (JarOutputStream jarOut = new JarOutputStream(new FileOutputStream(jarOutFile))) {
+ // Create the JAR entry for the file. Use destFileName, and copy the timestamp
+ // from the input.
+ JarEntry entry = new JarEntry(outputJarEntryName);
+ entry.setTime(absoluteInputFile.lastModified());
+
+ // Push the entry. The stream will then be ready to accept content.
+ jarOut.putNextEntry(entry);
+
+ // Copy absoluteInputFile into the jar file.
+ Files.copy(absoluteInputPath, jarOut);
+
+ // Finish the entry.
+ jarOut.closeEntry();
+
+ // (Implicitly close the stream, finishing the jar file.)
+ } catch (Exception e) {
+ System.err.println("exception in JarBuildStep for " +
+ outputFile.fileName.getAbsolutePath() + ", " + outputJarEntryName);
+ e.printStackTrace(System.err);
+ jarOutFile.delete();
+ return false;
+ }
+
+ // Clean up.
+ if (tempFile != null) {
+ tempFile.delete();
+ }
+ if (deleteInputFileAfterBuild) {
+ inputFile.fileName.delete();
+ }
+
+ return true;
}
return false;
}
@@ -82,7 +118,7 @@
@Override
public int hashCode() {
return inputFile.hashCode() ^ outputFile.hashCode()
- ^ destFileName.hashCode();
+ ^ outputJarEntryName.hashCode();
}
@Override
@@ -91,7 +127,7 @@
JarBuildStep other = (JarBuildStep) obj;
return inputFile.equals(other.inputFile)
&& outputFile.equals(other.outputFile)
- && destFileName.equals(other.destFileName);
+ && outputJarEntryName.equals(other.outputJarEntryName);
}
return false;