Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 649868

Summary: dev-db/redis: doesn't respect MAKEOPTS=-j1
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Sam James <sam>
Status: RESOLVED FIXED    
Severity: normal CC: arkamar, hydrapolic, robbat2
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/25831
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 654178    
Attachments: 22.20180307-084601

Description Toralf Förster gentoo-dev 2018-03-07 19:54:37 UTC
pstree is attached, there'S an eclass which helps using that env var
Comment 1 Toralf Förster gentoo-dev 2018-03-07 19:56:01 UTC
Created attachment 522896 [details]
22.20180307-084601

pstree
Comment 2 Tomáš Mózes 2018-03-08 05:57:21 UTC
It seems like the multiple redis-server processes are spawned during the tests, src_compile seems to be ok:

src_compile() {
...
emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
}
Comment 3 Petr Vaněk gentoo-dev 2022-06-09 11:43:52 UTC
This is not a problem with MAKEOPTS. make spawns just one proces (./runtest) as expected, however, ./runtest spawns tclsh script which spawns 16 test clients by default. It is possible to configure number of clients with a parameter

   --clients <num>    Number of test clients (default 16).

The testing script contains some heuristic to detect slow computer in which case it spawns only one test client.

Anyway, we can run tests with

	./runtest --clients "$(makeopts_jobs)"

if this is really the issue. I can prepare PR if you want.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-09 11:49:10 UTC
Yes please!
Comment 5 Larry the Git Cow gentoo-dev 2022-06-12 20:36:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6b9b40e3c3a58e89a1866d335334d7b210ae3fd

commit f6b9b40e3c3a58e89a1866d335334d7b210ae3fd
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2022-06-09 14:37:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-12 20:36:36 +0000

    dev-db/redis: limit a number of test clients to MAKEOPTS jobs
    
    This change makes tests to respect user MAKEOPTS jobs preference rather
    than running 16 test clients by default.
    
    Closes: https://bugs.gentoo.org/649868
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/redis/redis-6.0.16.ebuild   | 12 ++++++++----
 dev-db/redis/redis-6.2.6.ebuild    | 12 ++++++++----
 dev-db/redis/redis-6.2.7-r1.ebuild | 12 ++++++++----
 dev-db/redis/redis-7.0.0-r1.ebuild | 12 ++++++++----
 dev-db/redis/redis-7.0.0.ebuild    | 12 ++++++++----
 dev-db/redis/redis-7.0.1.ebuild    | 12 ++++++++----
 6 files changed, 48 insertions(+), 24 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6037dd3e3150d5d125f64a73f5ffecd4d5f514c1

commit 6037dd3e3150d5d125f64a73f5ffecd4d5f514c1
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2022-06-09 12:31:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-12 20:36:36 +0000

    dev-db/redis: limit a number of test clients to MAKEOPTS jobs
    
    It is necessary to cal ./runtest directly from src_test function in
    order to be able to pass --clients parameter.
    
    Bug: https://bugs.gentoo.org/649868
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/redis/redis-5.0.14.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)