[PATCH 0/1] posixtimer01 test questions and patch
Martin Erik Werner
martinerikwerner.aac at gmail.com
Tue May 15 09:21:54 UTC 2018
When running the testsuites/psxtests/psxtimer01/ tests on our or1k
board, I've noticed a common 10ms (one clock tick) time difference when
measuring the re-armed time value in task A and C, which causes the
posixtimer01 test to report failure:
(...)
if (sigwait(&set,&received_sig) == -1) {
perror ("Error in sigwait\n");
}
if (timer_gettime(timer_id, &timerdata) == -1) {
perror ("Error in timer_gettime\n");
rtems_test_exit(0);
}
if (! _Timespec_Equal_to( &timerdata.it_value, &my_period )){
perror ("Error in Task A timer_gettime\n");
}
(...)
Given that this time value check is disabled in task B:
#if 0
/*
* It is not an error if they are not equal. A clock tick could occur
* and thus they are close but not equal. Can we test for this?
*/
if ( !_Timespec_Equal_to( &timerdata.it_value, &my_period) ){
printf( "NOT EQUAL %d:%d != %d:%d\n",
timerdata.it_value.tv_sec,
timerdata.it_value.tv_nsec,
my_period.tv_sec,
my_period.tv_nsec
);
rtems_test_exit(0);
}
#endif
does this check still belong as a certain failure in task A and C?
I've made a modification to the failure printout in order to avoid using unset
errno, and to provide information about the time difference, which might be
interesting, if these checks are still valid as certain failures:
Martin Erik Werner (1):
Fix and extend error message in posix timer test
testsuites/psxtests/psxtimer01/psxtimer.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--
2.11.0
More information about the devel
mailing list