logoalt Hacker News

mcculleyyesterday at 9:11 PM4 repliesview on HN

> It will not be caught in development testing — who runs a test for 50 days?

You don't have to run the system for 50 days. You can simulate the environment and tick the clock faster. Many high reliability systems are tested this way.


Replies

dezgegyesterday at 11:09 PM

IIRC the initial value for the jiffies time counter in Linux kernel is initialized at boot time to something like five minutes before the wraparound point, precisely to catch this kind of issues.

show 1 reply
hombre_fatalyesterday at 9:40 PM

It uses a hardware clock, one that pauses during sleep. There is no tick.

If you wanted to see how time impacts the program, you'd prob change fns like calculate_tcp_clock to take uptime as an argument so that you could sanity check it.

show 2 replies
sho_hnyesterday at 9:16 PM

Heck, many video games are tested this way.