diff options
| author | Petr Mladek <pmladek@suse.com> | 2025-12-01 14:14:34 +0100 |
|---|---|---|
| committer | Petr Mladek <pmladek@suse.com> | 2025-12-01 14:14:34 +0100 |
| commit | 3869e431b51f3010f0d3bfc007c4a1b957c0ae1f (patch) | |
| tree | cae985276ee0de390f9d127147f29612385e90c4 /lib/tests | |
| parent | a9f349e3c0bebe7ae97750b32a72f452bdf707e2 (diff) | |
| parent | ace38521705bd79a47e5f46b6bae6dc044f3cfdc (diff) | |
Merge branch 'for-6.19-vsprintf-timespec64' into for-linus
Diffstat (limited to 'lib/tests')
| -rw-r--r-- | lib/tests/printf_kunit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tests/printf_kunit.c b/lib/tests/printf_kunit.c index bc54cca2d7a6..7617e5b8b02c 100644 --- a/lib/tests/printf_kunit.c +++ b/lib/tests/printf_kunit.c @@ -504,6 +504,7 @@ time_and_date(struct kunit *kunittest) }; /* 2019-01-04T15:32:23 */ time64_t t = 1546615943; + struct timespec64 ts = { .tv_sec = t, .tv_nsec = 11235813 }; test("(%pt?)", "%pt", &tm); test("2018-11-26T05:35:43", "%ptR", &tm); @@ -522,6 +523,9 @@ time_and_date(struct kunit *kunittest) test("0119-00-04 15:32:23", "%ptTsr", &t); test("15:32:23|2019-01-04", "%ptTts|%ptTds", &t, &t); test("15:32:23|0119-00-04", "%ptTtrs|%ptTdrs", &t, &t); + + test("2019-01-04T15:32:23.011235813", "%ptS", &ts); + test("1546615943.011235813", "%ptSp", &ts); } static void |
