1*49cdfc7eSAndroid Build Coastguard Workerrtc-test.c : Test the Real Time Clock driver 2*49cdfc7eSAndroid Build Coastguard Worker 3*49cdfc7eSAndroid Build Coastguard WorkerTests supported as of now 4*49cdfc7eSAndroid Build Coastguard Worker-------------------------- 5*49cdfc7eSAndroid Build Coastguard Worker1. Read test : This reads the time/date from the RTC 6*49cdfc7eSAndroid Build Coastguard Worker ioctls tested :- RTC_RD_TIME. 7*49cdfc7eSAndroid Build Coastguard Worker 8*49cdfc7eSAndroid Build Coastguard Worker2. Alarm Test: Sets the alarm to 5 seconds in future and makes sure it rings. 9*49cdfc7eSAndroid Build Coastguard Worker ioctls tested :- RTC_ALM_SET, RTC_ALM_READ, RTC_AIE_ON, RTC_AIE_OFF. 10*49cdfc7eSAndroid Build Coastguard Worker 11*49cdfc7eSAndroid Build Coastguard Worker3. Update interrupts test : Sets Update interrupts enable on, waits for five 12*49cdfc7eSAndroid Build Coastguard Worker interrupts and then turns it off. 13*49cdfc7eSAndroid Build Coastguard Worker ioctls tested :- RTC_UIE_ON, RTC_UIE_OFF. 14*49cdfc7eSAndroid Build Coastguard Worker 15*49cdfc7eSAndroid Build Coastguard Worker 16*49cdfc7eSAndroid Build Coastguard WorkerHow to Build 17*49cdfc7eSAndroid Build Coastguard Worker------------ 18*49cdfc7eSAndroid Build Coastguard WorkerYou have to build the complete LTP package before trying to build these tests. 19*49cdfc7eSAndroid Build Coastguard WorkerAfter building the complete LTP sources enter this directory and issue a 'make'. 20*49cdfc7eSAndroid Build Coastguard Worker 21*49cdfc7eSAndroid Build Coastguard WorkerHow to Run 22*49cdfc7eSAndroid Build Coastguard Worker---------- 23*49cdfc7eSAndroid Build Coastguard Worker 24*49cdfc7eSAndroid Build Coastguard Worker The tests assume the rtc device node to be "/dev/rtc". If you have a 25*49cdfc7eSAndroid Build Coastguard Workerdifferent node run the test with the name of the node as a parameter. 26*49cdfc7eSAndroid Build Coastguard Worker 27*49cdfc7eSAndroid Build Coastguard WorkerEg. If your node is /dev/rtc0, then run the test as 28*49cdfc7eSAndroid Build Coastguard Worker 29*49cdfc7eSAndroid Build Coastguard Worker $ ./rtc-test /dev/rtc0 30