commit: becc53b8cb7709117c324281a147c2e260cd42d6 Author: Petr Vaněk <arkamar <AT> gentoo <DOT> org> AuthorDate: Fri Apr 19 08:39:10 2024 +0000 Commit: Petr Vaněk <arkamar <AT> gentoo <DOT> org> CommitDate: Fri Apr 19 09:35:46 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=becc53b8
dev-libs/hiredis: fix tests for 1.1.0 It was necessary to correct test parameters, because the -p parameter expects redis port number, not PID. All previously disabled tests pass, however, new "Async connect timeout" test was introduced in 1.1.0 version which requires non-localhost IP address. This test is disabled by a new patch which replaced the original one. Closes: https://bugs.gentoo.org/920297 Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org> .../files/hiredis-1.1.0-disable-network-tests.patch | 19 +++++++++++++++++++ dev-libs/hiredis/hiredis-1.1.0-r1.ebuild | 6 +++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch b/dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch new file mode 100644 index 000000000000..0bfc281757f8 --- /dev/null +++ b/dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch @@ -0,0 +1,19 @@ +Gentoo specific patch which disables test requiring non-localhost IP +address. + +diff --git a/test.c b/test.c +index c1065ff..ca21c30 100644 +--- a/test.c ++++ b/test.c +@@ -2151,7 +2151,7 @@ static void test_async_polling(struct config config) { + assert(astest.ac == NULL); + test_cond(astest.disconnect_status == REDIS_OK); + +- if (config.type == CONN_TCP || config.type == CONN_SSL) { ++ if (0) { /* disabled because of blackhole ip */ + /* timeout can only be simulated with network */ + test("Async connect timeout: "); + config.tcp.host = "192.168.254.254"; /* blackhole ip */ +-- +2.43.2 + diff --git a/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild b/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild index 193ec8133864..ac1c84f95766 100644 --- a/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild +++ b/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -27,7 +27,7 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}"/${PN}-1.0.0-disable-network-tests.patch + "${FILESDIR}"/${PN}-1.1.0-disable-network-tests.patch ) src_prepare() { @@ -73,7 +73,7 @@ src_test() { _build hiredis-test "${EPREFIX}"/usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die - ./hiredis-test -h 127.0.0.1 -p ${REDIS_PID} -s ${REDIS_SOCK} + ./hiredis-test -h 127.0.0.1 -p ${REDIS_PORT} -s ${REDIS_SOCK} local ret=$? kill "$(<"${REDIS_PID}")" || die
