All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/4] Create a new directory for hardware-targeting tests
@ 2017-12-13 12:58 Petri Latvala
  2017-12-13 12:58 ` [PATCH i-g-t 1/4] tests: Add a hw-tests subdirectory Petri Latvala
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Petri Latvala @ 2017-12-13 12:58 UTC (permalink / raw)
  To: intel-gfx

Original patch from Antonio Argenziano, split into separate commits
for its separate steps.

New directory created, tests/hw-tests, meant for tests that target the
hardware's behaviour more than the driver's (or the combination
thereof). Currently just gem_bad_address moved, with Antonio's
changes to the test.

The tests in hw-tests will install into
$libexec/intel-gpu-tools/hw-tests.

Running hw-tests is done by setting IGT_TEST_ROOT appropriately to the
hw-tests directory. scripts/run-tests.sh is amended to support it
instead of hardcoding to $srcdir/tests.

Antonio Argenziano (1):
  hw-tests: Fix and update gem_bad_address

Petri Latvala (3):
  tests: Add a hw-tests subdirectory
  tests: Move gem_bad_address to hw-tests
  run-tests.sh: Allow users to override IGT_TEST_ROOT

 configure.ac                           | 12 ++++++
 scripts/run-tests.sh                   |  2 +-
 tests/Makefile.am                      |  2 +-
 tests/Makefile.sources                 |  1 -
 tests/hw-tests/Makefile.am             | 41 ++++++++++++++++++++
 tests/hw-tests/Makefile.sources        |  3 ++
 tests/{ => hw-tests}/gem_bad_address.c | 69 +++++++++++++++++++---------------
 tests/hw-tests/meson.build             | 25 ++++++++++++
 tests/meson.build                      |  3 +-
 9 files changed, 124 insertions(+), 34 deletions(-)
 create mode 100644 tests/hw-tests/Makefile.am
 create mode 100644 tests/hw-tests/Makefile.sources
 rename tests/{ => hw-tests}/gem_bad_address.c (52%)
 create mode 100644 tests/hw-tests/meson.build

-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH i-g-t 1/4] tests: Add a hw-tests subdirectory
  2017-12-13 12:58 [PATCH i-g-t 0/4] Create a new directory for hardware-targeting tests Petri Latvala
@ 2017-12-13 12:58 ` Petri Latvala
  2017-12-13 12:58 ` [PATCH i-g-t 2/4] tests: Move gem_bad_address to hw-tests Petri Latvala
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Petri Latvala @ 2017-12-13 12:58 UTC (permalink / raw)
  To: intel-gfx

The hw-tests subdirectory is meant for tests that target the
hardware's behaviour without the kernel having much say in
matters. Tests in the directory are not meant for regular CI runs, and
running them requires setting IGT_TEST_ROOT to that directory when
using piglit.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
---
 configure.ac                    | 12 ++++++++++++
 tests/Makefile.am               |  2 +-
 tests/hw-tests/Makefile.am      | 41 +++++++++++++++++++++++++++++++++++++++++
 tests/hw-tests/Makefile.sources |  2 ++
 tests/hw-tests/meson.build      | 24 ++++++++++++++++++++++++
 tests/meson.build               |  2 ++
 6 files changed, 82 insertions(+), 1 deletion(-)
 create mode 100644 tests/hw-tests/Makefile.am
 create mode 100644 tests/hw-tests/Makefile.sources
 create mode 100644 tests/hw-tests/meson.build

diff --git a/configure.ac b/configure.ac
index 8740f7a4..5c48025b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -374,6 +374,16 @@ if test "x$BUILD_TESTS" = xyes; then
 	AC_DEFINE(BUILD_TESTS, 1, [Build tests])
 fi
 AM_CONDITIONAL(BUILD_TESTS, [test "x$BUILD_TESTS" = xyes])
+
+AC_ARG_ENABLE(hw_tests,
+             AS_HELP_STRING([--disable-hw-tests],
+             [Disable HW tests build (default: enabled)]),
+             [BUILD_HW_TESTS=$enableval], [BUILD_HW_TESTS="yes"])
+if test "x$BUILD_TESTS" = xyes; then
+       AC_DEFINE(BUILD_HW_TESTS, 1, [Build hw tests])
+fi
+AM_CONDITIONAL(BUILD_HW_TESTS, [test "x$BUILD_HW_TESTS" = xyes])
+
 AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform])
 
 files="broadwell cherryview haswell ivybridge sandybridge valleyview skylake"
@@ -397,6 +407,7 @@ AC_CONFIG_FILES([
 		 man/Makefile
 		 scripts/Makefile
 		 tests/Makefile
+		 tests/hw-tests/Makefile
 		 tests/intel-ci/Makefile
 		 tools/Makefile
 		 tools/null_state_gen/Makefile
@@ -423,6 +434,7 @@ echo "Intel GPU tools"
 echo ""
 echo " • Tests:"
 echo "       Build tests        : ${BUILD_TESTS}"
+echo "       Build HW tests     : ${BUILD_HW_TESTS}"
 echo "       Chamelium tests    : ${enable_chamelium}"
 echo "       Audio tests        : ${enable_audio}"
 echo "       Compile prime tests: ${NOUVEAU}"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1b9a7b0a..18479722 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
 include Makefile.sources
 
-SUBDIRS = intel-ci
+SUBDIRS = hw-tests intel-ci
 
 if HAVE_LIBDRM_AMDGPU
     TESTS_progs += $(AMDGPU_TESTS)
diff --git a/tests/hw-tests/Makefile.am b/tests/hw-tests/Makefile.am
new file mode 100644
index 00000000..434ff695
--- /dev/null
+++ b/tests/hw-tests/Makefile.am
@@ -0,0 +1,41 @@
+include Makefile.sources
+
+if BUILD_HW_TESTS
+test-list.txt: Makefile
+	@echo TESTLIST > $@
+	@echo ${hw_tests} >> $@
+	@echo END TESTLIST >> $@
+
+hwtests_libexecdir = $(pkglibexecdir)/hw-tests
+hwtests_libexec_DATA = \
+	test-list.txt \
+	$(NULL)
+hwtests_libexec_PROGRAMS = $(hw_tests)
+
+all-local: .gitignore
+.gitignore: Makefile.sources
+	@echo "$(hw_tests) test-list.txt /.gitignore" | sed 's/\s\+/\n/g' | sort > $@
+
+EXTRA_DIST = \
+	meson.build \
+	$(NULL)
+
+CLEANFILES = test-list.txt .gitignore
+
+AM_CFLAGS = $(CWARNFLAGS) -Wno-unused-result $(DEBUG_CFLAGS)\
+	-I$(top_srcdir)/include/drm-uapi \
+	-I$(srcdir)/.. \
+	-I$(top_srcdir)/lib \
+	-include "$(srcdir)/../lib/check-ndebug.h" \
+	-DIGT_SRCDIR=\""$(abs_srcdir)"\" \
+	-DIGT_DATADIR=\""$(pkgdatadir)"\" \
+	-D_GNU_SOURCE \
+	$(DRM_CFLAGS) $(LIBUNWIND_CFLAGS) $(WERROR_CFLAGS) \
+	$(NULL)
+
+LDADD = ../../lib/libintel_tools.la $(XMLRPC_LIBS)
+
+AM_CFLAGS += $(CAIRO_CFLAGS) $(LIBUDEV_CFLAGS)
+AM_LDFLAGS = -Wl,--as-needed
+
+endif
diff --git a/tests/hw-tests/Makefile.sources b/tests/hw-tests/Makefile.sources
new file mode 100644
index 00000000..a224da7c
--- /dev/null
+++ b/tests/hw-tests/Makefile.sources
@@ -0,0 +1,2 @@
+hw_tests = \
+	 $(NULL)
diff --git a/tests/hw-tests/meson.build b/tests/hw-tests/meson.build
new file mode 100644
index 00000000..32bb637d
--- /dev/null
+++ b/tests/hw-tests/meson.build
@@ -0,0 +1,24 @@
+hw_test_progs = [
+]
+
+hw_test_deps = [ igt_deps ]
+
+# TODO: Refactoring of all such paths
+hw_libexecdir = join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'hw-tests')
+
+hw_test_executables = []
+
+foreach prog : hw_test_progs
+	hw_test_executables += executable(prog, prog + '.c',
+		   dependencies : test_deps,
+		   install_dir : hw_libexecdir,
+		   install : true)
+endforeach
+
+hw_pkgdatadir = join_paths(get_option('datadir'), 'intel-gpu-tools', 'hw-tests')
+
+hw_test_list = custom_target('hw_testlist',
+	      output : 'test-list.txt',
+	      command : [ gen_testlist, '@OUTPUT@', hw_test_progs ],
+	      install : true,
+	      install_dir : hw_pkgdatadir)
diff --git a/tests/meson.build b/tests/meson.build
index 191ac4ce..8ab16a70 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -316,3 +316,5 @@ image_files = [
   'pass.png',
 ]
 install_data(sources : image_files, install_dir : pkgdatadir)
+
+subdir('hw-tests')
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH i-g-t 2/4] tests: Move gem_bad_address to hw-tests
  2017-12-13 12:58 [PATCH i-g-t 0/4] Create a new directory for hardware-targeting tests Petri Latvala
  2017-12-13 12:58 ` [PATCH i-g-t 1/4] tests: Add a hw-tests subdirectory Petri Latvala
@ 2017-12-13 12:58 ` Petri Latvala
  2017-12-13 13:26   ` Chris Wilson
  2017-12-13 12:58 ` [PATCH i-g-t 3/4] hw-tests: Fix and update gem_bad_address Petri Latvala
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Petri Latvala @ 2017-12-13 12:58 UTC (permalink / raw)
  To: intel-gfx

Since the test is considered to be HW focused, meaning that it doesn't
really exercise the driver but rather an HW feature, it is placed in
tests/hw-tests.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
---
 tests/Makefile.sources                 | 1 -
 tests/hw-tests/Makefile.sources        | 1 +
 tests/{ => hw-tests}/gem_bad_address.c | 0
 tests/hw-tests/meson.build             | 1 +
 tests/meson.build                      | 1 -
 5 files changed, 2 insertions(+), 2 deletions(-)
 rename tests/{ => hw-tests}/gem_bad_address.c (100%)

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index e4e06d01..29dfd9cd 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -264,7 +264,6 @@ HANG = \
 	gem_bad_batch \
 	gem_hang \
 	gem_bad_blit \
-	gem_bad_address \
 	gem_non_secure_batch \
 	$(NULL)
 
diff --git a/tests/hw-tests/Makefile.sources b/tests/hw-tests/Makefile.sources
index a224da7c..1fb3ed9e 100644
--- a/tests/hw-tests/Makefile.sources
+++ b/tests/hw-tests/Makefile.sources
@@ -1,2 +1,3 @@
 hw_tests = \
+	 gem_bad_address \
 	 $(NULL)
diff --git a/tests/gem_bad_address.c b/tests/hw-tests/gem_bad_address.c
similarity index 100%
rename from tests/gem_bad_address.c
rename to tests/hw-tests/gem_bad_address.c
diff --git a/tests/hw-tests/meson.build b/tests/hw-tests/meson.build
index 32bb637d..848d113e 100644
--- a/tests/hw-tests/meson.build
+++ b/tests/hw-tests/meson.build
@@ -1,4 +1,5 @@
 hw_test_progs = [
+	'gem_bad_address',
 ]
 
 hw_test_deps = [ igt_deps ]
diff --git a/tests/meson.build b/tests/meson.build
index 8ab16a70..5eef1bd6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -301,7 +301,6 @@ hang_progs = [
 	'gem_bad_batch',
 	'gem_hang',
 	'gem_bad_blit',
-	'gem_bad_address',
 	'gem_non_secure_batch',
 ]
 foreach prog : hang_progs
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH i-g-t 3/4] hw-tests: Fix and update gem_bad_address
  2017-12-13 12:58 [PATCH i-g-t 0/4] Create a new directory for hardware-targeting tests Petri Latvala
  2017-12-13 12:58 ` [PATCH i-g-t 1/4] tests: Add a hw-tests subdirectory Petri Latvala
  2017-12-13 12:58 ` [PATCH i-g-t 2/4] tests: Move gem_bad_address to hw-tests Petri Latvala
@ 2017-12-13 12:58 ` Petri Latvala
  2017-12-15 20:46   ` Chris Wilson
  2017-12-13 12:58 ` [PATCH i-g-t 4/4] run-tests.sh: Allow users to override IGT_TEST_ROOT Petri Latvala
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Petri Latvala @ 2017-12-13 12:58 UTC (permalink / raw)
  To: intel-gfx

From: Antonio Argenziano <antonio.argenziano@intel.com>

When writing to an invalid memory location, the HW should be clever
enough to silently discard the write without disrupting execution.
gem_bad_address aim at just that. The test has been updated to move away
from the libDrm wrappers and use the IOCTL wrappers instead. Also the
invalid address has been updated to be just outside of the GTT space.

v2 (Petri): Split the directory changes to separate commits, fix
indentation

Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
---
 tests/hw-tests/gem_bad_address.c | 69 +++++++++++++++++++++++-----------------
 1 file changed, 39 insertions(+), 30 deletions(-)

diff --git a/tests/hw-tests/gem_bad_address.c b/tests/hw-tests/gem_bad_address.c
index a970dfa4..2d6112bd 100644
--- a/tests/hw-tests/gem_bad_address.c
+++ b/tests/hw-tests/gem_bad_address.c
@@ -23,37 +23,53 @@
  * Authors:
  *    Eric Anholt <eric@anholt.net>
  *    Jesse Barnes <jbarnes@virtuousgeek.org> (based on gem_bad_blit.c)
+ *    Antonio Argenziano <antonio.argenziano@intel.com>
  *
  */
 
 #include "igt.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
 
-static drm_intel_bufmgr *bufmgr;
-struct intel_batchbuffer *batch;
-
-#define BAD_GTT_DEST ((512*1024*1024)) /* past end of aperture */
+/*
+ * This test aims at verifying that writing to an invalid location in memory,
+ * doesn't cause hangs. The store command should be ignored completely by the
+ * HW and the whole process should be transparent to the user. Therefore,
+ * the test doesn't perform any validation check but expects the wrapping
+ * execution environment to check no hangs have occurred.
+ *
+ * The test needs to send a privileged batch to be able to write to the GTT.
+ */
 
 static void
-bad_store(void)
+bad_store(uint32_t fd, uint32_t engine)
 {
-	BEGIN_BATCH(4, 0);
-	OUT_BATCH(MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL | 1 << 21);
-	OUT_BATCH(0);
-	OUT_BATCH(BAD_GTT_DEST);
-	OUT_BATCH(0xdeadbeef);
-	ADVANCE_BATCH();
+	struct drm_i915_gem_exec_object2 obj;
+	struct drm_i915_gem_execbuffer2 execbuf;
+
+	uint32_t batch[16];
+	int i = 0;
+
+	memset(&obj, 0, sizeof(obj));
+	memset(&execbuf, 0, sizeof(execbuf));
+
+	execbuf.buffers_ptr = to_user_pointer(&obj);
+	execbuf.buffer_count = 1;
+	execbuf.flags = engine;
+	execbuf.flags |= I915_EXEC_SECURE;
 
-	intel_batchbuffer_flush(batch);
+	obj.handle = gem_create(fd, 4096);
+
+	batch[i++] = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
+	batch[i++] = 0x0; //Low part of the GTT address = 4GByte
+	batch[i++] = 0x1; //High part of the GTT address > GTT size
+	batch[i++] = 0xdeadbeef;
+
+	batch[i++] = MI_BATCH_BUFFER_END;
+	batch[i++] = 0x0;
+
+	gem_write(fd, obj.handle, 0, batch, sizeof(batch));
+	gem_execbuf(fd, &execbuf);
+
+	gem_close(fd, obj.handle);
 }
 
 igt_simple_main
@@ -62,14 +78,7 @@ igt_simple_main
 
 	fd = drm_open_driver(DRIVER_INTEL);
 
-	bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
-	drm_intel_bufmgr_gem_enable_reuse(bufmgr);
-	batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
-
-	bad_store();
-
-	intel_batchbuffer_free(batch);
-	drm_intel_bufmgr_destroy(bufmgr);
+	bad_store(fd, I915_EXEC_BLT);
 
 	close(fd);
 }
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH i-g-t 4/4] run-tests.sh: Allow users to override IGT_TEST_ROOT
  2017-12-13 12:58 [PATCH i-g-t 0/4] Create a new directory for hardware-targeting tests Petri Latvala
                   ` (2 preceding siblings ...)
  2017-12-13 12:58 ` [PATCH i-g-t 3/4] hw-tests: Fix and update gem_bad_address Petri Latvala
@ 2017-12-13 12:58 ` Petri Latvala
  2017-12-13 16:04   ` Arkadiusz Hiler
  2017-12-13 16:41 ` ✓ Fi.CI.BAT: success for Create a new directory for hardware-targeting tests Patchwork
  2017-12-13 18:31 ` ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 1 reply; 11+ messages in thread
From: Petri Latvala @ 2017-12-13 12:58 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 scripts/run-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index acd2ae2f..a98e06ce 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -24,7 +24,7 @@
 
 ROOT="`dirname $0`"
 ROOT="`readlink -f $ROOT/..`"
-IGT_TEST_ROOT="$ROOT/tests"
+IGT_TEST_ROOT="${IGT_TEST_ROOT:-$ROOT/tests}"
 IGT_CONFIG_PATH="${IGT_CONFIG_PATH:-$HOME/.igtrc}"
 RESULTS="$ROOT/results"
 PIGLIT=`which piglit 2> /dev/null`
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH i-g-t 2/4] tests: Move gem_bad_address to hw-tests
  2017-12-13 12:58 ` [PATCH i-g-t 2/4] tests: Move gem_bad_address to hw-tests Petri Latvala
@ 2017-12-13 13:26   ` Chris Wilson
  2017-12-15 19:43     ` Antonio Argenziano
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2017-12-13 13:26 UTC (permalink / raw)
  To: Petri Latvala, intel-gfx

Quoting Petri Latvala (2017-12-13 12:58:14)
> Since the test is considered to be HW focused, meaning that it doesn't
> really exercise the driver but rather an HW feature, it is placed in
> tests/hw-tests.

Do we really want to keep this test at all? It's an interesting debate
whether we want to show how trivial it is to subvert the kernel and HW
(in some circumstances).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH i-g-t 4/4] run-tests.sh: Allow users to override IGT_TEST_ROOT
  2017-12-13 12:58 ` [PATCH i-g-t 4/4] run-tests.sh: Allow users to override IGT_TEST_ROOT Petri Latvala
@ 2017-12-13 16:04   ` Arkadiusz Hiler
  0 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2017-12-13 16:04 UTC (permalink / raw)
  To: Petri Latvala; +Cc: intel-gfx

On Wed, Dec 13, 2017 at 02:58:16PM +0200, Petri Latvala wrote:
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* ✓ Fi.CI.BAT: success for Create a new directory for hardware-targeting tests
  2017-12-13 12:58 [PATCH i-g-t 0/4] Create a new directory for hardware-targeting tests Petri Latvala
                   ` (3 preceding siblings ...)
  2017-12-13 12:58 ` [PATCH i-g-t 4/4] run-tests.sh: Allow users to override IGT_TEST_ROOT Petri Latvala
@ 2017-12-13 16:41 ` Patchwork
  2017-12-13 18:31 ` ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2017-12-13 16:41 UTC (permalink / raw)
  To: Petri Latvala; +Cc: intel-gfx

== Series Details ==

Series: Create a new directory for hardware-targeting tests
URL   : https://patchwork.freedesktop.org/series/35288/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
4112f30aedbb252bf8cdd27dbba485c0458faca7 igt/gem_shrink: Exercise allocations in the middle of execbuf under oom-pressure

with latest DRM-Tip kernel build CI_DRM_3508
1a717c76c96c drm-tip: 2017y-12m-13d-14h-48m-36s UTC integration manifest

No testlist changes.

Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                pass       -> FAIL       (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> DMESG-WARN (fi-kbl-r) fdo#104172 +1

fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:439s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:446s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:387s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:518s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:281s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:507s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:502s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:492s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:474s
fi-elk-e7500     total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 time:265s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:535s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:411s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:423s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:392s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:491s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:432s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:491s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:522s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:477s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:532s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:449s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:540s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:563s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:494s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:449s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:564s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:429s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:599s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:492s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_663/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* ✓ Fi.CI.IGT: success for Create a new directory for hardware-targeting tests
  2017-12-13 12:58 [PATCH i-g-t 0/4] Create a new directory for hardware-targeting tests Petri Latvala
                   ` (4 preceding siblings ...)
  2017-12-13 16:41 ` ✓ Fi.CI.BAT: success for Create a new directory for hardware-targeting tests Patchwork
@ 2017-12-13 18:31 ` Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2017-12-13 18:31 UTC (permalink / raw)
  To: Petri Latvala; +Cc: intel-gfx

== Series Details ==

Series: Create a new directory for hardware-targeting tests
URL   : https://patchwork.freedesktop.org/series/35288/
State : success

== Summary ==

Test kms_cursor_crc:
        Subgroup cursor-256x256-suspend:
                skip       -> PASS       (shard-snb) fdo#103375
Test kms_flip:
        Subgroup flip-vs-absolute-wf_vblank:
                pass       -> INCOMPLETE (shard-hsw) fdo#100368

fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368

shard-hsw        total:2648 pass:1506 dwarn:1   dfail:0   fail:10  skip:1130 time:9162s
shard-snb        total:2712 pass:1309 dwarn:1   dfail:0   fail:12  skip:1390 time:8093s
Blacklisted hosts:
shard-kbl        total:2670 pass:1784 dwarn:1   dfail:0   fail:24  skip:860 time:10941s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_663/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH i-g-t 2/4] tests: Move gem_bad_address to hw-tests
  2017-12-13 13:26   ` Chris Wilson
@ 2017-12-15 19:43     ` Antonio Argenziano
  0 siblings, 0 replies; 11+ messages in thread
From: Antonio Argenziano @ 2017-12-15 19:43 UTC (permalink / raw)
  To: Chris Wilson, Petri Latvala, intel-gfx



On 13/12/17 05:26, Chris Wilson wrote:
> Quoting Petri Latvala (2017-12-13 12:58:14)
>> Since the test is considered to be HW focused, meaning that it doesn't
>> really exercise the driver but rather an HW feature, it is placed in
>> tests/hw-tests.
> 
> Do we really want to keep this test at all? It's an interesting debate

This test has been around for a long time now so I think keeping it 
around would not be a problem, plus it actually gets fixed in this series.

-Antonio

> whether we want to show how trivial it is to subvert the kernel and HW
> (in some circumstances). > -Chris
> _______________________________________________
> 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] 11+ messages in thread

* Re: [PATCH i-g-t 3/4] hw-tests: Fix and update gem_bad_address
  2017-12-13 12:58 ` [PATCH i-g-t 3/4] hw-tests: Fix and update gem_bad_address Petri Latvala
@ 2017-12-15 20:46   ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-12-15 20:46 UTC (permalink / raw)
  To: Petri Latvala, intel-gfx

Quoting Petri Latvala (2017-12-13 12:58:15)
> From: Antonio Argenziano <antonio.argenziano@intel.com>
> 
> When writing to an invalid memory location, the HW should be clever
> enough to silently discard the write without disrupting execution.
> gem_bad_address aim at just that. The test has been updated to move away
> from the libDrm wrappers and use the IOCTL wrappers instead. Also the
> invalid address has been updated to be just outside of the GTT space.

It barely scratch the surfaces of what could be done to feed in a bad
address.

> 
> v2 (Petri): Split the directory changes to separate commits, fix
> indentation
> 
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> ---
>  tests/hw-tests/gem_bad_address.c | 69 +++++++++++++++++++++++-----------------
>  1 file changed, 39 insertions(+), 30 deletions(-)
> 
> diff --git a/tests/hw-tests/gem_bad_address.c b/tests/hw-tests/gem_bad_address.c
> index a970dfa4..2d6112bd 100644
> --- a/tests/hw-tests/gem_bad_address.c
> +++ b/tests/hw-tests/gem_bad_address.c
> @@ -23,37 +23,53 @@
>   * Authors:
>   *    Eric Anholt <eric@anholt.net>
>   *    Jesse Barnes <jbarnes@virtuousgeek.org> (based on gem_bad_blit.c)
> + *    Antonio Argenziano <antonio.argenziano@intel.com>
>   *
>   */
>  
>  #include "igt.h"
> -#include <stdlib.h>
> -#include <stdio.h>
> -#include <string.h>
> -#include <fcntl.h>
> -#include <inttypes.h>
> -#include <errno.h>
> -#include <sys/stat.h>
> -#include <sys/time.h>
> -#include "drm.h"
> -#include "intel_bufmgr.h"
>  
> -static drm_intel_bufmgr *bufmgr;
> -struct intel_batchbuffer *batch;
> -
> -#define BAD_GTT_DEST ((512*1024*1024)) /* past end of aperture */
> +/*
> + * This test aims at verifying that writing to an invalid location in memory,
> + * doesn't cause hangs. The store command should be ignored completely by the
> + * HW and the whole process should be transparent to the user. Therefore,
> + * the test doesn't perform any validation check but expects the wrapping
> + * execution environment to check no hangs have occurred.

igt provides the facilities to detect GPU hangs. Wrap in
igt_fork_hang_detector, finish with gem_sync. Actual machine death sadly
requires an outside body.

> + *
> + * The test needs to send a privileged batch to be able to write to the GTT.
> + */
>  
>  static void
> -bad_store(void)
> +bad_store(uint32_t fd, uint32_t engine)
>  {
> -       BEGIN_BATCH(4, 0);
> -       OUT_BATCH(MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL | 1 << 21);
> -       OUT_BATCH(0);
> -       OUT_BATCH(BAD_GTT_DEST);
> -       OUT_BATCH(0xdeadbeef);
> -       ADVANCE_BATCH();
> +       struct drm_i915_gem_exec_object2 obj;
> +       struct drm_i915_gem_execbuffer2 execbuf;
> +
> +       uint32_t batch[16];
> +       int i = 0;
> +
> +       memset(&obj, 0, sizeof(obj));
> +       memset(&execbuf, 0, sizeof(execbuf));
> +
> +       execbuf.buffers_ptr = to_user_pointer(&obj);
> +       execbuf.buffer_count = 1;
> +       execbuf.flags = engine;
> +       execbuf.flags |= I915_EXEC_SECURE;

That is asking to turn off the HW validator (for the most part), and
requires drm_open_driver_master(). But since you are doing something
illegal in a context that allows you to shoot yourself in the foot,
what's the point?  What does it prove?

> -       intel_batchbuffer_flush(batch);
> +       obj.handle = gem_create(fd, 4096);
> +
> +       batch[i++] = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;

Note that MI_STORE_DWORD doesn't even need a bad address to take over
the machine on some platforms. You should start with a validation that a
known good store works, before testing whether a bad one is skipped.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-12-15 20:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-13 12:58 [PATCH i-g-t 0/4] Create a new directory for hardware-targeting tests Petri Latvala
2017-12-13 12:58 ` [PATCH i-g-t 1/4] tests: Add a hw-tests subdirectory Petri Latvala
2017-12-13 12:58 ` [PATCH i-g-t 2/4] tests: Move gem_bad_address to hw-tests Petri Latvala
2017-12-13 13:26   ` Chris Wilson
2017-12-15 19:43     ` Antonio Argenziano
2017-12-13 12:58 ` [PATCH i-g-t 3/4] hw-tests: Fix and update gem_bad_address Petri Latvala
2017-12-15 20:46   ` Chris Wilson
2017-12-13 12:58 ` [PATCH i-g-t 4/4] run-tests.sh: Allow users to override IGT_TEST_ROOT Petri Latvala
2017-12-13 16:04   ` Arkadiusz Hiler
2017-12-13 16:41 ` ✓ Fi.CI.BAT: success for Create a new directory for hardware-targeting tests Patchwork
2017-12-13 18:31 ` ✓ Fi.CI.IGT: " Patchwork

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.