Home | History | Annotate | Download | only in patches
      1 From bf824fdba34b5ea905c6541c9205fef3369cfa5d Mon Sep 17 00:00:00 2001
      2 From: Steve Muckle <smuckle (a] google.com>
      3 Date: Mon, 30 Oct 2017 10:43:28 -0700
      4 Subject: [PATCH] ANDROID: do not run update, periodic IRQ tests on Android
      5 
      6 Android does not require the update or periodic IRQs from the RTC, so do
      7 not test this.
      8 
      9 Bug: 31578457
     10 Test: run vts-kernel -m VtsKernelLinuxKselftestStaging
     11 Change-Id: I26a60224073724297763489a90dd163f5f769df8
     12 Signed-off-by: Steve Muckle <smuckle (a] google.com>
     13 ---
     14  tools/testing/selftests/timers/rtctest.c | 14 ++++++++++++++
     15  1 file changed, 14 insertions(+)
     16 
     17 diff --git a/tools/testing/selftests/timers/rtctest.c b/tools/testing/selftests/timers/rtctest.c
     18 index f61170f7b024..95f68ed9ceb1 100644
     19 --- a/tools/testing/selftests/timers/rtctest.c
     20 +++ b/tools/testing/selftests/timers/rtctest.c
     21 @@ -122,6 +122,13 @@ int main(int argc, char **argv)
     22  
     23  	fprintf(stderr, "\n\t\t\tRTC Driver Test Example.\n\n");
     24  
     25 +#ifdef __ANDROID__
     26 +	/*
     27 +	 * Android does not rely on update interrupts so do not test them.
     28 +	 */
     29 +	goto test_READ;
     30 +#endif
     31 +
     32  	/* Turn on update interrupts (one per second) */
     33  	retval = ioctl(fd, RTC_UIE_ON, 0);
     34  	if (retval == -1) {
     35 @@ -259,6 +266,13 @@ test_READ:
     36  		exit(errno);
     37  	}
     38  
     39 +#ifdef __ANDROID__
     40 +	/*
     41 +	 * Android does not rely on periodic IRQs so do not test them.
     42 +	 */
     43 +	goto done;
     44 +#endif
     45 +
     46  test_PIE:
     47  	/* Read periodic IRQ rate */
     48  	retval = ioctl(fd, RTC_IRQP_READ, &tmp);
     49 -- 
     50 2.16.0.rc1.238.g530d649a79-goog
     51 
     52