Merge "libdm: Remove dm_linear_fuzzer."
diff --git a/fs_mgr/TEST_MAPPING b/fs_mgr/TEST_MAPPING
index 2b5e337..b6710d5 100644
--- a/fs_mgr/TEST_MAPPING
+++ b/fs_mgr/TEST_MAPPING
@@ -22,6 +22,12 @@
"name": "vts_libsnapshot_test"
},
{
+ "name": "vab_legacy_tests"
+ },
+ {
+ "name": "vabc_legacy_tests"
+ },
+ {
"name": "libsnapshot_fuzzer_test"
},
{
@@ -37,6 +43,12 @@
},
{
"name": "vts_libsnapshot_test"
+ },
+ {
+ "name": "vab_legacy_tests"
+ },
+ {
+ "name": "vabc_legacy_tests"
}
]
}
diff --git a/fs_mgr/libdm/dm_test.cpp b/fs_mgr/libdm/dm_test.cpp
index 4448d35..788cf51 100644
--- a/fs_mgr/libdm/dm_test.cpp
+++ b/fs_mgr/libdm/dm_test.cpp
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/utsname.h>
#include <time.h>
#include <unistd.h>
@@ -692,7 +693,17 @@
}
TEST(libdm, UeventAfterLoadTable) {
- static const char* kDeviceName = "libmd-test-uevent-load-table";
+ static const char* kDeviceName = "libdm-test-uevent-load-table";
+
+ struct utsname u;
+ ASSERT_EQ(uname(&u), 0);
+
+ unsigned int major, minor;
+ ASSERT_EQ(sscanf(u.release, "%u.%u", &major, &minor), 2);
+
+ if (major < 5 || (major == 5 && minor < 15)) {
+ GTEST_SKIP() << "Skipping test on kernel < 5.15";
+ }
DeviceMapper& dm = DeviceMapper::Instance();
ASSERT_TRUE(dm.CreateEmptyDevice(kDeviceName));
diff --git a/fs_mgr/libsnapshot/Android.bp b/fs_mgr/libsnapshot/Android.bp
index 2165961..c2f435f 100644
--- a/fs_mgr/libsnapshot/Android.bp
+++ b/fs_mgr/libsnapshot/Android.bp
@@ -269,14 +269,19 @@
defaults: ["libsnapshot_test_defaults", "libsnapshot_hal_deps"],
}
-sh_test {
- name: "run_snapshot_tests",
- src: "run_snapshot_tests.sh",
- test_suites: [
- "device-tests",
+cc_test {
+ name: "vab_legacy_tests",
+ defaults: ["libsnapshot_test_defaults", "libsnapshot_hal_deps"],
+ cppflags: [
+ "-DLIBSNAPSHOT_TEST_VAB_LEGACY",
],
- required: [
- "vts_libsnapshot_test",
+}
+
+cc_test {
+ name: "vabc_legacy_tests",
+ defaults: ["libsnapshot_test_defaults", "libsnapshot_hal_deps"],
+ cppflags: [
+ "-DLIBSNAPSHOT_TEST_VABC_LEGACY",
],
}
diff --git a/fs_mgr/libsnapshot/run_snapshot_tests.sh b/fs_mgr/libsnapshot/run_snapshot_tests.sh
deleted file mode 100644
index b03a4e0..0000000
--- a/fs_mgr/libsnapshot/run_snapshot_tests.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/system/bin/sh
-
-# Detect host or AOSP.
-getprop ro.build.version.sdk > /dev/null 2>&1
-if [ $? -eq 0 ]; then
- cmd_prefix=""
- local_root=""
-else
- cmd_prefix="adb shell"
- local_root="${ANDROID_PRODUCT_OUT}"
- set -e
- set -x
- adb root
- adb sync data
- set +x
- set +e
-fi
-
-testpath64="/data/nativetest64/vts_libsnapshot_test/vts_libsnapshot_test"
-testpath32="/data/nativetest/vts_libsnapshot_test/vts_libsnapshot_test"
-if [ -f "${local_root}/${testpath64}" ]; then
- testpath="${testpath64}"
-elif [ -f "${local_root}/${testpath32}" ]; then
- testpath="${testpath32}"
-else
- echo "ERROR: vts_libsnapshot_test not found." 1>&2
- echo "Make sure to build vts_libsnapshot_test or snapshot_tests first." 1>&2
- exit 1
-fi
-
-# Verbose, error on failure.
-set -x
-set -e
-
-time ${cmd_prefix} ${testpath}
diff --git a/fs_mgr/libsnapshot/snapshot_test.cpp b/fs_mgr/libsnapshot/snapshot_test.cpp
index 2c01cf6..4014380 100644
--- a/fs_mgr/libsnapshot/snapshot_test.cpp
+++ b/fs_mgr/libsnapshot/snapshot_test.cpp
@@ -53,7 +53,15 @@
#include <libsnapshot/mock_device_info.h>
#include <libsnapshot/mock_snapshot.h>
-DEFINE_string(force_mode, "",
+#if defined(LIBSNAPSHOT_TEST_VAB_LEGACY)
+#define DEFAULT_MODE "vab-legacy"
+#elif defined(LIBSNAPSHOT_TEST_VABC_LEGACY)
+#define DEFAULT_MODE "vabc-legacy"
+#else
+#define DEFAULT_MODE ""
+#endif
+
+DEFINE_string(force_mode, DEFAULT_MODE,
"Force testing older modes (vab-legacy, vabc-legacy) ignoring device config.");
DEFINE_string(force_iouring_disable, "",
"Force testing mode (iouring_disabled) - disable io_uring");
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index fe23b62..3dd269a 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -213,4 +213,15 @@
$(hide) $(foreach lib,$(PRIVATE_SANITIZER_RUNTIME_LIBRARIES), \
echo $(lib) >> $@;)
+#######################################
+# ramdisk_node_list
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := ramdisk_node_list
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)
+
+include $(BUILD_PREBUILT)
+
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/rootdir/ramdisk_node_list b/rootdir/ramdisk_node_list
new file mode 100644
index 0000000..d3ab8a6
--- /dev/null
+++ b/rootdir/ramdisk_node_list
@@ -0,0 +1,3 @@
+dir dev 0755 0 0
+nod dev/null 0600 0 0 c 1 3
+nod dev/console 0600 0 0 c 5 1
diff --git a/trusty/keymaster/TEST_MAPPING b/trusty/keymaster/TEST_MAPPING
index ae48327..0dd39fb 100644
--- a/trusty/keymaster/TEST_MAPPING
+++ b/trusty/keymaster/TEST_MAPPING
@@ -1,9 +1,6 @@
{
"presubmit": [
{
- "name": "RemoteProvisionerUnitTests"
- },
- {
"name": "VtsAidlKeyMintTargetTest"
},
{