Skip to content

add rtctime libs and rtc02 case

[email protected] ltp 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v13 patches 0 repliesSuperseded

Changes in v2 from the cover letter

1. add passing rtd_dev int tst_rtc_gettime, tst_rtc_settime, tst_rtc_clock_save and tst_rtc_clock_restore functions.

2. move check device exist functions from lib into testcase

3. rename tst_rtctime_save|tst_rtctime_restore to tst_rtc_clock_save| tst_rtc_clock_restore

4. test description and identifiers format issues.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3lib: add tst_rtctime* for rtc testinclude/tst_rtctime.h lib/tst_rtctime.c+174 -00 replies
2/3lib: implement rtc_clock_save and rtc_clock_restore functioninclude/tst_wallclock.h lib/tst_wallclock.c+48 -00 replies
3/3device-drivers/rtc: add verify rtc set time caseruntest/kernel_misc testcases/kernel/device-drivers/rtc/.gitignore testcases/kernel/device-drivers/rtc/rtc02.c+113 -00 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchCyril Hrubis
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [LTP] [PATCH V2 0/3] add rtctime libs and rtc02 case

From: Cixi Geng <[email protected]>

This file is a implementation for rtc test function
in tst_rtctime lib, support tst_rtc_gettime and tst_rtc_settime; at the same file, also add rtctime and time_t convert functions. in tst_wallclock.s, add tst_rtc_save and tst_rtc_restore for testcase used in SETUP and CLEANUP.

the rtc02 testcase is verify set rtctime a exact timestamp.

V2 changes:
1. add passing rtd_dev int tst_rtc_gettime, tst_rtc_settime, tst_rtc_clock_save and tst_rtc_clock_restore functions.

2. move check device exist functions from lib into testcase

3. rename tst_rtctime_save|tst_rtctime_restore to tst_rtc_clock_save| tst_rtc_clock_restore

4. test description and identifiers format issues.

NO chanages:
1. keep tst_rtc_gettime and tst_rtc_settime no change to "static inline"(V1) for some compile warning and referring to tst_clock_gettime in tst_clocks.h

2. in .h, use identifiers format "/* XXX /*" rather than "// XXX" for kernel checkpatch "WARNING" as follow:

```
WARNING: Improper SPDX comment style for 'include/tst_rtctime.h', please use '/*' instead
\#26: FILE: include/tst_rtctime.h:1:
+// SPDX-License-Identifier: GPL-2.0-or-later

WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
\#26: FILE: include/tst_rtctime.h:1:
+// SPDX-License-Identifier: GPL-2.0-or-later
```

Cixi Geng (3):
lib: add tst_rtctime* for rtc test
lib: implement rtc_clock_save and rtc_clock_restore function device-drivers/rtc: add verify rtc set time case

 include/tst_rtctime.h                         |  15 ++
 include/tst_wallclock.h                       |   4 +
 lib/tst_rtctime.c                             | 159 ++++++++++++++++++
 lib/tst_wallclock.c                           |  44 +++++
 runtest/kernel_misc                           |   1 +
 .../kernel/device-drivers/rtc/.gitignore      |   1 +
 testcases/kernel/device-drivers/rtc/rtc02.c   | 111 ++++++++++++
 7 files changed, 335 insertions(+)
 create mode 100644 include/tst_rtctime.h
 create mode 100644 lib/tst_rtctime.c
 create mode 100644 testcases/kernel/device-drivers/rtc/rtc02.c
Signature · 1 line
2.25.1