Bug 1026

Summary: tests fail when run with faketime
Product: Sudo Reporter: Marc Haber <mh+sudo-bugzilla>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: low    
Priority: low    
Version: 1.9.10   
Hardware: PC   
OS: Linux   

Description Marc Haber 2022-03-15 02:24:09 MDT
Hi, it's me again ;-)

The reproducible build test processes use the faketime tool to run the build with weird time settings. This seems to fail the starttime test:

$ sudo faketime +362days+9hours+47minutes make check
...
check_starttime: test 2: unexpected start time for pid 589768: Mon Jan  5 10:13:06 1970
check_starttime: 3 tests run, 1 errors, 66% success rate

Is this the intended way for things to go? Can you probably allow to skip that part of the test so that reprotest can continue running? I think it is vitally important to have sudo build reproducibly.

Greetings
Marc

P.S.: I don't know how many Debianisms are in this bug report.
Comment 1 Todd C. Miller 2022-03-15 08:40:14 MDT
I was able to work around faketime in the following commit:
https://www.sudo.ws/repos/sudo/rev/b8ac7dec6e11

$ faketime +362days+9hours+47minutes ./check_starttime
check_starttime: 3 tests run, 0 errors, 100% success rate
Comment 2 Todd C. Miller 2022-06-06 13:10:35 MDT
Fixed in sudo 1.9.11, which is available now.