Add year2038 test to Fuego

Revision as of 09:39, 19 September 2017 by Tim Bird (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Create a year-2038 test for Fuego
Tim Bird


The year 2038 is approaching (as is every other year in the future). Linux/Unix 32-bit timestamps expressed in seconds since the epoch (Jan 1 1970) will roll over on that year, possibly causing problems. See

It would be good to test for issues with this, and start to fix any problems found, now.

The scope of this test would be 2-fold:

  • 1 - test that the kernel and C libraries on a target board support correct operation of timekeeping mechanisms and APIs after the clock rollover date in 2038.
  • 2 - test that programs on the target (built from source in the distribution used on the target) do not use any data structure or code methods that will result in failures after the clock rollover date

This is probably best structured as 2 tests: One would be a regular test of functionality on a board. The second would require specifying the location of source code (likely on the host, but possibly somewhere on the Internet), downloading it (if needed) and scanning it with source scanning tools.

The goal of the second test would be to find instances in the source where time values were used, and check if they are being used in a year-2038-safe manner (whatever that means). A portion of this work would be finding out what usages of time values are incorrect, and trying to find ways to identify those programatically. It might involve using scanning tools like coccinelle, to find code patterns that are problematical.

Related work

Arnd Bergmann is a leading kernel expert on this topic. He gave a talk at Linaro Connect 2017 in Budapest. See his session at: and an report on it here:

There's a page with some very small test snippets at:

Article on the problem:



Contractor Candidates