Skip to content

rust: time: add examples and tests for Delta

FUJITA Tomonori rust-for-linux 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rust: time: add examples to Delta methodsrust/kernel/time.rs+84 -00 replies
2/2rust: time: add KUnit tests for Delta boundariesrust/kernel/time.rs+63 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/2] rust: time: add examples and tests for Delta

From: FUJITA Tomonori <[email protected]>

This adds the examples and tests for Delta that I promised in the as_micros_ceil() fix thread [1].

As agreed in that thread [2], the examples show positive and negative values and how the methods saturate or round, without the boundary values. The boundary values are tested with KUnit instead, using constants in the test module.

[1] https://lore.kernel.org/rust-for-linux/[email protected]/
[2] https://lore.kernel.org/rust-for-linux/[email protected]/

FUJITA Tomonori (2):
rust: time: add examples to Delta methods
rust: time: add KUnit tests for Delta boundaries

 rust/kernel/time.rs | 147 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 147 insertions(+)

base-commit: 6b391eec2ddeb3ab2681cc5dee16d29e00202438

Signature · 1 line
2.43.0