[rtems commit] sppps01: Improve default handler test
Sebastian Huber
sebh at rtems.org
Fri May 27 11:37:40 UTC 2022
Module: rtems
Branch: master
Commit: 34ba0e5a8e5d8f9c9ce2b10bcc4887b82130a0c1
Changeset: http://git.rtems.org/rtems/commit/?id=34ba0e5a8e5d8f9c9ce2b10bcc4887b82130a0c1
Author: Gabriel Moyano <gabriel.moyano at dlr.de>
Date: Wed May 25 14:19:11 2022 +0200
sppps01: Improve default handler test
Update #2349.
---
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 );
}
More information about the vc
mailing list