diff options
author | 2024-02-18 09:48:09 +0000 | |
---|---|---|
committer | 2024-02-18 09:49:43 +0000 | |
commit | 7ab66de3c35d5310271b9b805543d375aea82b0d (patch) | |
tree | dc8a6b6110a4257f469b12d04f98fb5f43da218f /dev-libs/libuv | |
parent | sec-keys/openpgp-keys-libuv: update Manifest, style tweaks, missing dies (diff) | |
download | gentoo-7ab66de3c35d5310271b9b805543d375aea82b0d.tar.gz gentoo-7ab66de3c35d5310271b9b805543d375aea82b0d.tar.bz2 gentoo-7ab66de3c35d5310271b9b805543d375aea82b0d.zip |
dev-libs/libuv: skip part of thread_priority test
Part of the (newly-introduced) thread_priority test doesn't interact well
with PORTAGE_NICENESS, (maybe) PORTAGE_IONICE_COMMAND, and PORTAGE_SCHEDULING_POLICY.
For example, with PORTAGE_NICENESS="18", PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}",
and PORTAGE_SCHEDULING_POLICY="idle", I get:
```
not ok 354 - thread_priority
exit code 134
Output from process `thread_priority`:
Assertion failed in test/test-thread-priority.c on line 95: `priority == (0 - UV_THREAD_PRIORITY_LOWEST * 2)` (0 == 4)
```
Skip that one assertion accordingly.
And while at it, elaborate on a bit of m4 hackery we do in the ebuild.
Closes: https://bugs.gentoo.org/924653
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libuv')
-rw-r--r-- | dev-libs/libuv/files/libuv-1.48.0-test-thread-priority-portage.patch | 21 | ||||
-rw-r--r-- | dev-libs/libuv/libuv-1.48.0.ebuild | 11 | ||||
-rw-r--r-- | dev-libs/libuv/libuv-9999.ebuild | 11 |
3 files changed, 35 insertions, 8 deletions
diff --git a/dev-libs/libuv/files/libuv-1.48.0-test-thread-priority-portage.patch b/dev-libs/libuv/files/libuv-1.48.0-test-thread-priority-portage.patch new file mode 100644 index 000000000000..6cefebacf2af --- /dev/null +++ b/dev-libs/libuv/files/libuv-1.48.0-test-thread-priority-portage.patch @@ -0,0 +1,21 @@ +This test fails in Portage with aggressive PORTAGE_NICENESS, PORTAGE_IONICE_COMMAND, +and PORTAGE_SCHEDULING_POLICY. + +Bug: https://bugs.gentoo.org/924653 +--- a/test/test-thread-priority.c ++++ b/test/test-thread-priority.c +@@ -92,7 +92,6 @@ TEST_IMPL(thread_priority) { + ASSERT_EQ(priority, 0); + ASSERT_OK(uv_thread_setpriority(pthread_self(), UV_THREAD_PRIORITY_LOWEST)); + ASSERT_OK(uv_thread_getpriority(pthread_self(), &priority)); +- ASSERT_EQ(priority, (0 - UV_THREAD_PRIORITY_LOWEST * 2)); + #endif + + uv_sem_post(&sem); +@@ -102,4 +101,4 @@ TEST_IMPL(thread_priority) { + uv_sem_destroy(&sem); + + return 0; +-} +\ No newline at end of file ++} diff --git a/dev-libs/libuv/libuv-1.48.0.ebuild b/dev-libs/libuv/libuv-1.48.0.ebuild index 3ece11e123c5..056ed6900a01 100644 --- a/dev-libs/libuv/libuv-1.48.0.ebuild +++ b/dev-libs/libuv/libuv-1.48.0.ebuild @@ -30,17 +30,20 @@ BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-libuv ) " +PATCHES=( + "${FILESDIR}"/${PN}-1.48.0-test-thread-priority-portage.patch +) + src_prepare() { default - echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ - > m4/libuv-extra-automake-flags.m4 || die - if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then eapply "${FILESDIR}"/${PN}-1.41.0-darwin.patch fi - # Upstream fails to ship a configure script + # Upstream fails to ship a configure script and has missing m4 file. + echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ + > m4/libuv-extra-automake-flags.m4 || die eautoreconf } diff --git a/dev-libs/libuv/libuv-9999.ebuild b/dev-libs/libuv/libuv-9999.ebuild index 3ece11e123c5..056ed6900a01 100644 --- a/dev-libs/libuv/libuv-9999.ebuild +++ b/dev-libs/libuv/libuv-9999.ebuild @@ -30,17 +30,20 @@ BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-libuv ) " +PATCHES=( + "${FILESDIR}"/${PN}-1.48.0-test-thread-priority-portage.patch +) + src_prepare() { default - echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ - > m4/libuv-extra-automake-flags.m4 || die - if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then eapply "${FILESDIR}"/${PN}-1.41.0-darwin.patch fi - # Upstream fails to ship a configure script + # Upstream fails to ship a configure script and has missing m4 file. + echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ + > m4/libuv-extra-automake-flags.m4 || die eautoreconf } |