diff mbox series

piglit: Switch to upstreamed patch for musl fix

Message ID 20240319210745.68432-1-raj.khem@gmail.com
State Accepted, archived
Commit 660ca031737a63b0912c69e0c64ef65878776687
Headers show
Series piglit: Switch to upstreamed patch for musl fix | expand

Commit Message

Khem Raj March 19, 2024, 9:07 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...clude-libgen.h-on-musl-linux-systems.patch | 83 +++++++++++++++----
 1 file changed, 69 insertions(+), 14 deletions(-)

Comments

patchtest@automation.yoctoproject.org March 19, 2024, 9:18 p.m. UTC | #1
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch /home/patchtest/share/mboxes/piglit-Switch-to-upstreamed-patch-for-musl-fix.patch

FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)

PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes or older target branch, skipping test (test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!
diff mbox series

Patch

diff --git a/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch b/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch
index e180664d6e4..2875dd52ec8 100644
--- a/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch
+++ b/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch
@@ -1,28 +1,83 @@ 
-From 608cdeddc8e8a679b195927c4d34dc8d93142a91 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 13 Feb 2024 08:53:37 -0800
-Subject: [PATCH] utils: Include libgen.h on musl/linux systems
+From 6c852e6ac292008137a6f3a8aa908090bb5b4b11 Mon Sep 17 00:00:00 2001
+From: Erik Faye-Lund <erik.faye-lund@collabora.com>
+Date: Tue, 19 Mar 2024 16:34:02 +0100
+Subject: [PATCH] properly check for libgen.h
 
-musl does not provide GNU basename like string.h on glibc based systems
-does, it does provide the POSIX compliant basename function therefore
-allow to include libgen.h on non-glibc based linux systems
+Some users are reporting that basename is not available when building on
+Linux with musl libc. And since the POSIX spec[1] says that basename is
+defined in libgen.h, we should include that when available.
 
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/877]
+So let's properly detect the header, and include it if it exists. This
+should hopefully make things a bit more robust.
+
+Since we're also including this from the CL program-tester, let's
+rearrange the includes a bit so we know that config.h has been included.
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/888]
+Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- tests/util/piglit-util.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ CMakeLists.txt                    | 1 +
+ tests/cl/program/program-tester.c | 5 ++++-
+ tests/util/config.h.in            | 1 +
+ tests/util/piglit-util.h          | 4 ++--
+ 4 files changed, 8 insertions(+), 3 deletions(-)
 
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dd2bf67125..5563fe0e20 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -492,6 +492,7 @@ check_include_file(unistd.h    HAVE_UNISTD_H)
+ check_include_file(fcntl.h     HAVE_FCNTL_H)
+ check_include_file(linux/sync_file.h HAVE_LINUX_SYNC_FILE_H)
+ check_include_file(endian.h    HAVE_ENDIAN_H)
++check_include_file(libgen.h    HAVE_LIBGEN_H)
+ 
+ if(DEFINED PIGLIT_INSTALL_VERSION)
+ 	set(PIGLIT_INSTALL_VERSION_SUFFIX
+diff --git a/tests/cl/program/program-tester.c b/tests/cl/program/program-tester.c
+index 97fe64906d..e47fb5aacc 100644
+--- a/tests/cl/program/program-tester.c
++++ b/tests/cl/program/program-tester.c
+@@ -31,10 +31,13 @@
+ #include <inttypes.h>
+ #include <math.h>
+ #include <regex.h>
+-#include <libgen.h>
+ 
+ #include "piglit-framework-cl-program.h"
+ 
++#ifdef HAVE_LIBGEN_H
++#include <libgen.h>
++#endif
++
+ /* Regexes */
+ 
+ /*
+diff --git a/tests/util/config.h.in b/tests/util/config.h.in
+index 8ed5af1709..437eb91418 100644
+--- a/tests/util/config.h.in
++++ b/tests/util/config.h.in
+@@ -16,3 +16,4 @@
+ #cmakedefine HAVE_SYS_RESOURCE_H 1
+ #cmakedefine HAVE_UNISTD_H 1
+ #cmakedefine HAVE_ENDIAN_H 1
++#cmakedefine HAVE_LIBGEN_H 1
 diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
-index 4d3606c70..fdfd903b3 100644
+index 4d3606c708..de999980b6 100644
 --- a/tests/util/piglit-util.h
 +++ b/tests/util/piglit-util.h
-@@ -52,7 +52,7 @@ extern "C" {
+@@ -52,8 +52,8 @@ extern "C" {
  #include <math.h>
  #include <float.h>
  
 -#if defined(__APPLE__) || defined(__MINGW32__)
-+#if defined(__APPLE__) || defined(__MINGW32__) || (defined(__linux__) && !defined(__GLIBC__))
- #  include "libgen.h" // for basename
+-#  include "libgen.h" // for basename
++#ifdef HAVE_LIBGEN_H
++#  include <libgen.h> // for basename
  #elif defined(_MSC_VER)
  
+ static inline char *
+-- 
+GitLab
+