[PATCH core-updates 0/1] gnu: mesa: Fix sporadic test failures.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Simon South
Owner
unassigned
Submitted by
Simon South
Severity
normal
S
S
Simon South wrote on 28 Jan 2023 14:30
(address . guix-patches@gnu.org)
cover.1674910858.git.simon@simonsouth.net
On core-updates, I've found Mesa will sometimes fail its test suite with error
messages like

../mesa-22.2.4/src/gallium/drivers/r600/sfn/tests/sfn_instrfromstring_test.cpp:712: Failure
Expected equality of these values:
os.str()
Which is: "WRITE_SCRATCH 20 R1.xyzw\xFF\xFF AL:4 ALO:16"
init
Which is: "WRITE_SCRATCH 20 R1.xyzw AL:4 ALO:16"

Turns out this is due to an uninitialized buffer in the test suite's code,
reported to upstream with issue 7021[0] and fixed with upstream commit
7749599d[1] in Mesa 22.3.0.

The patch to follow backports this commit to the version in core-updates,
22.2.4, and has eliminated these sporadic failures for me.

Tested on x86-64 and AArch64 and everything seems fine.



--
Simon South
simon@simonsouth.net


Simon South (1):
gnu: mesa: Fix sporadic test failures.

gnu/local.mk | 1 +
gnu/packages/gl.scm | 4 ++-
.../mesa-fix-sporadic-test-failures.patch | 27 +++++++++++++++++++
3 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/mesa-fix-sporadic-test-failures.patch


base-commit: 770d379d7b60590bfdcb749287cb6713dee093ce
prerequisite-patch-id: 418e6f2f834e0f77d4da64e48bf654d610fbfe80
prerequisite-patch-id: 7c9321685c0c33cb9d1438797d2cb2bb540276c4
--
2.39.1
S
S
Simon South wrote on 28 Jan 2023 14:32
[PATCH core-updates 1/1] gnu: mesa: Fix sporadic test failures.
(address . 61120@debbugs.gnu.org)
74cb66802a5a503d087378df6e2a8d423c6e69a4.1674910858.git.simon@simonsouth.net
* gnu/packages/patches/mesa-fix-sporadic-test-failures.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gl.scm (mesa)[source]: Apply it.
---
gnu/local.mk | 1 +
gnu/packages/gl.scm | 4 ++-
.../mesa-fix-sporadic-test-failures.patch | 27 +++++++++++++++++++
3 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/mesa-fix-sporadic-test-failures.patch

Toggle diff (62 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 3dbad5b439..306c72c44d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1505,6 +1505,7 @@ dist_patch_DATA = \
%D%/packages/patches/mercurial-hg-extension-path.patch \
%D%/packages/patches/mercurial-openssl-compat.patch \
%D%/packages/patches/mesa-opencl-all-targets.patch \
+ %D%/packages/patches/mesa-fix-sporadic-test-failures.patch \
%D%/packages/patches/meson-allow-dirs-outside-of-prefix.patch \
%D%/packages/patches/mhash-keygen-test-segfault.patch \
%D%/packages/patches/mia-fix-boost-headers.patch \
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index dd62fac13e..8a6d2ac57f 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -279,7 +279,9 @@ (define-public mesa
version "/mesa-" version ".tar.xz")))
(sha256
(base32
- "1azpr68pdg63yq3igmzwsgn2ypg49m0mp3hfkq0lcyswr99npmv5"))))
+ "1azpr68pdg63yq3igmzwsgn2ypg49m0mp3hfkq0lcyswr99npmv5"))
+ (patches
+ (list (search-patch "mesa-fix-sporadic-test-failures.patch")))))
(build-system meson-build-system)
(propagated-inputs
;; The following are in the Requires.private field of gl.pc.
diff --git a/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch b/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
new file mode 100644
index 0000000000..50ac5530a2
--- /dev/null
+++ b/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
@@ -0,0 +1,27 @@
+commit 7749599d737d205a88bbb6fa755ba095d9b581fa
+Author: Gert Wollny <gert.wollny@collabora.com>
+Date: Mon Aug 15 17:15:43 2022 +0200
+
+ r600/sfn: Initialize out buffer when printing op
+
+ 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
+ r600/sfn: rewrite NIR backend
+
+ Closes: #7021
+
+ Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
+ Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18130>
+
+diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp b/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
+index 3d40ea1796a..00826ed6457 100644
+--- a/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
++++ b/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
+@@ -206,7 +206,7 @@ bool WriteScratchInstr::do_ready() const
+
+ void WriteScratchInstr::do_print(std::ostream& os) const
+ {
+- char buf[6];
++ char buf[6] = {0};
+
+ os << "WRITE_SCRATCH ";
+ if (m_address)
--
2.39.1
L
L
Ludovic Courtès wrote on 4 Mar 2023 17:32
Re: bug#61120: [PATCH core-updates 0/1] gnu: mesa: Fix sporadic test failures.
(name . Simon South)(address . simon@simonsouth.net)(address . 61120-done@debbugs.gnu.org)
871qm4tr3f.fsf_-_@gnu.org
Simon South <simon@simonsouth.net> skribis:

Toggle quote (4 lines)
> * gnu/packages/patches/mesa-fix-sporadic-test-failures.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/gl.scm (mesa)[source]: Apply it.

Applied, thanks for the investigation!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 61120@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 61120
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch