valgrind: Fix ptest builds on musl
PATCH 1/1 valgrind: Fix ptest builds on musl
--- ...ad_detatch-call-portable-across-plat.patch | 36 +++++++++++++++++++ .../valgrind/valgrind_3.15.0.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch
meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 8c45a2942fe9c945c1003f8e099a69a7eb571d46 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 27 Jan 2020 17:17:19 -0800 +Subject: [PATCH] tests: Make pthread_detatch call portable across platforms + +pthread_t is opaque type therefore we can not apply simple arithmetic to variables of pthread_t type +this test needs to pass a invalid pthread_t handle, typcasting (long)thread works too and is portable +across glibc and musl + +Fixes +| pth_detached3.c:24:25: error: invalid use of undefined type 'struct __pthread' +| 24 | pthread_detach(thread + 8); +| | ^ + +Upstream-Status: Submitted [https://sourceforge.net/p/valgrind/mailman/message/36910453/] +Signed-off-by: Khem Raj <[email protected]> +--- + drd/tests/pth_detached3.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c +index c02eef11a..341193ba1 100644 +--- a/drd/tests/pth_detached3.c ++++ b/drd/tests/pth_detached3.c +@@ -21,7 +21,7 @@ int main(int argc, char** argv) + pthread_detach(thread); + + /* Invoke pthread_detach() with an invalid thread ID. */ +- pthread_detach(thread + 8); ++ pthread_detach((pthread_t)((long)thread + 8)); + + fprintf(stderr, "Finished.\n"); + +-- +2.25.0 +
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +1 -0
@@ -40,6 +40,7 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ file://0001-adjust-path-filter-for-2-memcheck-tests.patch \ file://s390x_vec_op_t.patch \ file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ + file://0001-tests-Make-pthread_detatch-call-portable-across-plat.patch \ " SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975" SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"
Signature · 1 line
2.25.0
✗ patchtest: failure for valgrind: Fix ptest builds on musl
== Series Details ==
Series: valgrind: Fix ptest builds on musl
Revision: 1
URL : https://patchwork.openembedded.org/series/22320/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 037bef5c7d)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe