On Thu, Jan 12, 2023 at 09:36:39AM -0500, Colin Walters wrote:
Ideally, we'd have a mechanism to define timeouts like this somehow relative to system speed (throughput) not simple wall clock time.
That's a nice idea. Meson has '-t' that is a multiplier for test timeouts and it's quite useful. I guess we could add something like this in systemd (with the usual trifecta of a config file setting, and commandline and kernel commandline options).
Another option is for things that have hard-to-predict timeout needs to extend the timeout dynamically using sd_notify with EXTEND_TIMEOUT_USEC=…. [1] It's a bit more work for the service, but is a much more flexible solution.
[1] https://www.freedesktop.org/software/systemd/man/sd_notify.html#EXTEND_TIMEO...
Zbyszek