]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use full date & time when checking for coredumps
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 5 Jan 2022 11:06:52 +0000 (12:06 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 5 Jan 2022 16:18:12 +0000 (01:18 +0900)
Otherwise we might hit a window where the coredump happens before
midnight, but we check for it after midnight, which yields no results.

E.g.:

```
$ coredumpctl --no-legend --no-pager --file system.journal
Wed 2022-01-05 01:00:06 CET 359 0 0 SIGABRT journal /usr/bin/udevadm n/a
$ coredumpctl --since 23:59:55 --no-legend --no-pager --file system.journal
No coredumps found.
$ coredumpctl --since "2022-01-04 23:59:59" --no-legend --no-pager --file system.journal
Wed 2022-01-05 01:00:06 CET 359 0 0 SIGABRT journal /usr/bin/udevadm n/a
```

test/units/testsuite-17.03.sh

index fecfd17952fb88825a9897abdec3b5545d77339f..91f0211bca17e1b473de1c4405287f259b379b79 100755 (executable)
@@ -26,7 +26,7 @@ teardown() {
 }
 
 run_test() {
-    since="$(date +%T)"
+    since="$(date '+%F %T')"
 
     SYSTEMD_LOG_LEVEL=debug udevadm trigger --verbose --settle --action add /dev/null