Add year2038 test to Fuego

From eLinux.org
Revision as of 12:12, 15 September 2017 by Tim Bird (talk | contribs) (Add more related work, and shorten paragraphs (so page is e-mail-able.)
Jump to: navigation, search
Summary
Create a year-2038 test for Fuego
Proposer
Tim Bird

Description

The year 2038 is approach (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 https://en.wikipedia.org/wiki/Year_2038_problem

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: http://connect.linaro.org/resource/bud17/bud17-512/ and an lwn.net report on it here: https://lwn.net/Articles/717076/

There's a page with some very small test snippets at: http://maul.deepsky.com/~merovech/2038.html

Article on the problem: https://www.codeproject.com/Articles/25848/The-Year-Bug-Y-K-Problem-Many-of-your-appli

Scope

Unscoped

Contractor Candidates

Konsulko

Comments