• Prarit Bhargava's avatar
    tools, update rtctest.c to verify passage of time · 0b63accf
    Prarit Bhargava authored
    rtctest.c checks to see if PIE is functioning by testing if 20 interrupts occur
    at rates from 2HZ to 64HZ.  While this check is good, it does not check to
    see if the correct amount of time has actually passed.  This misses
    situations where the RTC may be operating at a higher or lower frequency
    than expected.
    
    This patch introduces a simple check to verify if the time passed is
    less than 10% of what was programmed into the RTC.
    Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
    Acked-by: default avatarJohn Stultz <john.stultz@linaro.org>
    Cc: corbet@lwn.net
    Cc: rtc-linux@googlegroups.com
    Cc: linux-doc@vger.kernel.org
    Cc: a.zummo@towertech.it
    Cc: prarit@redhat.com
    Cc: john.stultz@linaro.org
    Cc: shuahkh@osg.samsung.com
    Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
    0b63accf
rtctest.c 6.02 KB