power-management/rtc fails on arm

Bug #1184733 reported by Daniel Manrique
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Medium
Brendan Donegan

Bug Description

The test simply verifies existence of /dev/rtc:

test -e /dev/rtc || ( echo "ERROR: Real Time Clock not found" >&2 && exit 1 )

On a desktop system /dev/rtc is a symlink to /dev/rtc0. However on arm there's no symlink, so only /dev/rtc0 exists. So, even if the system does have an rtc device, the test fails to account for this naming change and detect it properly.

Related branches

tags: added: tay
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Getting confirmation that /dev/rtc0 is just as good and finding out why there is no symlink (udev rules messed up?). Maybe we can just change it to 'test -e /dev/rtc*'?

Changed in checkbox:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

My x86 system has these two udev rules;

rules.d/50-udev-default.rules:SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
rules.d/50-udev-default.rules:SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
On Calxeda (highbank) there is:

rules.d/50-udev-default.rules:SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc"

Apparently rtc_cmos is not the driver on highbank so this may be a udev bug

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

We could easily change this to look for /dev/rtc* rather than /dev/rtc but the question is, do we want to?

Revision history for this message
dann frazier (dannf) wrote :

This is working for me on saucy/exynos. I think the first rule is what is making the link for me. Question is, why isn't this working on highbank? What's the output of 'find /sys | grep hctosys' on highbank?

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Looks like this is working on all platforms in saucy, so unless we want to backport the udev fix this bug can be called closed.

Changed in checkbox:
status: Triaged → Invalid
status: Invalid → Won't Fix
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Seems like we have to revive this bug - we aren't testing rtc properly so need to do a few updates.

Changed in checkbox:
status: Won't Fix → New
status: New → Confirmed
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

We can use http://manpages.ubuntu.com/manpages/raring/en/man8/hwclock.8.html to do a proper test.

We should also look in /sys/class/rtc to see if the system has one, as this is the authoritative source

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

This test needs to be refactored to work properly

Changed in checkbox:
status: Confirmed → In Progress
assignee: nobody → Brendan Donegan (brendan-donegan)
Daniel Manrique (roadmr)
Changed in checkbox:
status: In Progress → Fix Committed
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.