From: Filip Bozuta <fbozuta1@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/3] testcases/kernel/syscalls/ioctl: Add test for RTC ioctls used to read and set RTC time
Date: Wed, 22 Apr 2020 17:28:39 +0200 [thread overview]
Message-ID: <20200422152841.13432-2-fbozuta1@gmail.com> (raw)
In-Reply-To: <20200422152841.13432-1-fbozuta1@gmail.com>
This patch tests functionalities of following ioctls:
RTC_RD_TIME - Getting RTC time
Returns this RTC's time in the following structure:
struct rtc_time {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday; /* unused */
int tm_yday; /* unused */
int tm_isdst; /* unused */
};
The fields in this structure have the same meaning and
ranges as the tm structure described in gmtime man page.
A pointer to this structure should be passed as the third
ioctl argument.
RTC_SET_TIME - Setting RTC time
Sets this RTC's time to the time specified by the rtc_time
structure pointed to by the third ioctl argument. To set the
RTC's time the process must be privileged (i.e., have the
CAP_SYS_TIME capability).
Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com>
---
runtest/syscalls | 2 +
testcases/kernel/syscalls/ioctl/.gitignore | 1 +
testcases/kernel/syscalls/ioctl/ioctl_rtc01.c | 112 ++++++++++++++++++
3 files changed, 115 insertions(+)
create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_rtc01.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-testcases-kernel-syscalls-ioctl-Add-test-for-RTC-ioc.patch
Type: text/x-patch
Size: 4058 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200422/447e18cc/attachment-0001.bin>
next prev parent reply other threads:[~2020-04-22 15:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 15:28 [LTP] [PATCH 0/3] Add tests for a group of real time clock ioctls Filip Bozuta
2020-04-22 15:28 ` Filip Bozuta [this message]
2020-04-23 5:57 ` [LTP] ?==?utf-8?q? ?==?utf-8?q? [PATCH 1/3]?==?utf-8?q? testcases/kernel/syscalls/ioctl: Add test for RTC ioctls used to read and set RTC time Aleksandar Markovic
2020-04-22 15:28 ` [LTP] [PATCH 2/3] testcases/kernel/syscalls/ioctl: Add test for RTC ioctls used to read and set RTC alarm time Filip Bozuta
2020-04-23 6:01 ` [LTP] ?==?utf-8?q? ?==?utf-8?q? [PATCH 2/3]?==?utf-8?q? " Aleksandar Markovic
2020-04-22 15:28 ` [LTP] [PATCH 3/3] testcases/kernel/syscalls/ioctl: Add test for RTC ioctls used to turn on/off RTC interrupts Filip Bozuta
2020-04-23 5:43 ` [LTP] ?==?utf-8?q? ?==?utf-8?q? [PATCH 3/3]?==?utf-8?q? " Aleksandar Markovic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200422152841.13432-2-fbozuta1@gmail.com \
--to=fbozuta1@gmail.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox