[PATCH i-g-t 1/2] igt: Remove Android support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch gets rid of Android support, deleting all the hacks and
moving code around to the places it belong.

Android build is not really maintained properly and rots rather fast.
With recent push for Meson here and Android going for Soong it will only
accelerate.

It's a good time to drop the illusion of providing any support.

If there is someone who actually needs that, please step up and help us
with the maintenance.

Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxxx>
Cc: Kalyan Kondapally <kalyan.kondapally@xxxxxxxxx>
Cc: Petri Latvala <petri.latvala@xxxxxxxxx>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@xxxxxxxxx>
Cc: Rafael Barbalho <rafael.barbalho@xxxxxxxxx>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>

---
 Android.mk                   |  4 --
 assembler/ralloc.c           |  5 ---
 benchmarks/Android.mk        | 46 ---------------------
 benchmarks/gem_syslatency.c  |  2 -
 lib/Android.mk               | 53 ------------------------
 lib/drmtest.h                | 16 --------
 lib/igt_aux.c                | 95 --------------------------------------------
 lib/igt_aux.h                |  5 ---
 lib/igt_core.c               | 68 -------------------------------
 lib/igt_debugfs.c            | 25 +-----------
 lib/igt_fb.h                 |  7 ----
 lib/igt_kmod.h               |  4 --
 lib/igt_kms.c                | 89 +++++++++++++++++++++++++++++++++++++++++
 lib/tests/Android.mk         | 41 -------------------
 tests/Android.mk             | 83 --------------------------------------
 tests/core_get_client_auth.c |  4 +-
 tests/gem_exec_nop.c         |  4 --
 tools/Android.mk             | 82 --------------------------------------
 18 files changed, 91 insertions(+), 542 deletions(-)
 delete mode 100644 Android.mk
 delete mode 100644 benchmarks/Android.mk
 delete mode 100644 lib/Android.mk
 delete mode 100644 lib/tests/Android.mk
 delete mode 100644 tests/Android.mk
 delete mode 100644 tools/Android.mk

diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 3690fc5a..00000000
--- a/Android.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-HAVE_LIBDRM_INTEL := true
-
-include $(call all-named-subdir-makefiles, lib tests tools benchmarks)
-
diff --git a/assembler/ralloc.c b/assembler/ralloc.c
index 59e71c48..69c1da4d 100644
--- a/assembler/ralloc.c
+++ b/assembler/ralloc.c
@@ -28,11 +28,6 @@
 #include <string.h>
 #include <stdint.h>
 
-/* Android defines SIZE_MAX in limits.h, instead of the standard stdint.h */
-#ifdef ANDROID
-#include <limits.h>
-#endif
-
 /* Some versions of MinGW are missing _vscprintf's declaration, although they
  * still provide the symbol in the import library. */
 #ifdef __MINGW32__
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
deleted file mode 100644
index 4ea275c4..00000000
--- a/benchmarks/Android.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(LOCAL_PATH)/Makefile.sources
-IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
-
-#================#
-
-define add_benchmark
-    include $(CLEAR_VARS)
-
-    LOCAL_SRC_FILES := $1.c
-
-    LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES} \
-                       $(LOCAL_PATH)/../lib/stubs/drm/
-    LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
-    LOCAL_CFLAGS += -DANDROID -UNDEBUG -include "check-ndebug.h"
-    LOCAL_CFLAGS += -std=gnu99
-    # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
-    LOCAL_CFLAGS += -Wno-error=return-type
-    # Excessive complaining for established cases. Rely on the Linux version warnings.
-    LOCAL_CFLAGS += -Wno-sign-compare
-    LOCAL_LDFLAGS += -lkmod
-
-    LOCAL_MODULE := $1_benchmark
-    LOCAL_MODULE_TAGS := optional
-    LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt/benchmarks
-
-    LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
-
-    LOCAL_SHARED_LIBRARIES := libpciaccess  \
-                              libkmod       \
-                              libdrm        \
-                              libdrm_intel
-
-    include $(BUILD_EXECUTABLE)
-endef
-
-#================#
-
-benchmark_list := $(benchmarks_prog_list)
-
-ifeq ($(HAVE_LIBDRM_INTEL),true)
-    benchmark_list += $(LIBDRM_INTEL_BENCHMARKS)
-endif
-
-$(foreach item,$(benchmark_list),$(eval $(call add_benchmark,$(item))))
diff --git a/benchmarks/gem_syslatency.c b/benchmarks/gem_syslatency.c
index 4ed23638..994d31e0 100644
--- a/benchmarks/gem_syslatency.c
+++ b/benchmarks/gem_syslatency.c
@@ -183,7 +183,6 @@ static void *sys_wait(void *arg)
 static void bind_cpu(pthread_attr_t *attr, int cpu)
 {
 #ifdef __USE_GNU
-#ifndef ANDROID
 	cpu_set_t mask;
 
 	if (cpu == -1)
@@ -194,7 +193,6 @@ static void bind_cpu(pthread_attr_t *attr, int cpu)
 
 	pthread_attr_setaffinity_np(attr, sizeof(mask), &mask);
 #endif
-#endif
 }
 
 static void rtprio(pthread_attr_t *attr, int prio)
diff --git a/lib/Android.mk b/lib/Android.mk
deleted file mode 100644
index 31f88be7..00000000
--- a/lib/Android.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-GPU_TOOLS_PATH := $(LOCAL_PATH)/..
-IGT_LIB_PATH := $(LOCAL_PATH)
-
-# FIXME: autogenerate this info #
-$(GPU_TOOLS_PATH)/config.h:
-	@echo "updating config.h"
-	@echo '#define PACKAGE_VERSION "1.5"' >> $@ ; \
-	echo '#define TARGET_CPU_PLATFORM "android-ia"' >> $@ ;
-
-include $(LOCAL_PATH)/Makefile.sources
-
-include $(CLEAR_VARS)
-
-LOCAL_GENERATED_SOURCES :=       \
-	$(IGT_LIB_PATH)/version.h  \
-	$(GPU_TOOLS_PATH)/config.h
-
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/.. \
-                    $(LOCAL_PATH)/stubs/drm/
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
-
-LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES
-LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
-LOCAL_CFLAGS += -DANDROID -DHAVE_LINUX_KD_H
-LOCAL_CFLAGS += -std=gnu99 -UNDEBUG
-LOCAL_MODULE:= libintel_gpu_tools
-
-LOCAL_SHARED_LIBRARIES := libpciaccess  \
-			  libkmod       \
-			  libdrm        \
-			  libdrm_intel
-
-ifeq ("${ANDROID_HAS_CAIRO}", "1")
-    skip_lib_list :=
-    LOCAL_C_INCLUDES += $(ANDROID_BUILD_TOP)/external/cairo-1.12.16/src
-    LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=1 -DIGT_DATADIR=\".\" -DIGT_SRCDIR=\".\"
-else
-skip_lib_list := \
-    igt_kms.c \
-    igt_kms.h \
-    igt_fb.c
-    -DANDROID_HAS_CAIRO=0
-endif
-
-LOCAL_SRC_FILES := $(filter-out %.h $(skip_lib_list),$(lib_source_list))
-
-include $(BUILD_STATIC_LIBRARY)
-
-include $(call first-makefiles-under, $(LOCAL_PATH))
-
diff --git a/lib/drmtest.h b/lib/drmtest.h
index a86799d5..fdd34ec6 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -51,22 +51,6 @@
  */
 #define DRIVER_ANY 	~(DRIVER_VGEM)
 
-
-#ifdef ANDROID
-#if (!(defined HAVE_MMAP64)) && (!(defined __x86_64__))
-extern void*  __mmap2(void *, size_t, int, int, int, off_t);
-
-/* mmap64 is a recent addition to bionic and not available in all android builds. */
-/* I can find no reliable way to know if it is defined or not - so just avoid it */
-#define mmap64 igt_mmap64
-static inline void *igt_mmap64(void *addr, size_t length, int prot, int flags,
-        int fd, off64_t offset)
-{
-    return __mmap2(addr, length, prot, flags, fd, offset >> 12);
-}
-#endif
-#endif
-
 /**
  * ARRAY_SIZE:
  * @arr: static array
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index eb1f90f9..295e435c 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -1031,101 +1031,6 @@ void igt_debug_manual_check(const char *var, const char *expected)
 	igt_assert(key != 'n' && key != 'N');
 }
 
-/* Functions with prefix kmstest_ independent of cairo library are pulled out
- * from file igt_kms.c since this file is skipped in lib/Android.mk when flag
- * ANDROID_HAS_CAIRO is 0. This ensures the usability of these functions even
- * when cairo library is not present on Android.
- */
-
-struct type_name {
-	int type;
-	const char *name;
-};
-
-static const char *find_type_name(const struct type_name *names, int type)
-{
-	for (; names->name; names++) {
-		if (names->type == type)
-			return names->name;
-	}
-
-	return "(invalid)";
-}
-
-static const struct type_name encoder_type_names[] = {
-	{ DRM_MODE_ENCODER_NONE, "none" },
-	{ DRM_MODE_ENCODER_DAC, "DAC" },
-	{ DRM_MODE_ENCODER_TMDS, "TMDS" },
-	{ DRM_MODE_ENCODER_LVDS, "LVDS" },
-	{ DRM_MODE_ENCODER_TVDAC, "TVDAC" },
-	{ DRM_MODE_ENCODER_VIRTUAL, "Virtual" },
-	{ DRM_MODE_ENCODER_DSI, "DSI" },
-	{ DRM_MODE_ENCODER_DPMST, "DP MST" },
-	{}
-};
-
-/**
- * kmstest_encoder_type_str:
- * @type: DRM_MODE_ENCODER_* enumeration value
- *
- * Returns: A string representing the drm encoder @type.
- */
-const char *kmstest_encoder_type_str(int type)
-{
-	return find_type_name(encoder_type_names, type);
-}
-
-static const struct type_name connector_status_names[] = {
-	{ DRM_MODE_CONNECTED, "connected" },
-	{ DRM_MODE_DISCONNECTED, "disconnected" },
-	{ DRM_MODE_UNKNOWNCONNECTION, "unknown" },
-	{}
-};
-
-/**
- * kmstest_connector_status_str:
- * @status: DRM_MODE_* connector status value
- *
- * Returns: A string representing the drm connector status @status.
- */
-const char *kmstest_connector_status_str(int status)
-{
-	return find_type_name(connector_status_names, status);
-}
-
-static const struct type_name connector_type_names[] = {
-	{ DRM_MODE_CONNECTOR_Unknown, "Unknown" },
-	{ DRM_MODE_CONNECTOR_VGA, "VGA" },
-	{ DRM_MODE_CONNECTOR_DVII, "DVI-I" },
-	{ DRM_MODE_CONNECTOR_DVID, "DVI-D" },
-	{ DRM_MODE_CONNECTOR_DVIA, "DVI-A" },
-	{ DRM_MODE_CONNECTOR_Composite, "Composite" },
-	{ DRM_MODE_CONNECTOR_SVIDEO, "SVIDEO" },
-	{ DRM_MODE_CONNECTOR_LVDS, "LVDS" },
-	{ DRM_MODE_CONNECTOR_Component, "Component" },
-	{ DRM_MODE_CONNECTOR_9PinDIN, "DIN" },
-	{ DRM_MODE_CONNECTOR_DisplayPort, "DP" },
-	{ DRM_MODE_CONNECTOR_HDMIA, "HDMI-A" },
-	{ DRM_MODE_CONNECTOR_HDMIB, "HDMI-B" },
-	{ DRM_MODE_CONNECTOR_TV, "TV" },
-	{ DRM_MODE_CONNECTOR_eDP, "eDP" },
-	{ DRM_MODE_CONNECTOR_VIRTUAL, "Virtual" },
-	{ DRM_MODE_CONNECTOR_DSI, "DSI" },
-	{ DRM_MODE_CONNECTOR_DPI, "DPI" },
-	{}
-};
-
-/**
- * kmstest_connector_type_str:
- * @type: DRM_MODE_CONNECTOR_* enumeration value
- *
- * Returns: A string representing the drm connector @type.
- */
-const char *kmstest_connector_type_str(int type)
-{
-	return find_type_name(connector_type_names, type);
-}
-
 /**
  * igt_lock_mem:
  * @size: the amount of memory to lock into RAM, in MB
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 499a1679..8674b5af 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -43,12 +43,7 @@ extern int num_trash_bos;
 #define NSEC_PER_SEC (1000*USEC_PER_SEC)
 
 /* signal interrupt helpers */
-#ifdef ANDROID
-#include <unistd.h> /* on Android bionic has this implemented */
-#else
 #define gettid() syscall(__NR_gettid)
-#endif
-
 #define sigev_notify_thread_id _sigev_un._tid
 
 /* auxialiary igt helpers from igt_aux.c */
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 9f4ee68b..838aaacc 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -492,77 +492,10 @@ void __igt_fixture_end(void)
 	siglongjmp(igt_subtest_jmpbuf, 1);
 }
 
-/*
- * Some of the IGT tests put quite a lot of pressure on memory and when
- * running on Android they are sometimes killed by the Android low memory killer.
- * This seems to be due to some incompatibility between the kswapd free memory
- * targets and the way the lowmemorykiller assesses free memory.
- * The low memory killer really isn't usefull in this context and has no
- * interaction with the gpu driver that we are testing, so the following
- * function is used to disable it by modifying one of its module parameters.
- * We still have the normal linux oom killer to protect the kernel.
- * Apparently it is also possible for the lowmemorykiller to get included
- * in some linux distributions; so rather than check for Android we directly
- * check for the existence of the module parameter we want to adjust.
- *
- * In future, if we can get the lowmemorykiller to play nicely then we can
- * remove this hack.
- */
-static void low_mem_killer_disable(bool disable)
-{
-	static const char* adj_fname="/sys/module/lowmemorykiller/parameters/adj";
-	static const char no_lowmem_killer[] = "9999";
-	int fd;
-	struct stat buf;
-	/* The following must persist across invocations */
-	static char prev_adj_scores[256];
-	static int adj_scores_len = 0;
-	static bool is_disabled = false;
-
-	/* capture the permissions bits for the lowmemkiller adj pseudo-file.
-	 * Bail out if the stat fails; it probably means that there is no
-	 * lowmemorykiller, but in any case we're doomed. */
-	if (stat(adj_fname, &buf)) {
-		igt_assert(errno == ENOENT);
-		return;
-	}
-
-	/* make sure the file can be read/written - by default it is write-only */
-	chmod(adj_fname, S_IRUSR | S_IWUSR);
-
-	if (disable && !is_disabled) {
-		/* read the current oom adj parameters for lowmemorykiller */
-		fd = open(adj_fname, O_RDWR);
-		igt_assert(fd != -1);
-		adj_scores_len = read(fd, (void*)prev_adj_scores, 255);
-		igt_assert(adj_scores_len > 0);
-
-		/* writing 9999 to this module parameter effectively diables the
-		 * low memory killer. This is not a real file, so we dont need to
-		 * seek to the start or truncate it */
-		igt_assert_eq(write(fd, no_lowmem_killer, sizeof(no_lowmem_killer)),
-			      sizeof(no_lowmem_killer));
-		close(fd);
-		is_disabled = true;
-	} else if (is_disabled) {
-		/* just re-enstate the original settings */
-		fd = open(adj_fname, O_WRONLY);
-		igt_assert(fd != -1);
-		igt_assert_eq(write(fd, prev_adj_scores, adj_scores_len),
-			      adj_scores_len);
-		close(fd);
-		is_disabled = false;
-	}
-
-	/* re-enstate the file permissions */
-	chmod(adj_fname, buf.st_mode);
-}
-
 bool igt_exit_called;
 static void common_exit_handler(int sig)
 {
 	if (!igt_only_list_subtests()) {
-		low_mem_killer_disable(false);
 		kick_fbcon(true);
 	}
 
@@ -854,7 +787,6 @@ out:
 
 		sync();
 		oom_adjust_for_doom();
-		low_mem_killer_disable(true);
 	}
 
 	/* install exit handler, to ensure we clean up */
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 1e8c8cc3..515df401 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -1153,30 +1153,7 @@ int igt_get_stable_obj_count(int driver)
 	obj_count = get_object_count(driver);
 	/* The test relies on the system being in the same state before and
 	 * after the test so any difference in the object count is a result of
-	 * leaks during the test. gem_quiescent_gpu() mostly achieves this but
-	 * on android occasionally obj_count can still change briefly.
-	 * The loop ensures obj_count has remained stable over several checks
-	 */
-#ifdef ANDROID
-	{
-		int loop_count = 0;
-		int prev_obj_count = obj_count;
-		while (loop_count < 4) {
-			usleep(200000);
-			gem_quiescent_gpu(driver);
-			obj_count = get_object_count(driver);
-			if (obj_count == prev_obj_count) {
-				loop_count++;
-			} else {
-				igt_debug("loop_count=%d, obj_count=%d, prev_obj_count=%d\n",
-					loop_count, obj_count, prev_obj_count);
-				loop_count = 0;
-				prev_obj_count = obj_count;
-			}
-
-		}
-	}
-#endif
+	 * leaks during the test. */
 	return obj_count;
 }
 
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index a193a1e7..21c20a4e 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -28,14 +28,7 @@
 #ifndef __IGT_FB_H__
 #define __IGT_FB_H__
 
-/* cairo is assumed available on linux. On Android we check for ANDROID_HAS_CAIRO */
-#if (!defined(ANDROID)) || (defined(ANDROID) && ANDROID_HAS_CAIRO)
 #include <cairo.h>
-#else
-typedef struct _cairo_surface cairo_surface_t;
-typedef struct _cairo cairo_t;
-#endif
-
 #include <stddef.h>
 #include <stdbool.h>
 #include <drm_fourcc.h>
diff --git a/lib/igt_kmod.h b/lib/igt_kmod.h
index 6a7584f1..fd307a45 100644
--- a/lib/igt_kmod.h
+++ b/lib/igt_kmod.h
@@ -24,11 +24,7 @@
 #ifndef IGT_KMOD_H
 #define IGT_KMOD_H
 
-#ifdef ANDROID
-#include <libkmod/libkmod.h>
-#else
 #include <libkmod.h>
-#endif
 
 #include "igt_aux.h"
 
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7bcafc07..f698f7e0 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -374,6 +374,95 @@ const char *kmstest_plane_type_name(int plane_type)
 	return names[plane_type];
 }
 
+struct type_name {
+	int type;
+	const char *name;
+};
+
+static const char *find_type_name(const struct type_name *names, int type)
+{
+	for (; names->name; names++) {
+		if (names->type == type)
+			return names->name;
+	}
+
+	return "(invalid)";
+}
+
+static const struct type_name encoder_type_names[] = {
+	{ DRM_MODE_ENCODER_NONE, "none" },
+	{ DRM_MODE_ENCODER_DAC, "DAC" },
+	{ DRM_MODE_ENCODER_TMDS, "TMDS" },
+	{ DRM_MODE_ENCODER_LVDS, "LVDS" },
+	{ DRM_MODE_ENCODER_TVDAC, "TVDAC" },
+	{ DRM_MODE_ENCODER_VIRTUAL, "Virtual" },
+	{ DRM_MODE_ENCODER_DSI, "DSI" },
+	{ DRM_MODE_ENCODER_DPMST, "DP MST" },
+	{}
+};
+
+/**
+ * kmstest_encoder_type_str:
+ * @type: DRM_MODE_ENCODER_* enumeration value
+ *
+ * Returns: A string representing the drm encoder @type.
+ */
+const char *kmstest_encoder_type_str(int type)
+{
+	return find_type_name(encoder_type_names, type);
+}
+
+static const struct type_name connector_status_names[] = {
+	{ DRM_MODE_CONNECTED, "connected" },
+	{ DRM_MODE_DISCONNECTED, "disconnected" },
+	{ DRM_MODE_UNKNOWNCONNECTION, "unknown" },
+	{}
+};
+
+/**
+ * kmstest_connector_status_str:
+ * @status: DRM_MODE_* connector status value
+ *
+ * Returns: A string representing the drm connector status @status.
+ */
+const char *kmstest_connector_status_str(int status)
+{
+	return find_type_name(connector_status_names, status);
+}
+
+static const struct type_name connector_type_names[] = {
+	{ DRM_MODE_CONNECTOR_Unknown, "Unknown" },
+	{ DRM_MODE_CONNECTOR_VGA, "VGA" },
+	{ DRM_MODE_CONNECTOR_DVII, "DVI-I" },
+	{ DRM_MODE_CONNECTOR_DVID, "DVI-D" },
+	{ DRM_MODE_CONNECTOR_DVIA, "DVI-A" },
+	{ DRM_MODE_CONNECTOR_Composite, "Composite" },
+	{ DRM_MODE_CONNECTOR_SVIDEO, "SVIDEO" },
+	{ DRM_MODE_CONNECTOR_LVDS, "LVDS" },
+	{ DRM_MODE_CONNECTOR_Component, "Component" },
+	{ DRM_MODE_CONNECTOR_9PinDIN, "DIN" },
+	{ DRM_MODE_CONNECTOR_DisplayPort, "DP" },
+	{ DRM_MODE_CONNECTOR_HDMIA, "HDMI-A" },
+	{ DRM_MODE_CONNECTOR_HDMIB, "HDMI-B" },
+	{ DRM_MODE_CONNECTOR_TV, "TV" },
+	{ DRM_MODE_CONNECTOR_eDP, "eDP" },
+	{ DRM_MODE_CONNECTOR_VIRTUAL, "Virtual" },
+	{ DRM_MODE_CONNECTOR_DSI, "DSI" },
+	{ DRM_MODE_CONNECTOR_DPI, "DPI" },
+	{}
+};
+
+/**
+ * kmstest_connector_type_str:
+ * @type: DRM_MODE_CONNECTOR_* enumeration value
+ *
+ * Returns: A string representing the drm connector @type.
+ */
+const char *kmstest_connector_type_str(int type)
+{
+	return find_type_name(connector_type_names, type);
+}
+
 static const char *mode_stereo_name(const drmModeModeInfo *mode)
 {
 	switch (mode->flags & DRM_MODE_FLAG_3D_MASK) {
diff --git a/lib/tests/Android.mk b/lib/tests/Android.mk
deleted file mode 100644
index bbbd4d86..00000000
--- a/lib/tests/Android.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(LOCAL_PATH)/Makefile.sources
-
-#================#
-# each igt test is a separate executable. define a function to build one of these tests
-define add_test
-    include $(CLEAR_VARS)
-
-    # specific to this test
-    LOCAL_SRC_FILES := $1.c
-    LOCAL_MODULE := $1
-
-    # common to all tests
-    LOCAL_CFLAGS += ${IGT_LOCAL_CFLAGS}
-    LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES}
-    LOCAL_STATIC_LIBRARIES := ${IGT_LOCAL_STATIC_LIBRARIES}
-    LOCAL_SHARED_LIBRARIES := ${IGT_LOCAL_SHARED_LIBRARIES}
-
-    LOCAL_MODULE_TAGS := optional
-    LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt
-
-    include $(BUILD_EXECUTABLE)
-endef
-
-# set local compilation flags for IGT tests
-IGT_LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM -DANDROID -UNDEBUG
-IGT_LOCAL_CFLAGS += -std=gnu99
-# FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
-IGT_LOCAL_CFLAGS += -Wno-error=return-type
-
-# set local includes
-IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
-                       $(LOCAL_PATH)/../lib/stubs/drm/
-
-# set local libraries
-IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
-IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libdrm libdrm_intel
-
-$(foreach item,$($(check_prog_list)),$(eval $(call add_test,$(item))))
-
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index c6e966fa..00000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,83 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(LOCAL_PATH)/Makefile.sources
-
-#================#
-# each igt test is a separate executable. define a function to build one of these tests
-define add_test
-    include $(CLEAR_VARS)
-
-    # specific to this test
-    LOCAL_SRC_FILES := $1.c
-    LOCAL_MODULE := $1
-
-    # common to all tests
-    LOCAL_CFLAGS += ${IGT_LOCAL_CFLAGS}
-    LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES}
-    LOCAL_STATIC_LIBRARIES := ${IGT_LOCAL_STATIC_LIBRARIES}
-    LOCAL_SHARED_LIBRARIES := ${IGT_LOCAL_SHARED_LIBRARIES}
-
-    LOCAL_MODULE_TAGS := optional
-    # ask linker to define a specific symbol; we use this to identify IGT tests
-    LOCAL_LDFLAGS := -Wl,--defsym=$2=0 -lkmod
-    LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt
-
-    include $(BUILD_EXECUTABLE)
-endef
-
-
-# some tests still do not build under android
-skip_tests_list :=
-skip_tests_list += testdisplay        # needs glib.h
-skip_tests_list += pm_rpm
-
-# set local compilation flags for IGT tests
-IGT_LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM -DANDROID -UNDEBUG
-IGT_LOCAL_CFLAGS += -include "check-ndebug.h" -std=gnu99
-# FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
-IGT_LOCAL_CFLAGS += -Wno-error=return-type
-# Excessive complaining for established cases. Rely on the Linux version warnings.
-IGT_LOCAL_CFLAGS += -Wno-sign-compare
-
-# set local includes
-IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
-                       $(LOCAL_PATH)/../lib/stubs/drm/
-
-# set local libraries
-IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
-IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libkmod libdrm libdrm_intel
-
-# handle cairo requirements if it is enabled
-ifeq ("${ANDROID_HAS_CAIRO}", "1")
-    IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/cairo-1.12.16/src
-    IGT_LOCAL_SHARED_LIBRARIES += libcairo
-    IGT_LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=1
-else
-# the following tests depend on cairo, so skip them
-    skip_tests_list += \
-    gem_render_copy \
-    pm_lpsp \
-	drm_read \
-	gem_exec_blt \
-	perf \
-	prime_mmap_kms
-
-# All kms tests depend on cairo
-    tmp_list := $(foreach test_name, $(TESTS_progs),\
-        $(if $(findstring kms_,$(test_name)),$(test_name)))
-    skip_tests_list += $(tmp_list)
-
-    tmp_list := $(foreach test_name, $(TESTS_progs_M),\
-        $(if $(findstring kms_,$(test_name)),$(test_name)))
-    skip_tests_list += $(tmp_list)
-
-    IGT_LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=0
-endif
-
-# create two test lists, one for simple single tests, one for tests that have subtests
-tests_list   := $(filter-out $(skip_tests_list),$(TESTS_progs) $(HANG) $(TESTS_testsuite))
-tests_list_M := $(filter-out $(skip_tests_list),$(TESTS_progs_M))
-
-$(foreach item,$(tests_list),$(eval $(call add_test,$(item),"IGT_SINGLE_TEST")))
-$(foreach item,$(tests_list_M),$(eval $(call add_test,$(item),"IGT_MULTI_TEST")))
-
diff --git a/tests/core_get_client_auth.c b/tests/core_get_client_auth.c
index 676083d5..9c64699d 100644
--- a/tests/core_get_client_auth.c
+++ b/tests/core_get_client_auth.c
@@ -51,12 +51,10 @@ is_local_tid(pid_t tid)
 {
 #ifndef __linux__
 	return pthread_self() == tid;
-#elif !defined(ANDROID)
+#else
 	/* On Linux systems, drmGetClient() would return the thread ID
 	   instead of the actual process ID */
 	return syscall(SYS_gettid) == tid;
-#else
-	return gettid() == tid;
 #endif
 }
 
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index 62a53605..b073b5e3 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -139,7 +139,6 @@ stable_nop_on_ring(int fd, uint32_t handle, unsigned int engine,
 	return n;
 }
 
-#if !defined(ANDROID) || ANDROID_HAS_CAIRO
 #define assert_within_epsilon(x, ref, tolerance) \
         igt_assert_f((x) <= (1.0 + tolerance) * ref && \
                      (x) >= (1.0 - tolerance) * ref, \
@@ -184,7 +183,6 @@ static void headless(int fd, uint32_t handle)
 	/* check that the two execution speeds are roughly the same */
 	assert_within_epsilon(n_headless, n_display, 0.1f);
 }
-#endif
 
 static bool ignore_engine(int fd, unsigned engine)
 {
@@ -667,10 +665,8 @@ igt_main
 	igt_subtest("context-sequential")
 		sequential(device, handle, FORKED | CONTEXT, 150);
 
-#if !defined(ANDROID) || ANDROID_HAS_CAIRO
 	igt_subtest("headless")
 		headless(device, handle);
-#endif
 
 	igt_fixture {
 		igt_stop_hang_detector();
diff --git a/tools/Android.mk b/tools/Android.mk
deleted file mode 100644
index 96075c9d..00000000
--- a/tools/Android.mk
+++ /dev/null
@@ -1,82 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(LOCAL_PATH)/Makefile.sources
-
-LOCAL_TOOLS_DIR := intel/validation/core/igt/tools
-
-#================#
-
-define add_tool
-    include $(CLEAR_VARS)
-
-    ifeq ($($(1)_SOURCES),)
-        LOCAL_SRC_FILES := $1.c
-    else
-        LOCAL_SRC_FILES := $(filter-out %.h,$($(1)_SOURCES))
-    endif
-
-    LOCAL_CFLAGS += -DHAVE_TERMIOS_H
-    LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
-    LOCAL_CFLAGS += -DANDROID -UNDEBUG
-    LOCAL_CFLAGS += -std=gnu99
-    # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
-    LOCAL_CFLAGS += -Wno-error=return-type
-    # Excessive complaining for established cases. Rely on the Linux version warnings.
-    LOCAL_CFLAGS += -Wno-sign-compare
-    LOCAL_LDFLAGS += -lkmod
-    ifeq ($($(1)_LDFLAGS),)
-    else
-        LOCAL_LDFLAGS += $($(1)_LDFLAGS)
-    endif
-
-    LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
-                       $(LOCAL_PATH)/../lib/stubs/drm/
-
-    LOCAL_MODULE := $1_tool
-    LOCAL_MODULE_TAGS := optional
-
-    LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
-
-    LOCAL_SHARED_LIBRARIES := libpciaccess  \
-                              libkmod       \
-                              libdrm        \
-                              libdrm_intel \
-                              libz
-
-    # Tools dir on host
-    LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)
-    # Tools dir on target.
-    LOCAL_CFLAGS += -DPKGDATADIR=\"/system/vendor/$(LOCAL_TOOLS_DIR)\"
-
-    include $(BUILD_EXECUTABLE)
-endef
-
-#================#
-
-# Copy the register files
-$(shell mkdir -p $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)/registers)
-$(shell cp $(LOCAL_PATH)/registers/* $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)/registers)
-
-bin_PROGRAMS := $(tools_prog_lists)
-
-skip_tools_list := \
-    intel_framebuffer_dump \
-    intel_guc_logger \
-    intel_l3_parity \
-    intel_reg_dumper \
-    intel_vga_read \
-    intel_vga_write
-
-ifneq ("${ANDROID_HAS_CAIRO}", "1")
-    skip_tools_list += intel_display_crc
-    skip_tools_list += intel_residency
-endif
-
-ifeq ($(HAVE_LIBDRM_INTEL),true)
-    bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
-    intel_error_decode_LDFLAGS = -lz
-endif
-
-tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS))
-
-$(foreach item,$(tools_list),$(eval $(call add_tool,$(item))))
-- 
2.13.5

PS. I'll let the patch to float on the mailing list for a week or so before
merging it, but if we would find someone to do the work post-merge, I'll be
happy to revert it.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux