From: bugzilla-daemon@freedesktop.org Subject: [Bug 108891] Test enumeration becomes funky on some tests due to fd FILE* stream change Date: Wed, 28 Nov 2018 21:13:05 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0563321310==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AE2B6E3A4 for ; Wed, 28 Nov 2018 21:13:06 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0563321310== Content-Type: multipart/alternative; boundary="15434395850.5BE9.28771" Content-Transfer-Encoding: 7bit --15434395850.5BE9.28771 Date: Wed, 28 Nov 2018 21:13:05 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D108891 Bug ID: 108891 Summary: Test enumeration becomes funky on some tests due to fd FILE* stream change Product: DRI Version: XOrg git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: IGT Assignee: dri-devel@lists.freedesktop.org Reporter: casey.g.bowman@intel.com Testing on ChromeOS KBL device with a 4.4 kernel IGT SHA used was: dbe1fc1e13c4e4eebaa9e1bbc5d188b5109c09d3 Running the igt@gem_busy@basic-busy-default test resulted in the following failure: (gem_busy:13397) igt-gt-CRITICAL: Test assertion failure function igt_allow_hang, file ../../intel-gpu-tools-9999/lib/igt_gt.c:174: (gem_busy:13397) igt-gt-CRITICAL: Failed assertion: igt_sysfs_set_parameter (fd, "reset", "%d", INT_MAX ) (gem_busy:13397) igt-gt-CRITICAL: Last errno: 22, Invalid argument Test gem_busy failed. **** DEBUG **** (gem_busy:13397) DEBUG: Test requirement passed: gem_has_ring(fd, e->exec_i= d | e->flags) (gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0' (gem_busy:13397) drmtest-DEBUG: Test requirement passed: is_i915_device(fd)= && has_known_intel_chipset(fd) (gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0' (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: dir >=3D 0 (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: err =3D=3D 0 (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: gem_has_ring(fd, ring) (gem_busy:13397) igt-dummyload-DEBUG: Test requirement passed: nengine (gem_busy:13397) igt-core-INFO: Subtest basic-busy-default: SUCCESS (0.013s) (gem_busy:13397) drmtest-DEBUG: Test requirement passed: is_i915_device(fd)= && has_known_intel_chipset(fd) (gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0' (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: dir >=3D 0 (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: err =3D=3D 0 (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: gem_has_ring(fd, ring) (gem_busy:13397) igt-dummyload-DEBUG: Test requirement passed: nengine (gem_busy:13397) DEBUG: Test requirement passed: has_extended_busy_ioctl(fd) (gem_busy:13397) drmtest-DEBUG: Test requirement passed: is_i915_device(fd)= && has_known_intel_chipset(fd) (gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0' (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: dir >=3D 0 (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: err =3D=3D 0 (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: gem_has_ring(fd, ring) (gem_busy:13397) igt-dummyload-DEBUG: Test requirement passed: nengine (gem_busy:13397) DEBUG: Test requirement passed: has_extended_busy_ioctl(fd) (gem_busy:13397) drmtest-DEBUG: Test requirement passed: is_i915_device(fd)= && has_known_intel_chipset(fd) (gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0' (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: dir >=3D 0 (gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: err =3D=3D 0 (gem_busy:13397) igt-gt-CRITICAL: Test assertion failure function igt_allow_hang, file ../../intel-gpu-tools-9999/lib/igt_gt.c:174: (gem_busy:13397) igt-gt-CRITICAL: Failed assertion: igt_sysfs_set_parameter (fd, "reset", "%d", INT_MAX ) (gem_busy:13397) igt-gt-CRITICAL: Last errno: 22, Invalid argument (gem_busy:13397) igt-core-INFO: Stack trace: **** END **** The Stderr output clearly shows that the test passed with: (gem_busy:13397) igt-core-INFO: Subtest basic-busy-default: SUCCESS (0.013s) But the test continues on. Doing a bisect resulted in the offending commit: commit 3f89d7b02dcf662e994c7135b13d52bc8e09a4ea Author: Chris Wilson Date: Thu Aug 30 09:38:55 2018 +0100 lib/sysfs: Avoid using FILE* temporary for igt_sysfs_[v]printf Currently we wrap our fd inside a FILE* stream to make use of vfprintf, but the man page leaves the question of errno and signal handling in doubt. It is documented as returning a negative value and setting ferror(), but we have been interpreting errno to handle signal restarting. As that is in doubt, reduce it to a sprintf and reuse our common interrupt handling write() that already returns -errno. Signed-off-by: Chris Wilson Cc: Katarzyna Dec Reviewed-by: Katarzyna Dec Reverting the commit fixed the behavior and 30+ subtests on the fast-feedback.testlist changed back to passing. --=20 You are receiving this mail because: You are the assignee for the bug.= --15434395850.5BE9.28771 Date: Wed, 28 Nov 2018 21:13:05 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 108891
Summary Test enumeration becomes funky on some tests due to fd FILE* = stream change
Product DRI
Version XOrg git
Hardware Other
OS All
Status NEW
Severity normal
Priority medium
Component IGT
Assignee dri-devel@lists.freedesktop.org
Reporter casey.g.bowman@intel.com

Testing on ChromeOS KBL device with a 4.4 kernel

IGT SHA used was:
dbe1fc1e13c4e4eebaa9e1bbc5d188b5109c09d3

Running the igt@gem_busy@basic-busy-default test resulted in the fo=
llowing
failure:

(gem_busy:13397) igt-gt-CRITICAL: Test assertion failure function
igt_allow_hang, file ../../intel-gpu-tools-9999/lib/igt_gt.c:174:
(gem_busy:13397) igt-gt-CRITICAL: Failed assertion: igt_sysfs_set_parameter
(fd, "reset", "%d", INT_MAX )
(gem_busy:13397) igt-gt-CRITICAL: Last errno: 22, Invalid argument
Test gem_busy failed.
**** DEBUG ****
(gem_busy:13397) DEBUG: Test requirement passed: gem_has_ring(fd, e->exe=
c_id |
e->flags)
(gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory
'/sys/kernel/debug/dri/0'
(gem_busy:13397) drmtest-DEBUG: Test requirement passed: is_i915_device(fd)=
 &&
has_known_intel_chipset(fd)
(gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory
'/sys/kernel/debug/dri/0'
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: dir >=3D=
 0
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: err =3D=3D 0
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed:
gem_has_ring(fd, ring)
(gem_busy:13397) igt-dummyload-DEBUG: Test requirement passed: nengine
(gem_busy:13397) igt-core-INFO: Subtest basic-busy-default: SUCCESS (0.013s)
(gem_busy:13397) drmtest-DEBUG: Test requirement passed: is_i915_device(fd)=
 &&
has_known_intel_chipset(fd)
(gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory
'/sys/kernel/debug/dri/0'
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: dir >=3D=
 0
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: err =3D=3D 0
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed:
gem_has_ring(fd, ring)
(gem_busy:13397) igt-dummyload-DEBUG: Test requirement passed: nengine
(gem_busy:13397) DEBUG: Test requirement passed: has_extended_busy_ioctl(fd)
(gem_busy:13397) drmtest-DEBUG: Test requirement passed: is_i915_device(fd)=
 &&
has_known_intel_chipset(fd)
(gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory
'/sys/kernel/debug/dri/0'
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: dir >=3D=
 0
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: err =3D=3D 0
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed:
gem_has_ring(fd, ring)
(gem_busy:13397) igt-dummyload-DEBUG: Test requirement passed: nengine
(gem_busy:13397) DEBUG: Test requirement passed: has_extended_busy_ioctl(fd)
(gem_busy:13397) drmtest-DEBUG: Test requirement passed: is_i915_device(fd)=
 &&
has_known_intel_chipset(fd)
(gem_busy:13397) igt-debugfs-DEBUG: Opening debugfs directory
'/sys/kernel/debug/dri/0'
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: dir >=3D=
 0
(gem_busy:13397) ioctl-wrappers-DEBUG: Test requirement passed: err =3D=3D 0
(gem_busy:13397) igt-gt-CRITICAL: Test assertion failure function
igt_allow_hang, file ../../intel-gpu-tools-9999/lib/igt_gt.c:174:
(gem_busy:13397) igt-gt-CRITICAL: Failed assertion: igt_sysfs_set_parameter
(fd, "reset", "%d", INT_MAX )
(gem_busy:13397) igt-gt-CRITICAL: Last errno: 22, Invalid argument
(gem_busy:13397) igt-core-INFO: Stack trace:
****  END  ****

The Stderr output clearly shows that the test passed with:
(gem_busy:13397) igt-core-INFO: Subtest basic-busy-default: SUCCESS (0.013s)

But the test continues on.

Doing a bisect resulted in the offending commit:

commit 3f89d7b02dcf662e994c7135b13d52bc8e09a4ea
Author: Chris Wilson <ch=
ris@chris-wilson.co.uk>
Date:   Thu Aug 30 09:38:55 2018 +0100

    lib/sysfs: Avoid using FILE* temporary for igt_sysfs_[v]printf

    Currently we wrap our fd inside a FILE* stream to make use of vfprintf,
    but the man page leaves the question of errno and signal handling in
    doubt. It is documented as returning a negative value and setting
    ferror(), but we have been interpreting errno to handle signal
    restarting. As that is in doubt, reduce it to a sprintf and reuse our
    common interrupt handling write() that already returns -errno.

    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Katarzyna Dec <ka=
tarzyna.dec@intel.com>
    Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>

Reverting the commit fixed the behavior and 30+ subtests on the
fast-feedback.testlist changed back to passing.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15434395850.5BE9.28771-- --===============0563321310== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0563321310==--