Bug 1026 - tests fail when run with faketime
tests fail when run with faketime
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.9.10
PC Linux
: low low
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-15 02:24 MDT by Marc Haber
Modified: 2022-06-06 13:10 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.