summaryrefslogtreecommitdiffstats
path: root/sys-utils/dmesg.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/dmesg.c')
-rw-r--r--sys-utils/dmesg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index b56199f36..a17cc70af 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -1378,8 +1378,13 @@ int main(int argc, char *argv[])
is_timefmt(&ctl, CTIME) ||
is_timefmt(&ctl, ISO8601)) {
+#ifdef TEST_DMESG
+ ctl.boot_time.tv_sec = 1234567890;
+ ctl.boot_time.tv_usec = 123456;
+#else
if (get_boot_time(&ctl.boot_time) != 0)
ctl.time_fmt = DMESG_TIMEFTM_NONE;
+#endif
}
if (delta)