* [PATCH i-g-t 00/13] Fix IGTs for Android
@ 2017-04-19 11:01 Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 01/13] tests/drm_import_export: Include {i915_, }drm.h properly Arkadiusz Hiler
` (12 more replies)
0 siblings, 13 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
IGTs are broken for Android since the introduction of dependency on procps. Over
time other incompatibilities built up.
I took the liberty to fix some of the issues, workaround couple of others and
blacklist heavily incompatible tools/tests.
It builds on (almost) vanilla AOSP now.
Github: <https://github.com/ivyl/igt/commits/android>
Howto: <https://gist.github.com/ivyl/1e05af15ae37b575e03dc69e5e2488fc>
DEP1: <https://github.com/ivyl/libkmod-android>
DEP2: <https://github.com/android-ia/external_libpciaccess>
We should include a note on Android compatibility in the README and do
"continuous compilation" of the patches as they arrive on the mailing list,
otherwise this **will get broken again soon**.
This is long as it is, but not complete yet.
Here are some of more obvious TODOs:
* introduce something like IGT_HAS_CAIRO define for convenience
* revise igt_kms dependency on cairo and enable everything what is independent
* revise kms tests and do the above
* review all things that are disabled on Android and try to enable them
* do something less ugly with config.h generation on Android
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Robert Foss <robert.foss@collabora.com>
Arkadiusz Hiler (13):
tests/drm_import_export: Include {i915_,}drm.h properly
Make conditions on HAVE_UDEV consistent
lib/igt_aux: Include unistd.h for gettid() on Android
lib/igt_aux: Make procps optional
chamelium: Fix build issues on Android
tools/Android.mk: Add guc_logger and l3_parity skip list
tests/Android.mk: Add perf to skip list
benchmarks/Android.mk: Add gem_latency to skip list
Android.mk: Fix libkmod use
Android.mk: Filter out *.h from src files
Android.mk: Use drm stubs
tools/Android.mk: Fix zlib inclusion
tests/gem_exec_nop: Disable headless subtest on cairoless Android
benchmarks/Android.mk | 9 +++++++--
configure.ac | 6 +++++-
demos/Android.mk | 3 ++-
lib/Android.mk | 8 +++++---
lib/Makefile.am | 7 +++++++
lib/Makefile.sources | 7 -------
lib/igt.h | 2 ++
lib/igt_aux.c | 26 ++++++++++++++++++++++----
lib/igt_aux.h | 5 +++++
lib/igt_chamelium.h | 3 +++
lib/igt_kmod.h | 4 ++++
lib/tests/Android.mk | 4 ++--
tests/Android.mk | 9 +++++----
tests/Makefile.am | 6 ++++++
tests/Makefile.sources | 6 ------
tests/drm_import_export.c | 4 ++--
tests/gem_exec_nop.c | 4 ++++
tests/testdisplay_hotplug.c | 2 +-
tools/Android.mk | 14 +++++++++-----
tools/intel_l3_parity.c | 2 +-
tools/intel_l3_parity.h | 2 +-
tools/intel_l3_udev_listener.c | 2 +-
22 files changed, 94 insertions(+), 41 deletions(-)
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH i-g-t 01/13] tests/drm_import_export: Include {i915_, }drm.h properly
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 02/13] Make conditions on HAVE_UDEV consistent Arkadiusz Hiler
` (11 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
Using `libdrm/` impairs compatibility with android build system and
pkg-config manages -I for us on regular distros.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
tests/drm_import_export.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/drm_import_export.c b/tests/drm_import_export.c
index cfe5f6d..f1234bd 100644
--- a/tests/drm_import_export.c
+++ b/tests/drm_import_export.c
@@ -32,8 +32,8 @@
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
-#include <libdrm/drm.h>
-#include <libdrm/i915_drm.h>
+#include <drm.h>
+#include <i915_drm.h>
#include <xf86drm.h>
#include <intel_bufmgr.h>
#include <errno.h>
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 02/13] Make conditions on HAVE_UDEV consistent
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 01/13] tests/drm_import_export: Include {i915_, }drm.h properly Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android Arkadiusz Hiler
` (10 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
We have a lot of `#ifdef HAVE_UDEV` and ` #if HAVE_UDEV` all over the
place, but ifdef and if have a slightly different semantics.
Let make it consistent by using #ifdefs only.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
lib/igt_aux.c | 2 +-
tests/testdisplay_hotplug.c | 2 +-
tools/intel_l3_parity.c | 2 +-
tools/intel_l3_parity.h | 2 +-
tools/intel_l3_udev_listener.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 1222806..2ec6b78 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -388,7 +388,7 @@ void igt_stop_shrink_helper(void)
igt_stop_helper(&shrink_helper);
}
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
#include <libudev.h>
static struct igt_helper_process hang_detector;
diff --git a/tests/testdisplay_hotplug.c b/tests/testdisplay_hotplug.c
index 3b900ca..cf15511 100644
--- a/tests/testdisplay_hotplug.c
+++ b/tests/testdisplay_hotplug.c
@@ -34,7 +34,7 @@
#endif
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
#include <libudev.h>
static struct udev_monitor *uevent_monitor;
static struct udev *udev;
diff --git a/tools/intel_l3_parity.c b/tools/intel_l3_parity.c
index dce7f32..eb00c50 100644
--- a/tools/intel_l3_parity.c
+++ b/tools/intel_l3_parity.c
@@ -42,7 +42,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
#include <libudev.h>
#include <syslog.h>
#endif
diff --git a/tools/intel_l3_parity.h b/tools/intel_l3_parity.h
index 65697c4..759c4f4 100644
--- a/tools/intel_l3_parity.h
+++ b/tools/intel_l3_parity.h
@@ -18,7 +18,7 @@ struct l3_location {
uint8_t subbank;
};
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
int l3_uevent_setup(struct l3_parity *par);
/* Listens (blocks) for an l3 parity event. Returns the location of the error. */
int l3_listen(struct l3_parity *par, bool daemon, struct l3_location *loc);
diff --git a/tools/intel_l3_udev_listener.c b/tools/intel_l3_udev_listener.c
index 0b94c1c..270bfff 100644
--- a/tools/intel_l3_udev_listener.c
+++ b/tools/intel_l3_udev_listener.c
@@ -25,7 +25,7 @@
#include "config.h"
#endif
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
#include <libudev.h>
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 01/13] tests/drm_import_export: Include {i915_, }drm.h properly Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 02/13] Make conditions on HAVE_UDEV consistent Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 12:22 ` Jani Nikula
2017-04-19 11:01 ` [PATCH i-g-t 04/13] lib/igt_aux: Make procps optional Arkadiusz Hiler
` (9 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
We define gettid() using syscall() because glibc does not provide a
wrapper.
Android's bionic got the syscall covered though.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
lib/igt_aux.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index e62858e..54b9716 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -43,7 +43,12 @@ 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 */
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 04/13] lib/igt_aux: Make procps optional
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (2 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 12:24 ` Jani Nikula
2017-04-19 11:01 ` [PATCH i-g-t 05/13] chamelium: Fix build issues on Android Arkadiusz Hiler
` (8 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
Android does not have procps and it's not easy to compile it as a
dependency.
We can provide alternative, "naive" implementation that just shells out
to external commands (i.e. pkill and lsof) in case we do not have the
library.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
configure.ac | 6 +++++-
lib/igt_aux.c | 24 +++++++++++++++++++++---
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 12b0ab0..a5a92d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,11 @@ AC_SUBST(ASSEMBLER_WARN_CFLAGS)
PKG_CHECK_MODULES(DRM, [libdrm])
PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
PKG_CHECK_MODULES(KMOD, [libkmod])
-PKG_CHECK_MODULES(PROCPS, [libprocps])
+PKG_CHECK_MODULES(PROCPS, [libprocps], [procps=yes], [procps=no])
+AM_CONDITIONAL(HAVE_PROCPS, [test "x$procps" = xyes])
+if test x"$procps" = xyes; then
+ AC_DEFINE(HAVE_PROCPS,1,[Enable process managment without shelling out])
+fi
PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
if test x$have_valgrind = xyes; then
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 2ec6b78..4efb45b 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -50,9 +50,7 @@
#include <sys/utsname.h>
#include <termios.h>
#include <assert.h>
-
-#include <proc/readproc.h>
-
+#include <linux/limits.h>
#include "drmtest.h"
#include "i915_drm.h"
#include "intel_chipset.h"
@@ -71,6 +69,10 @@
#include <libgen.h> /* for dirname() */
#endif
+#ifdef HAVE_PROCPS
+#include <proc/readproc.h>
+#endif
+
/**
* SECTION:igt_aux
* @short_description: Auxiliary libraries and support functions
@@ -1295,6 +1297,7 @@ void igt_set_module_param_int(const char *name, int val)
*/
int igt_terminate_process(int sig, const char *comm)
{
+#ifdef HAVE_PROCPS
PROCTAB *proc;
proc_t *proc_info;
int err = 0;
@@ -1316,6 +1319,12 @@ int igt_terminate_process(int sig, const char *comm)
closeproc(proc);
return err;
+#else
+#warning "No procps, using naive implementation of igt_terminate_process"
+ char pkill_cmd[NAME_MAX];
+ snprintf(pkill_cmd, sizeof(pkill_cmd), "pkill -x -%d %s", sig, comm);
+ return system(pkill_cmd);
+#endif
}
struct pinfo {
@@ -1324,6 +1333,7 @@ struct pinfo {
const char *fn;
};
+#ifdef HAVE_PROCPS
static void
__igt_show_stat(struct pinfo *info)
{
@@ -1499,6 +1509,7 @@ __igt_lsof(const char *dir)
closeproc(proc);
}
+#endif
/**
* igt_lsof: Lists information about files opened by processes.
@@ -1510,6 +1521,7 @@ __igt_lsof(const char *dir)
void
igt_lsof(const char *dpath)
{
+#ifdef HAVE_PROCPS
struct stat st;
size_t len = strlen(dpath);
char *sanitized;
@@ -1530,6 +1542,12 @@ igt_lsof(const char *dpath)
__igt_lsof(sanitized);
free(sanitized);
+#else
+#warning "No procps, using naive implementation of igt_lsof"
+ char lsof_cmd[NAME_MAX];
+ snprintf(lsof_cmd, sizeof(lsof_cmd), "lsof +d %s", dpath);
+ system(lsof_cmd);
+#endif
}
static struct igt_siglatency {
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 05/13] chamelium: Fix build issues on Android
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (3 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 04/13] lib/igt_aux: Make procps optional Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-05-02 9:53 ` Petri Latvala
2017-04-19 11:01 ` [PATCH i-g-t 06/13] tools/Android.mk: Add guc_logger and l3_parity skip list Arkadiusz Hiler
` (7 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
Makefile.sources are included 1:1 in Android.mk files, and are not
parsed by automake. And yet those had some automake conditional logic.
Moving it to .am file is enough for now.
Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H"
guard, and the file itself was included unconditionally.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
lib/Makefile.am | 7 +++++++
lib/Makefile.sources | 7 -------
lib/igt.h | 2 ++
lib/igt_chamelium.h | 3 +++
tests/Makefile.am | 6 ++++++
tests/Makefile.sources | 6 ------
6 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index c0ddf29..91e72c4 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -22,6 +22,13 @@ if !HAVE_LIBDRM_INTEL
stubs/drm/intel_bufmgr.h
endif
+if HAVE_CHAMELIUM
+lib_source_list += \
+ igt_chamelium.h \
+ igt_chamelium.c \
+ $(NULL)
+endif
+
AM_CPPFLAGS = -I$(top_srcdir)
AM_CFLAGS = \
$(CWARNFLAGS) \
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 6348487..53fdb54 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -85,13 +85,6 @@ lib_source_list = \
igt_kmod.h \
$(NULL)
-if HAVE_CHAMELIUM
-lib_source_list += \
- igt_chamelium.h \
- igt_chamelium.c \
- $(NULL)
-endif
-
.PHONY: version.h.tmp
# leaving a space here to work around automake's conditionals
diff --git a/lib/igt.h b/lib/igt.h
index a97923e..a069deb 100644
--- a/lib/igt.h
+++ b/lib/igt.h
@@ -38,7 +38,9 @@
#include "igt_kms.h"
#include "igt_pm.h"
#include "igt_stats.h"
+#ifdef HAVE_CHAMELIUM
#include "igt_chamelium.h"
+#endif
#include "instdone.h"
#include "intel_batchbuffer.h"
#include "intel_chipset.h"
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index f421d83..15f6024 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -26,7 +26,10 @@
#ifndef IGT_CHAMELIUM_H
#define IGT_CHAMELIUM_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
#include "igt.h"
#include <stdbool.h>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8930c24..f2358d5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,6 +8,12 @@ if HAVE_LIBDRM_VC4
TESTS_progs_M += $(VC4_TESTS_M)
endif
+if HAVE_CHAMELIUM
+TESTS_progs_M += \
+ chamelium \
+ $(NULL)
+endif
+
if BUILD_TESTS
test-list.txt: Makefile.sources
@echo TESTLIST > $@
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 7fa9b8f..3f10cd2 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -146,12 +146,6 @@ TESTS_progs_M = \
meta_test \
$(NULL)
-if HAVE_CHAMELIUM
-TESTS_progs_M += \
- chamelium \
- $(NULL)
-endif
-
TESTS_progs_XM = \
gem_concurrent_all \
$(NULL)
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 06/13] tools/Android.mk: Add guc_logger and l3_parity skip list
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (4 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 05/13] chamelium: Fix build issues on Android Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 07/13] tests/Android.mk: Add perf to " Arkadiusz Hiler
` (6 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
Those tools does not build on Android due to "Linux-only" dependencies.
Let's blacklist them for now.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
tools/Android.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/Android.mk b/tools/Android.mk
index 6cdedeb..0602e8c 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -59,6 +59,8 @@ 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
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 07/13] tests/Android.mk: Add perf to skip list
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (5 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 06/13] tools/Android.mk: Add guc_logger and l3_parity skip list Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 08/13] benchmarks/Android.mk: Add gem_latency " Arkadiusz Hiler
` (5 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
It does not build on Android with top libdrm.
Temporary hax.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
tests/Android.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/Android.mk b/tests/Android.mk
index 3186a2a..c67ddbd 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -59,6 +59,7 @@ else
pm_lpsp \
drm_read \
gem_exec_blt \
+ perf \
prime_mmap_kms
# All kms tests depend on cairo
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 08/13] benchmarks/Android.mk: Add gem_latency to skip list
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (6 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 07/13] tests/Android.mk: Add perf to " Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 16:58 ` Chris Wilson
2017-04-19 11:01 ` [PATCH i-g-t 09/13] Android.mk: Fix libkmod use Arkadiusz Hiler
` (4 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
AOSP, as of this commit, does not include libdrm with fence defines.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
benchmarks/Android.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index c0fa09f..a790ec7 100644
--- a/benchmarks/Android.mk
+++ b/benchmarks/Android.mk
@@ -34,7 +34,9 @@ endef
#================#
-benchmark_list := $(benchmarks_prog_list)
+skip_benchmark_list = gem_latency
+
+benchmark_list := $(filter-out $(skip_benchmark_list),$(benchmarks_prog_list))
ifeq ($(HAVE_LIBDRM_INTEL),true)
benchmark_list += $(LIBDRM_INTEL_BENCHMARKS)
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 09/13] Android.mk: Fix libkmod use
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (7 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 08/13] benchmarks/Android.mk: Add gem_latency " Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 10/13] Android.mk: Filter out *.h from src files Arkadiusz Hiler
` (3 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
On Android libkmod.h is nested under libkmod directory, so we should
include appropriately.
Also we need to link with it.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
benchmarks/Android.mk | 2 ++
lib/Android.mk | 1 +
lib/igt_kmod.h | 4 ++++
tests/Android.mk | 4 ++--
tools/Android.mk | 2 ++
5 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index a790ec7..fa9eec6 100644
--- a/benchmarks/Android.mk
+++ b/benchmarks/Android.mk
@@ -18,6 +18,7 @@ define add_benchmark
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
@@ -26,6 +27,7 @@ define add_benchmark
LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
LOCAL_SHARED_LIBRARIES := libpciaccess \
+ libkmod \
libdrm \
libdrm_intel
diff --git a/lib/Android.mk b/lib/Android.mk
index eb72f84..0596e4a 100644
--- a/lib/Android.mk
+++ b/lib/Android.mk
@@ -29,6 +29,7 @@ LOCAL_CFLAGS += -std=gnu99 -UNDEBUG
LOCAL_MODULE:= libintel_gpu_tools
LOCAL_SHARED_LIBRARIES := libpciaccess \
+ libkmod \
libdrm \
libdrm_intel
diff --git a/lib/igt_kmod.h b/lib/igt_kmod.h
index fd307a4..6a7584f 100644
--- a/lib/igt_kmod.h
+++ b/lib/igt_kmod.h
@@ -24,7 +24,11 @@
#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/tests/Android.mk b/tests/Android.mk
index c67ddbd..b664dff 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -19,7 +19,7 @@ define add_test
LOCAL_MODULE_TAGS := optional
# ask linker to define a specific symbol; we use this to identify IGT tests
- LOCAL_LDFLAGS := -Wl,--defsym=$2=0
+ LOCAL_LDFLAGS := -Wl,--defsym=$2=0 -lkmod
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt
include $(BUILD_EXECUTABLE)
@@ -45,7 +45,7 @@ IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
# set local libraries
IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
-IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libdrm libdrm_intel
+IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libkmod libdrm libdrm_intel
# handle cairo requirements if it is enabled
ifeq ("${ANDROID_HAS_CAIRO}", "1")
diff --git a/tools/Android.mk b/tools/Android.mk
index 0602e8c..a8e649b 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -23,6 +23,7 @@ define add_tool
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)
@@ -38,6 +39,7 @@ define add_tool
LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
LOCAL_SHARED_LIBRARIES := libpciaccess \
+ libkmod \
libdrm \
libdrm_intel
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 10/13] Android.mk: Filter out *.h from src files
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (8 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 09/13] Android.mk: Fix libkmod use Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 11/13] Android.mk: Use drm stubs Arkadiusz Hiler
` (2 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
Newer Android's build system complains about unused files if we leave
those there.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
lib/Android.mk | 2 +-
tools/Android.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Android.mk b/lib/Android.mk
index 0596e4a..003ade5 100644
--- a/lib/Android.mk
+++ b/lib/Android.mk
@@ -45,7 +45,7 @@ skip_lib_list := \
-DANDROID_HAS_CAIRO=0
endif
-LOCAL_SRC_FILES := $(filter-out $(skip_lib_list),$(lib_source_list))
+LOCAL_SRC_FILES := $(filter-out %.h $(skip_lib_list),$(lib_source_list))
include $(BUILD_STATIC_LIBRARY)
diff --git a/tools/Android.mk b/tools/Android.mk
index a8e649b..0bad29c 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -12,7 +12,7 @@ define add_tool
ifeq ($($(1)_SOURCES),)
LOCAL_SRC_FILES := $1.c
else
- LOCAL_SRC_FILES := $($(1)_SOURCES)
+ LOCAL_SRC_FILES := $(filter-out %.h,$($(1)_SOURCES))
endif
LOCAL_CFLAGS += -DHAVE_TERMIOS_H
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 11/13] Android.mk: Use drm stubs
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (9 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 10/13] Android.mk: Filter out *.h from src files Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 12/13] tools/Android.mk: Fix zlib inclusion Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 13/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android Arkadiusz Hiler
12 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
Use drm stubs that sit under lib/stubs.
Also drop strange, nonexistent additions to LOCAL_C_INCLUDES.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
benchmarks/Android.mk | 3 ++-
demos/Android.mk | 3 ++-
lib/Android.mk | 4 ++--
lib/tests/Android.mk | 4 ++--
tests/Android.mk | 4 ++--
tools/Android.mk | 2 +-
6 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index fa9eec6..a4f1858 100644
--- a/benchmarks/Android.mk
+++ b/benchmarks/Android.mk
@@ -10,7 +10,8 @@ define add_benchmark
LOCAL_SRC_FILES := $1.c
- LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES}
+ 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
diff --git a/demos/Android.mk b/demos/Android.mk
index 90d8b37..1f50fdc 100644
--- a/demos/Android.mk
+++ b/demos/Android.mk
@@ -16,7 +16,8 @@ LOCAL_CFLAGS += -std=gnu99
# Excessive complaining for established cases. Rely on the Linux version warnings.
LOCAL_CFLAGS += -Wno-sign-compare
-LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
+LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
+ $(LOCAL_PATH)/../lib/stubs/drm/
LOCAL_MODULE := intel_sprite_on
diff --git a/lib/Android.mk b/lib/Android.mk
index 003ade5..31f88be 100644
--- a/lib/Android.mk
+++ b/lib/Android.mk
@@ -17,8 +17,8 @@ LOCAL_GENERATED_SOURCES := \
$(IGT_LIB_PATH)/version.h \
$(GPU_TOOLS_PATH)/config.h
-LOCAL_C_INCLUDES += \
- $(LOCAL_PATH)/..
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/.. \
+ $(LOCAL_PATH)/stubs/drm/
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
diff --git a/lib/tests/Android.mk b/lib/tests/Android.mk
index 026f17f..bbbd4d8 100644
--- a/lib/tests/Android.mk
+++ b/lib/tests/Android.mk
@@ -30,8 +30,8 @@ IGT_LOCAL_CFLAGS += -std=gnu99
IGT_LOCAL_CFLAGS += -Wno-error=return-type
# set local includes
-IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
-IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
+IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
+ $(LOCAL_PATH)/../lib/stubs/drm/
# set local libraries
IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
diff --git a/tests/Android.mk b/tests/Android.mk
index b664dff..c6e966f 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -40,8 +40,8 @@ IGT_LOCAL_CFLAGS += -Wno-error=return-type
IGT_LOCAL_CFLAGS += -Wno-sign-compare
# set local includes
-IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
-IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
+IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
+ $(LOCAL_PATH)/../lib/stubs/drm/
# set local libraries
IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
diff --git a/tools/Android.mk b/tools/Android.mk
index 0bad29c..5653572 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -30,7 +30,7 @@ define add_tool
endif
LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
- LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
+ LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lib/stubs/drm/
LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/zlib
LOCAL_MODULE := $1_tool
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 12/13] tools/Android.mk: Fix zlib inclusion
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (10 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 11/13] Android.mk: Use drm stubs Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 13/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android Arkadiusz Hiler
12 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
Add dependency on libz instead of doing path magic.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
tools/Android.mk | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/Android.mk b/tools/Android.mk
index 5653572..96075c9 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -29,9 +29,8 @@ define add_tool
LOCAL_LDFLAGS += $($(1)_LDFLAGS)
endif
- LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
- LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lib/stubs/drm/
- LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/zlib
+ LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
+ $(LOCAL_PATH)/../lib/stubs/drm/
LOCAL_MODULE := $1_tool
LOCAL_MODULE_TAGS := optional
@@ -41,7 +40,8 @@ define add_tool
LOCAL_SHARED_LIBRARIES := libpciaccess \
libkmod \
libdrm \
- libdrm_intel
+ libdrm_intel \
+ libz
# Tools dir on host
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH i-g-t 13/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
` (11 preceding siblings ...)
2017-04-19 11:01 ` [PATCH i-g-t 12/13] tools/Android.mk: Fix zlib inclusion Arkadiusz Hiler
@ 2017-04-19 11:01 ` Arkadiusz Hiler
2017-05-04 8:00 ` Petri Latvala
12 siblings, 1 reply; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 11:01 UTC (permalink / raw)
To: intel-gfx
Currently whole igt_kms.c is disabled while compiling on Android without
cairo, so this tests does not compile.
There should be cleaner a way to disable only cairo dependant parts
which should allow us to enable at least some of the KMS tests, but
that's a bigger rework for another time.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
lib/Android.mk | 1 +
tests/gem_exec_nop.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/lib/Android.mk b/lib/Android.mk
index 31f88be..dc538b8 100644
--- a/lib/Android.mk
+++ b/lib/Android.mk
@@ -38,6 +38,7 @@ ifeq ("${ANDROID_HAS_CAIRO}", "1")
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 \
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index 66c2fc1..967caef 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -138,6 +138,7 @@ stable_nop_on_ring(int fd, uint32_t handle, unsigned int engine,
return n;
}
+#if (!defined(ANDROID)) || (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, \
@@ -178,6 +179,7 @@ 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)
{
@@ -561,8 +563,10 @@ igt_main
igt_subtest("context-sequential")
sequential(device, handle, FORKED | CONTEXT, 150);
+#if (!defined(ANDROID)) || (defined(ANDROID) && ANDROID_HAS_CAIRO)
igt_subtest("headless")
headless(device, handle);
+#endif
igt_fixture {
igt_stop_hang_detector();
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android
2017-04-19 11:01 ` [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android Arkadiusz Hiler
@ 2017-04-19 12:22 ` Jani Nikula
2017-04-19 14:02 ` Arkadiusz Hiler
0 siblings, 1 reply; 26+ messages in thread
From: Jani Nikula @ 2017-04-19 12:22 UTC (permalink / raw)
To: Arkadiusz Hiler, intel-gfx
On Wed, 19 Apr 2017, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> We define gettid() using syscall() because glibc does not provide a
> wrapper.
>
> Android's bionic got the syscall covered though.
>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> ---
> lib/igt_aux.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/igt_aux.h b/lib/igt_aux.h
> index e62858e..54b9716 100644
> --- a/lib/igt_aux.h
> +++ b/lib/igt_aux.h
> @@ -43,7 +43,12 @@ extern int num_trash_bos;
> #define NSEC_PER_SEC (1000*USEC_PER_SEC)
>
> /* signal interrupt helpers */
> +#ifdef ANDROID
Seems like this should be something like HAVE_GETTID, defined by
configure or by android makefiles?
BR,
Jani.
> +#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 */
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 04/13] lib/igt_aux: Make procps optional
2017-04-19 11:01 ` [PATCH i-g-t 04/13] lib/igt_aux: Make procps optional Arkadiusz Hiler
@ 2017-04-19 12:24 ` Jani Nikula
2017-04-19 13:29 ` [PATCH i-g-t v2] " Arkadiusz Hiler
0 siblings, 1 reply; 26+ messages in thread
From: Jani Nikula @ 2017-04-19 12:24 UTC (permalink / raw)
To: Arkadiusz Hiler, intel-gfx
On Wed, 19 Apr 2017, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> Android does not have procps and it's not easy to compile it as a
> dependency.
>
> We can provide alternative, "naive" implementation that just shells out
> to external commands (i.e. pkill and lsof) in case we do not have the
> library.
>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> ---
> configure.ac | 6 +++++-
> lib/igt_aux.c | 24 +++++++++++++++++++++---
> 2 files changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 12b0ab0..a5a92d5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -123,7 +123,11 @@ AC_SUBST(ASSEMBLER_WARN_CFLAGS)
> PKG_CHECK_MODULES(DRM, [libdrm])
> PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
> PKG_CHECK_MODULES(KMOD, [libkmod])
> -PKG_CHECK_MODULES(PROCPS, [libprocps])
> +PKG_CHECK_MODULES(PROCPS, [libprocps], [procps=yes], [procps=no])
> +AM_CONDITIONAL(HAVE_PROCPS, [test "x$procps" = xyes])
> +if test x"$procps" = xyes; then
> + AC_DEFINE(HAVE_PROCPS,1,[Enable process managment without shelling out])
> +fi
> PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
>
> if test x$have_valgrind = xyes; then
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 2ec6b78..4efb45b 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -50,9 +50,7 @@
> #include <sys/utsname.h>
> #include <termios.h>
> #include <assert.h>
> -
> -#include <proc/readproc.h>
> -
> +#include <linux/limits.h>
> #include "drmtest.h"
> #include "i915_drm.h"
> #include "intel_chipset.h"
> @@ -71,6 +69,10 @@
> #include <libgen.h> /* for dirname() */
> #endif
>
> +#ifdef HAVE_PROCPS
> +#include <proc/readproc.h>
> +#endif
> +
> /**
> * SECTION:igt_aux
> * @short_description: Auxiliary libraries and support functions
> @@ -1295,6 +1297,7 @@ void igt_set_module_param_int(const char *name, int val)
> */
> int igt_terminate_process(int sig, const char *comm)
> {
> +#ifdef HAVE_PROCPS
Please move ifdefs *outside* the functions, and add another function for
the !HAVE_PROCPS branch.
Same below.
BR,
Jani.
> PROCTAB *proc;
> proc_t *proc_info;
> int err = 0;
> @@ -1316,6 +1319,12 @@ int igt_terminate_process(int sig, const char *comm)
>
> closeproc(proc);
> return err;
> +#else
> +#warning "No procps, using naive implementation of igt_terminate_process"
> + char pkill_cmd[NAME_MAX];
> + snprintf(pkill_cmd, sizeof(pkill_cmd), "pkill -x -%d %s", sig, comm);
> + return system(pkill_cmd);
> +#endif
> }
>
> struct pinfo {
> @@ -1324,6 +1333,7 @@ struct pinfo {
> const char *fn;
> };
>
> +#ifdef HAVE_PROCPS
> static void
> __igt_show_stat(struct pinfo *info)
> {
> @@ -1499,6 +1509,7 @@ __igt_lsof(const char *dir)
>
> closeproc(proc);
> }
> +#endif
>
> /**
> * igt_lsof: Lists information about files opened by processes.
> @@ -1510,6 +1521,7 @@ __igt_lsof(const char *dir)
> void
> igt_lsof(const char *dpath)
> {
> +#ifdef HAVE_PROCPS
> struct stat st;
> size_t len = strlen(dpath);
> char *sanitized;
> @@ -1530,6 +1542,12 @@ igt_lsof(const char *dpath)
> __igt_lsof(sanitized);
>
> free(sanitized);
> +#else
> +#warning "No procps, using naive implementation of igt_lsof"
> + char lsof_cmd[NAME_MAX];
> + snprintf(lsof_cmd, sizeof(lsof_cmd), "lsof +d %s", dpath);
> + system(lsof_cmd);
> +#endif
> }
>
> static struct igt_siglatency {
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH i-g-t v2] lib/igt_aux: Make procps optional
2017-04-19 12:24 ` Jani Nikula
@ 2017-04-19 13:29 ` Arkadiusz Hiler
0 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 13:29 UTC (permalink / raw)
To: intel-gfx
Android does not have procps and it's not easy to compile it as a
dependency.
We can provide alternative, "naive" implementation that just shells out
to external commands (i.e. pkill and lsof) in case we do not have the
library.
v2: do not ifdef insides of functions (J. Nikula)
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
configure.ac | 6 +++++-
lib/igt_aux.c | 32 +++++++++++++++++++++++++++++---
2 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 12b0ab0..a5a92d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,11 @@ AC_SUBST(ASSEMBLER_WARN_CFLAGS)
PKG_CHECK_MODULES(DRM, [libdrm])
PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
PKG_CHECK_MODULES(KMOD, [libkmod])
-PKG_CHECK_MODULES(PROCPS, [libprocps])
+PKG_CHECK_MODULES(PROCPS, [libprocps], [procps=yes], [procps=no])
+AM_CONDITIONAL(HAVE_PROCPS, [test "x$procps" = xyes])
+if test x"$procps" = xyes; then
+ AC_DEFINE(HAVE_PROCPS,1,[Enable process managment without shelling out])
+fi
PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
if test x$have_valgrind = xyes; then
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 2ec6b78..3695fa5 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -50,9 +50,7 @@
#include <sys/utsname.h>
#include <termios.h>
#include <assert.h>
-
-#include <proc/readproc.h>
-
+#include <linux/limits.h>
#include "drmtest.h"
#include "i915_drm.h"
#include "intel_chipset.h"
@@ -71,6 +69,10 @@
#include <libgen.h> /* for dirname() */
#endif
+#ifdef HAVE_PROCPS
+#include <proc/readproc.h>
+#endif
+
/**
* SECTION:igt_aux
* @short_description: Auxiliary libraries and support functions
@@ -1281,6 +1283,7 @@ void igt_set_module_param_int(const char *name, int val)
igt_set_module_param(name, str);
}
+#ifdef HAVE_PROCPS
/**
* igt_terminate_process:
* @sig: Signal to send
@@ -1317,7 +1320,18 @@ int igt_terminate_process(int sig, const char *comm)
closeproc(proc);
return err;
}
+#else /* HAVE_PROCPS */
+#warning "No procps, using naive implementatio of igt_terminate_process"
+int igt_terminate_process(int sig, const char *comm)
+{
+ char pkill_cmd[NAME_MAX];
+ snprintf(pkill_cmd, sizeof(pkill_cmd), "pkill -x -%d %s", sig, comm);
+ return system(pkill_cmd);
+}
+#endif /* HAVE_PROCPS */
+
+#ifdef HAVE_PROCPS
struct pinfo {
pid_t pid;
const char *comm;
@@ -1531,6 +1545,18 @@ igt_lsof(const char *dpath)
free(sanitized);
}
+#else /* HAVE_PROCPS */
+#warning "No procps, using naive implementatio of igt_lsof"
+
+void
+igt_lsof(const char *dpath)
+{
+ char lsof_cmd[NAME_MAX];
+ snprintf(lsof_cmd, sizeof(lsof_cmd), "lsof +d %s", dpath);
+ system(lsof_cmd);
+
+}
+#endif /* HAVE_PROCPS */
static struct igt_siglatency {
timer_t timer;
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android
2017-04-19 12:22 ` Jani Nikula
@ 2017-04-19 14:02 ` Arkadiusz Hiler
2017-04-19 14:23 ` Jani Nikula
0 siblings, 1 reply; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-19 14:02 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Wed, Apr 19, 2017 at 03:22:19PM +0300, Jani Nikula wrote:
> On Wed, 19 Apr 2017, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> > We define gettid() using syscall() because glibc does not provide a
> > wrapper.
> >
> > Android's bionic got the syscall covered though.
> >
> > Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> > ---
> > lib/igt_aux.h | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/lib/igt_aux.h b/lib/igt_aux.h
> > index e62858e..54b9716 100644
> > --- a/lib/igt_aux.h
> > +++ b/lib/igt_aux.h
> > @@ -43,7 +43,12 @@ extern int num_trash_bos;
> > #define NSEC_PER_SEC (1000*USEC_PER_SEC)
> >
> > /* signal interrupt helpers */
> > +#ifdef ANDROID
>
> Seems like this should be something like HAVE_GETTID, defined by
> configure or by android makefiles?
Yeah, but that's not that easy (yet) and that's not the only area which
would use it - notice the thing with cairo from the cover letter.
config.h is generated in a ugly way for Android - lib/Android.mk does
that. Also if you ./configure it stops compiling for Android causing
confusing error.
Whole area could use some heavy reworking.
One approach would be to mimic what other projects do:
* have config_android.h with set of sane #defines (as environment is
more static and there is no ac/am)
* don't define HAVE_CONFIG_H and just `-include config_android.h` on...
Android
* add gettid() discovery via ac for Linux (I don't think that any
libc other than bionic wraps that call though)
But that would made a whole series.
I would like to go with #ifdef ANDROID for now.
--
Cheers,
Arek
> > +#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 */
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android
2017-04-19 14:02 ` Arkadiusz Hiler
@ 2017-04-19 14:23 ` Jani Nikula
2017-04-20 10:33 ` Arkadiusz Hiler
0 siblings, 1 reply; 26+ messages in thread
From: Jani Nikula @ 2017-04-19 14:23 UTC (permalink / raw)
To: Arkadiusz Hiler; +Cc: intel-gfx
On Wed, 19 Apr 2017, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> On Wed, Apr 19, 2017 at 03:22:19PM +0300, Jani Nikula wrote:
>> On Wed, 19 Apr 2017, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
>> > We define gettid() using syscall() because glibc does not provide a
>> > wrapper.
>> >
>> > Android's bionic got the syscall covered though.
>> >
>> > Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
>> > ---
>> > lib/igt_aux.h | 5 +++++
>> > 1 file changed, 5 insertions(+)
>> >
>> > diff --git a/lib/igt_aux.h b/lib/igt_aux.h
>> > index e62858e..54b9716 100644
>> > --- a/lib/igt_aux.h
>> > +++ b/lib/igt_aux.h
>> > @@ -43,7 +43,12 @@ extern int num_trash_bos;
>> > #define NSEC_PER_SEC (1000*USEC_PER_SEC)
>> >
>> > /* signal interrupt helpers */
>> > +#ifdef ANDROID
>>
>> Seems like this should be something like HAVE_GETTID, defined by
>> configure or by android makefiles?
>
> Yeah, but that's not that easy (yet) and that's not the only area which
> would use it - notice the thing with cairo from the cover letter.
>
> config.h is generated in a ugly way for Android - lib/Android.mk does
> that. Also if you ./configure it stops compiling for Android causing
> confusing error.
>
> Whole area could use some heavy reworking.
>
> One approach would be to mimic what other projects do:
>
> * have config_android.h with set of sane #defines (as environment is
> more static and there is no ac/am)
>
> * don't define HAVE_CONFIG_H and just `-include config_android.h` on...
> Android
>
> * add gettid() discovery via ac for Linux (I don't think that any
> libc other than bionic wraps that call though)
>
>
> But that would made a whole series.
> I would like to go with #ifdef ANDROID for now.
Fair enough.
It's just that I cringe seeing #ifdef <ENVIRONMENT> instead of #ifdef
<FEATURE>, when <ENVIRONMENT> and <FEATURE> are not interchangeable or
1:1. For example, glibc might include gettid later.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 08/13] benchmarks/Android.mk: Add gem_latency to skip list
2017-04-19 11:01 ` [PATCH i-g-t 08/13] benchmarks/Android.mk: Add gem_latency " Arkadiusz Hiler
@ 2017-04-19 16:58 ` Chris Wilson
2017-04-20 10:18 ` Arkadiusz Hiler
0 siblings, 1 reply; 26+ messages in thread
From: Chris Wilson @ 2017-04-19 16:58 UTC (permalink / raw)
To: Arkadiusz Hiler; +Cc: intel-gfx
On Wed, Apr 19, 2017 at 01:01:50PM +0200, Arkadiusz Hiler wrote:
> AOSP, as of this commit, does not include libdrm with fence defines.
Pushed local defines that should keep the benchmark happy.
Please do reset the configure libdrm requirements to what is available
on min(Android, debian stable). They should be our compile targets.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 08/13] benchmarks/Android.mk: Add gem_latency to skip list
2017-04-19 16:58 ` Chris Wilson
@ 2017-04-20 10:18 ` Arkadiusz Hiler
0 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-20 10:18 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Wed, Apr 19, 2017 at 05:58:28PM +0100, Chris Wilson wrote:
> On Wed, Apr 19, 2017 at 01:01:50PM +0200, Arkadiusz Hiler wrote:
> > AOSP, as of this commit, does not include libdrm with fence defines.
>
> Pushed local defines that should keep the benchmark happy.
>
> Please do reset the configure libdrm requirements to what is available
> on min(Android, debian stable). They should be our compile targets.
> -Chris
Series rebased (sans this patch) cleanly on current master.
Everything compiles just fine :-)
Thanks!
--
Cheers,
Arek
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android
2017-04-19 14:23 ` Jani Nikula
@ 2017-04-20 10:33 ` Arkadiusz Hiler
0 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-04-20 10:33 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Wed, Apr 19, 2017 at 05:23:46PM +0300, Jani Nikula wrote:
> On Wed, 19 Apr 2017, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> > On Wed, Apr 19, 2017 at 03:22:19PM +0300, Jani Nikula wrote:
> >> On Wed, 19 Apr 2017, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> >> > We define gettid() using syscall() because glibc does not provide a
> >> > wrapper.
> >> >
> >> > Android's bionic got the syscall covered though.
> >> >
> >> > Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> >> > ---
> >> > lib/igt_aux.h | 5 +++++
> >> > 1 file changed, 5 insertions(+)
> >> >
> >> > diff --git a/lib/igt_aux.h b/lib/igt_aux.h
> >> > index e62858e..54b9716 100644
> >> > --- a/lib/igt_aux.h
> >> > +++ b/lib/igt_aux.h
> >> > @@ -43,7 +43,12 @@ extern int num_trash_bos;
> >> > #define NSEC_PER_SEC (1000*USEC_PER_SEC)
> >> >
> >> > /* signal interrupt helpers */
> >> > +#ifdef ANDROID
> >>
> >> Seems like this should be something like HAVE_GETTID, defined by
> >> configure or by android makefiles?
> >
> > Yeah, but that's not that easy (yet) and that's not the only area which
> > would use it - notice the thing with cairo from the cover letter.
> >
> > config.h is generated in a ugly way for Android - lib/Android.mk does
> > that. Also if you ./configure it stops compiling for Android causing
> > confusing error.
> >
> > Whole area could use some heavy reworking.
> >
> > One approach would be to mimic what other projects do:
> >
> > * have config_android.h with set of sane #defines (as environment is
> > more static and there is no ac/am)
> >
> > * don't define HAVE_CONFIG_H and just `-include config_android.h` on...
> > Android
> >
> > * add gettid() discovery via ac for Linux (I don't think that any
> > libc other than bionic wraps that call though)
> >
> >
> > But that would made a whole series.
> > I would like to go with #ifdef ANDROID for now.
>
> Fair enough.
>
> It's just that I cringe seeing #ifdef <ENVIRONMENT> instead of #ifdef
> <FEATURE>, when <ENVIRONMENT> and <FEATURE> are not interchangeable or
> 1:1. For example, glibc might include gettid later.
>
> BR,
> Jani.
I completetly get that, I had mixed feeling adding the ifdef.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 05/13] chamelium: Fix build issues on Android
2017-04-19 11:01 ` [PATCH i-g-t 05/13] chamelium: Fix build issues on Android Arkadiusz Hiler
@ 2017-05-02 9:53 ` Petri Latvala
2017-05-05 11:46 ` Arkadiusz Hiler
0 siblings, 1 reply; 26+ messages in thread
From: Petri Latvala @ 2017-05-02 9:53 UTC (permalink / raw)
To: Arkadiusz Hiler; +Cc: intel-gfx
On Wed, Apr 19, 2017 at 01:01:47PM +0200, Arkadiusz Hiler wrote:
> Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H"
> guard, and the file itself was included unconditionally.
I see unconditional config.h inclusion in several other places,
is igt_chamelium.h the only file where it causes problems?
--
Petri Latvala
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 13/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android
2017-04-19 11:01 ` [PATCH i-g-t 13/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android Arkadiusz Hiler
@ 2017-05-04 8:00 ` Petri Latvala
2017-05-05 11:47 ` Arkadiusz Hiler
0 siblings, 1 reply; 26+ messages in thread
From: Petri Latvala @ 2017-05-04 8:00 UTC (permalink / raw)
To: Arkadiusz Hiler; +Cc: intel-gfx
On Wed, Apr 19, 2017 at 01:01:55PM +0200, Arkadiusz Hiler wrote:
> Currently whole igt_kms.c is disabled while compiling on Android without
> cairo, so this tests does not compile.
>
> There should be cleaner a way to disable only cairo dependant parts
> which should allow us to enable at least some of the KMS tests, but
> that's a bigger rework for another time.
>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> ---
> lib/Android.mk | 1 +
> tests/gem_exec_nop.c | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/lib/Android.mk b/lib/Android.mk
> index 31f88be..dc538b8 100644
> --- a/lib/Android.mk
> +++ b/lib/Android.mk
> @@ -38,6 +38,7 @@ ifeq ("${ANDROID_HAS_CAIRO}", "1")
> 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 \
> diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
> index 66c2fc1..967caef 100644
> --- a/tests/gem_exec_nop.c
> +++ b/tests/gem_exec_nop.c
> @@ -138,6 +138,7 @@ stable_nop_on_ring(int fd, uint32_t handle, unsigned int engine,
> return n;
> }
>
> +#if (!defined(ANDROID)) || (defined(ANDROID) && ANDROID_HAS_CAIRO)
Tautological check for ANDROID being defined. Is it too confusing to reduce this to
#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, \
> @@ -178,6 +179,7 @@ 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)
> {
> @@ -561,8 +563,10 @@ igt_main
> igt_subtest("context-sequential")
> sequential(device, handle, FORKED | CONTEXT, 150);
>
> +#if (!defined(ANDROID)) || (defined(ANDROID) && ANDROID_HAS_CAIRO)
Likewise.
--
Petri Latvala
> igt_subtest("headless")
> headless(device, handle);
> +#endif
>
> igt_fixture {
> igt_stop_hang_detector();
> --
> 2.9.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 05/13] chamelium: Fix build issues on Android
2017-05-02 9:53 ` Petri Latvala
@ 2017-05-05 11:46 ` Arkadiusz Hiler
0 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-05-05 11:46 UTC (permalink / raw)
To: Petri Latvala; +Cc: intel-gfx
On Tue, May 02, 2017 at 12:53:16PM +0300, Petri Latvala wrote:
> On Wed, Apr 19, 2017 at 01:01:47PM +0200, Arkadiusz Hiler wrote:
> > Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H"
> > guard, and the file itself was included unconditionally.
>
> I see unconditional config.h inclusion in several other places,
> is igt_chamelium.h the only file where it causes problems?
Yes that we the reason for this ifdef, but that might have been fixed in
other way by different patch as I can't reproduce the error anymore.
I'll drop that from this patch and later we can have one dedicated to
adding ifdefs everywhere.
The approach with config_android.h would need that, so that would be
good series to do it.
--
Cheers,
Arek
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH i-g-t 13/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android
2017-05-04 8:00 ` Petri Latvala
@ 2017-05-05 11:47 ` Arkadiusz Hiler
0 siblings, 0 replies; 26+ messages in thread
From: Arkadiusz Hiler @ 2017-05-05 11:47 UTC (permalink / raw)
To: Petri Latvala; +Cc: intel-gfx
On Thu, May 04, 2017 at 11:00:33AM +0300, Petri Latvala wrote:
> On Wed, Apr 19, 2017 at 01:01:55PM +0200, Arkadiusz Hiler wrote:
> > Currently whole igt_kms.c is disabled while compiling on Android without
> > cairo, so this tests does not compile.
> >
> > There should be cleaner a way to disable only cairo dependant parts
> > which should allow us to enable at least some of the KMS tests, but
> > that's a bigger rework for another time.
> >
> > Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> > ---
> > lib/Android.mk | 1 +
> > tests/gem_exec_nop.c | 4 ++++
> > 2 files changed, 5 insertions(+)
> >
> > diff --git a/lib/Android.mk b/lib/Android.mk
> > index 31f88be..dc538b8 100644
> > --- a/lib/Android.mk
> > +++ b/lib/Android.mk
> > @@ -38,6 +38,7 @@ ifeq ("${ANDROID_HAS_CAIRO}", "1")
> > 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 \
> > diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
> > index 66c2fc1..967caef 100644
> > --- a/tests/gem_exec_nop.c
> > +++ b/tests/gem_exec_nop.c
> > @@ -138,6 +138,7 @@ stable_nop_on_ring(int fd, uint32_t handle, unsigned int engine,
> > return n;
> > }
> >
> > +#if (!defined(ANDROID)) || (defined(ANDROID) && ANDROID_HAS_CAIRO)
>
>
> Tautological check for ANDROID being defined. Is it too confusing to reduce this to
>
> #if !defined(ANDROID) || ANDROID_HAS_CAIRO
Indeed, thanks.
--
Cheers,
Arek
> > #define assert_within_epsilon(x, ref, tolerance) \
> > igt_assert_f((x) <= (1.0 + tolerance) * ref && \
> > (x) >= (1.0 - tolerance) * ref, \
> > @@ -178,6 +179,7 @@ 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)
> > {
> > @@ -561,8 +563,10 @@ igt_main
> > igt_subtest("context-sequential")
> > sequential(device, handle, FORKED | CONTEXT, 150);
> >
> > +#if (!defined(ANDROID)) || (defined(ANDROID) && ANDROID_HAS_CAIRO)
>
>
> Likewise.
>
>
>
>
> --
> Petri Latvala
>
>
>
>
>
> > igt_subtest("headless")
> > headless(device, handle);
> > +#endif
> >
> > igt_fixture {
> > igt_stop_hang_detector();
> > --
> > 2.9.3
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2017-05-05 11:47 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 01/13] tests/drm_import_export: Include {i915_, }drm.h properly Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 02/13] Make conditions on HAVE_UDEV consistent Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android Arkadiusz Hiler
2017-04-19 12:22 ` Jani Nikula
2017-04-19 14:02 ` Arkadiusz Hiler
2017-04-19 14:23 ` Jani Nikula
2017-04-20 10:33 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 04/13] lib/igt_aux: Make procps optional Arkadiusz Hiler
2017-04-19 12:24 ` Jani Nikula
2017-04-19 13:29 ` [PATCH i-g-t v2] " Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 05/13] chamelium: Fix build issues on Android Arkadiusz Hiler
2017-05-02 9:53 ` Petri Latvala
2017-05-05 11:46 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 06/13] tools/Android.mk: Add guc_logger and l3_parity skip list Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 07/13] tests/Android.mk: Add perf to " Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 08/13] benchmarks/Android.mk: Add gem_latency " Arkadiusz Hiler
2017-04-19 16:58 ` Chris Wilson
2017-04-20 10:18 ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 09/13] Android.mk: Fix libkmod use Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 10/13] Android.mk: Filter out *.h from src files Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 11/13] Android.mk: Use drm stubs Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 12/13] tools/Android.mk: Fix zlib inclusion Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 13/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android Arkadiusz Hiler
2017-05-04 8:00 ` Petri Latvala
2017-05-05 11:47 ` Arkadiusz Hiler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.