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

Bug 844958

Summary: sys-libs/libfaketime-0.9.9: test hangs forever on riscv
Product: Gentoo Linux Reporter: Alex Fan <alex.fan.q>
Component: Current packagesAssignee: Thomas Deutschmann (RETIRED) <whissi>
Status: RESOLVED FIXED    
Severity: normal Keywords: PullRequest
Priority: Normal    
Version: unspecified   
Hardware: riscv   
OS: Linux   
URL: https://github.com/wolfcw/libfaketime/issues/287
See Also: https://github.com/gentoo/gentoo/pull/25558
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 807721    
Attachments: build log

Description Alex Fan archtester 2022-05-16 05:33:29 UTC
...
Running the test program with no faked time specified
$ LD_PRELOAD=../src/libfaketime.so.1 ./timetest
pthread_cond_timedwait: CLOCK_REALTIME test
(Intentionally sleeping 1 second...)
pthread_cond_timedwait: CLOCK_MONOTONIC test
(Intentionally sleeping 1 second..., see docs about CLOCK_MONOTONIC test)

-> hangs here indefinitely


Reproducible: Always
Comment 1 Alex Fan archtester 2022-05-16 05:35:06 UTC
Created attachment 779183 [details]
build log
Comment 2 Alex Fan archtester 2022-05-16 05:40:22 UTC
riscv (and perhaps ppc64 according to the debian forks) needs an additional flag -DFORCE_PTHREAD_NONVER to avoid the test hang. And with this flag, all tests pass successfully on my riscv machine.

https://salsa.debian.org/debian/faketime/-/blob/debian/main/debian/rules
Comment 3 Yixun Lan archtester gentoo-dev 2022-05-19 07:21:31 UTC
@alex.fan.q

hey, how about submitting a PR for this?
Comment 4 Larry the Git Cow gentoo-dev 2022-05-19 09:27:06 UTC
The bug has been closed via the following commit(s):

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

commit 7179fbdc4ea7c6fafcfbfbbc6f624d1bbb1ed4a6
Author:     Alex Fan <alex.fan.q@gmail.com>
AuthorDate: 2022-05-19 08:38:45 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2022-05-19 09:23:47 +0000

    sys-libs/libfaketime: fix test hang on riscv
    
    Closes: https://bugs.gentoo.org/844958
    Signed-off-by: Alex Fan <alex.fan.q@gmail.com>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 sys-libs/libfaketime/libfaketime-0.9.9.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)