Skip to content

4.0.5 fails test in 2038

While working on reproducible builds for openSUSE (sponsored by the NLnet NGI0 fund), I found that our procps-4.0.5 package fails a test when building in the year 2038.

Running ./uptime.test/uptime.exp ...
spawn /home/abuild/rpmbuild/BUILD/procps-ng-4.0.5/src/uptime^M
 00:00:55 up 0 min,  0 users,  load average: 0.53, 0.14, 0.05^M
PASS: uptime
spawn /home/abuild/rpmbuild/BUILD/procps-ng-4.0.5/src/uptime --since^M
2038-01-20 00:00:00^M
PASS: uptime since option
spawn /home/abuild/rpmbuild/BUILD/procps-ng-4.0.5/src/uptime --pretty^M
up 0 minute^M
PASS: uptime pretty option
spawn /home/abuild/rpmbuild/BUILD/procps-ng-4.0.5/src/uptime --raw^M
-2147408840 55.580000 0 0.53 0.14 0.05^M
FAIL: uptime raw option
testcase ./uptime.test/uptime.exp completed in 1 seconds
Running ./vmstat.test/vmstat.exp ...

In openSUSE, I can trigger this with

osc checkout openSUSE:Factory/procps && cd $_
osc build --noservice --clean --vm-type=kvm "--build-opt=--vm-custom-opt=-rtc base=2038-01-20T00:00:00" standard

It did not fail with the previous procps-4.0.4, so this seems to be a regression in 4.0.5

Please ensure that tests keep passing in the future.