diff options
author | Gabriel Moyano <gabriel.moyano@dlr.de> | 2022-05-25 14:19:11 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-27 13:42:56 +0200 |
commit | 34ba0e5a8e5d8f9c9ce2b10bcc4887b82130a0c1 (patch) | |
tree | d807800bb9b1010f3d886b5441726d0ed82bc7eb /testsuites/sptests | |
parent | score: Fix pps_fetch() (diff) | |
download | rtems-34ba0e5a8e5d8f9c9ce2b10bcc4887b82130a0c1.tar.bz2 |
sppps01: Improve default handler test
Update #2349.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r-- | testsuites/sptests/sppps01/init.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 ); } |