I get the following result when i run "rtctest"
please see the following....
-----------------x------------------------x-----------------
$pwd
/home/jeffrin/upstream/linux-kselftest/tools/testing/selftests/rtc
$./rtctest
[==========] Running 7 tests from 2 test cases.
[ RUN ] rtc.date_read
rtctest.c:32:rtc.date_read:Expected -1 (18446744073709551615) !=
self->fd (18446744073709551615)
rtc.date_read: Test terminated by assertion
[ FAIL ] rtc.date_read
[ RUN ] rtc.uie_read
rtctest.c:32:rtc.uie_read:Expected -1 (18446744073709551615) !=
self->fd (18446744073709551615)
rtc.uie_read: Test terminated by assertion
[ FAIL ] rtc.uie_read
[ RUN ] rtc.uie_select
rtctest.c:32:rtc.uie_select:Expected -1 (18446744073709551615) !=
self->fd (18446744073709551615)
rtc.uie_select: Test terminated by assertion
[ FAIL ] rtc.uie_select
[ RUN ] rtc.alarm_alm_set
rtctest.c:32:rtc.alarm_alm_set:Expected -1 (18446744073709551615) !=
self->fd (18446744073709551615)
rtc.alarm_alm_set: Test terminated by assertion
[ FAIL ] rtc.alarm_alm_set
[ RUN ] rtc.alarm_wkalm_set
rtctest.c:32:rtc.alarm_wkalm_set:Expected -1 (18446744073709551615) !=
self->fd (18446744073709551615)
rtc.alarm_wkalm_set: Test terminated by assertion
[ FAIL ] rtc.alarm_wkalm_set
[ RUN ] rtc.alarm_alm_set_minute
rtctest.c:32:rtc.alarm_alm_set_minute:Expected -1
(18446744073709551615) != self->fd (18446744073709551615)
rtc.alarm_alm_set_minute: Test terminated by assertion
[ FAIL ] rtc.alarm_alm_set_minute
[ RUN ] rtc.alarm_wkalm_set_minute
rtctest.c:32:rtc.alarm_wkalm_set_minute:Expected -1
(18446744073709551615) != self->fd (18446744073709551615)
rtc.alarm_wkalm_set_minute: Test terminated by assertion
[ FAIL ] rtc.alarm_wkalm_set_minute
[==========] 0 / 7 tests passed.
[ FAILED ]
$
-------------------x-----------------------x-----------------
$uname -a
Linux debian 5.2.0-rc1+ #2 SMP Thu May 23 20:21:40 IST 2019 x86_64 GNU/Linux
$
two files attached
--
software engineer
rajagiri school of engineering and technology
On 23/05/2019 22:29:36+0530, Jeffrin Thalakkottoor wrote:
> I get the following result when i run "rtctest"
> please see the following....
> -----------------x------------------------x-----------------
> $pwd
> /home/jeffrin/upstream/linux-kselftest/tools/testing/selftests/rtc
> $./rtctest
> [==========] Running 7 tests from 2 test cases.
> [ RUN ] rtc.date_read
> rtctest.c:32:rtc.date_read:Expected -1 (18446744073709551615) !=
> self->fd (18446744073709551615)
> rtc.date_read: Test terminated by assertion
Your user probably doesn't have access to the rtc device file.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
On Thu, May 23, 2019 at 11:17 PM Alexandre Belloni
<[email protected]> wrote:
> Your user probably doesn't have access to the rtc device file.
anyway thanks related
Following is the result with sudo....
------------------------x--------------------------------------x----------------------------
$sudo ./rtctest
[sudo] password for jeffrin:
[==========] Running 7 tests from 2 test cases.
[ RUN ] rtc.date_read
rtctest.c:49:rtc.date_read:Current RTC date/time is 23/05/2019 20:49:49.
[ OK ] rtc.date_read
[ RUN ] rtc.uie_read
[ OK ] rtc.uie_read
[ RUN ] rtc.uie_select
[ OK ] rtc.uie_select
[ RUN ] rtc.alarm_alm_set
rtctest.c:137:rtc.alarm_alm_set:Alarm time now set to 20:49:58.
rtctest.c:156:rtc.alarm_alm_set:data: 1a0
[ OK ] rtc.alarm_alm_set
[ RUN ] rtc.alarm_wkalm_set
rtctest.c:195:rtc.alarm_wkalm_set:Alarm time now set to 23/05/2019 20:50:01.
[ OK ] rtc.alarm_wkalm_set
[ RUN ] rtc.alarm_alm_set_minute
rtctest.c:239:rtc.alarm_alm_set_minute:Alarm time now set to 20:51:00.
Alarm clock
$rtctest.c:258:rtc.alarm_alm_set_minute:data: 1a0
$
------------------------x--------------------------------------x----------------------------
--
software engineer
rajagiri school of engineering and technology
On 24/05/2019 02:36:42+0530, Jeffrin Thalakkottoor wrote:
> On Thu, May 23, 2019 at 11:17 PM Alexandre Belloni
> <[email protected]> wrote:
> > Your user probably doesn't have access to the rtc device file.
> anyway thanks related
> Following is the result with sudo....
> ------------------------x--------------------------------------x----------------------------
> $sudo ./rtctest
> [sudo] password for jeffrin:
> [==========] Running 7 tests from 2 test cases.
> [ RUN ] rtc.date_read
> rtctest.c:49:rtc.date_read:Current RTC date/time is 23/05/2019 20:49:49.
> [ OK ] rtc.date_read
> [ RUN ] rtc.uie_read
> [ OK ] rtc.uie_read
> [ RUN ] rtc.uie_select
> [ OK ] rtc.uie_select
> [ RUN ] rtc.alarm_alm_set
> rtctest.c:137:rtc.alarm_alm_set:Alarm time now set to 20:49:58.
> rtctest.c:156:rtc.alarm_alm_set:data: 1a0
> [ OK ] rtc.alarm_alm_set
> [ RUN ] rtc.alarm_wkalm_set
> rtctest.c:195:rtc.alarm_wkalm_set:Alarm time now set to 23/05/2019 20:50:01.
> [ OK ] rtc.alarm_wkalm_set
> [ RUN ] rtc.alarm_alm_set_minute
> rtctest.c:239:rtc.alarm_alm_set_minute:Alarm time now set to 20:51:00.
> Alarm clock
> $rtctest.c:258:rtc.alarm_alm_set_minute:data: 1a0
>
I just sent a fix for that timeout issue.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
On Fri, May 24, 2019 at 4:22 AM Alexandre Belloni
<[email protected]> wrote:
> I just sent a fix for that timeout issue.
anyway thanks related to that
shall i send a selftest fix that bail out in the test program if the
user does not have root privileges ?
--
software engineer
rajagiri school of engineering and technology
On 24/05/2019 19:23:57+0530, Jeffrin Thalakkottoor wrote:
> On Fri, May 24, 2019 at 4:22 AM Alexandre Belloni
> <[email protected]> wrote:
> > I just sent a fix for that timeout issue.
>
> anyway thanks related to that
> shall i send a selftest fix that bail out in the test program if the
> user does not have root privileges ?
>
No, it bails out just fine.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com