[PATCH 1/1] sppps01: Improve default handler test
Gabriel Moyano
gabriel.moyano at dlr.de
Wed May 25 12:19:11 UTC 2022
---
testsuites/sptests/sppps01/init.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/testsuites/sptests/sppps01/init.c b/testsuites/sptests/sppps01/init.c
index 850c21f1f2..996a3a1e16 100644
--- a/testsuites/sptests/sppps01/init.c
+++ b/testsuites/sptests/sppps01/init.c
@@ -66,6 +66,12 @@ T_TEST_CASE( WaitPPSEventDefaultHandler )
pps_init_abi( &pps_dev.pps );
pps_dev.pps.ppsparam.mode = PPS_CAPTUREASSERT;
+ /* If no timeout is requested, pps_fetch() doesn't call the default handler */
+ memset( &fetch, 0, sizeof( fetch ) );
+ status = pps_ioctl( PPS_IOC_FETCH, (caddr_t)&fetch, &pps_dev.pps );
+ T_eq_int( status, 0 );
+
+ fetch.timeout.tv_sec = 1;
status = pps_ioctl( PPS_IOC_FETCH, (caddr_t)&fetch, &pps_dev.pps );
T_eq_int( status, ETIMEDOUT );
}
--
2.25.1
More information about the devel
mailing list