summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-10-13 13:38:59 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-10-13 13:38:59 +0200
commit756b38609ea35b4b3f1544588c43b40c93160755 (patch)
treedb22c051d8827005491cd283d3265dbd70f5ef8e
parenta29dc105ffcee1531781b55bad450188fb7988f4 (diff)
testsuites/validation/tc-timecounter-get.cqual-43
-rw-r--r--testsuites/validation/tc-timecounter-get.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/testsuites/validation/tc-timecounter-get.c b/testsuites/validation/tc-timecounter-get.c
index 1124752995..7ab746ab86 100644
--- a/testsuites/validation/tc-timecounter-get.c
+++ b/testsuites/validation/tc-timecounter-get.c
@@ -403,20 +403,25 @@ static T_interrupt_test_state InterruptCoarse( void *arg )
return T_INTERRUPT_TEST_LATE;
}
-static void InterruptTest(
+static bool InterruptTest(
const T_interrupt_test_config *config,
void *arg,
uint32_t iterations
)
{
uint32_t i;
+ bool ok;
+
+ ok = false;
for ( i = 0; i < iterations; ++i ) {
T_interrupt_test_state test_state;
test_state = T_interrupt_test( config, arg );
- T_eq_int( test_state, T_INTERRUPT_TEST_DONE );
+ ok = ok || test_state == T_INTERRUPT_TEST_DONE;
}
+
+ return ok;
}
/**
@@ -446,49 +451,49 @@ static void ScoreTimecounterValGet_Action_0( void )
* change in the timehand generation number.
*/
config.action = ActionRealtime;
- InterruptTest( &config, tc, 1 );
+ T_true( InterruptTest( &config, tc, 1 ) );
/*
* Try to interrupt the rtems_clock_get_realtime_bintime() directive to
* provoke a change in the timehand generation number.
*/
config.action = ActionRealtimeBintime;
- InterruptTest( &config, tc, 1 );
+ T_true( InterruptTest( &config, tc, 1 ) );
/*
* Try to interrupt the rtems_clock_get_realtime_timeval() directive to
* provoke a change in the timehand generation number.
*/
config.action = ActionRealtimeTimeval;
- InterruptTest( &config, tc, 1 );
+ T_true( InterruptTest( &config, tc, 1 ) );
/*
* Try to interrupt the rtems_clock_get_monotonic() directive to provoke a
* change in the timehand generation number.
*/
config.action = ActionMonotonic;
- InterruptTest( &config, tc, 1 );
+ T_true( InterruptTest( &config, tc, 1 ) );
/*
* Try to interrupt the rtems_clock_get_monotonic_bintime() directive to
* provoke a change in the timehand generation number.
*/
config.action = ActionMonotonicBintime;
- InterruptTest( &config, tc, 1 );
+ T_true( InterruptTest( &config, tc, 1 ) );
/*
* Try to interrupt the rtems_clock_get_monotonic_sbintime() directive to
* provoke a change in the timehand generation number.
*/
config.action = ActionMonotonicSbintime;
- InterruptTest( &config, tc, 1 );
+ T_true( InterruptTest( &config, tc, 1 ) );
/*
* Try to interrupt the rtems_clock_get_monotonic_timeval() directive to
* provoke a change in the timehand generation number.
*/
config.action = ActionMonotonicTimeval;
- InterruptTest( &config, tc, 1 );
+ T_true( InterruptTest( &config, tc, 1 ) );
/*
* Prepare for the coarse get time directives.
@@ -500,63 +505,63 @@ static void ScoreTimecounterValGet_Action_0( void )
* provoke a change in the timehand generation number.
*/
config.action = ActionCoarseRealtime;
- InterruptTest( &config, tc, 10 );
+ T_true( InterruptTest( &config, tc, 10 ) );
/*
* Try to interrupt the rtems_clock_get_realtime_coarse_bintime() directive
* to provoke a change in the timehand generation number.
*/
config.action = ActionCoarseRealtimeBintime;
- InterruptTest( &config, tc, 10 );
+ T_true( InterruptTest( &config, tc, 10 ) );
/*
* Try to interrupt the rtems_clock_get_realtime_coarse_timeval() directive
* to provoke a change in the timehand generation number.
*/
config.action = ActionCoarseRealtimeTimeval;
- InterruptTest( &config, tc, 10 );
+ T_true( InterruptTest( &config, tc, 10 ) );
/*
* Try to interrupt the rtems_clock_get_monotonic_coarse() directive to
* provoke a change in the timehand generation number.
*/
config.action = ActionCoarseMonotonic;
- InterruptTest( &config, tc, 10 );
+ T_true( InterruptTest( &config, tc, 10 ) );
/*
* Try to interrupt the rtems_clock_get_monotonic_coarse_bintime() directive
* to provoke a change in the timehand generation number.
*/
config.action = ActionCoarseMonotonicBintime;
- InterruptTest( &config, tc, 10 );
+ T_true( InterruptTest( &config, tc, 10 ) );
/*
* Try to interrupt the rtems_clock_get_monotonic_coarse_timeval() directive
* to provoke a change in the timehand generation number.
*/
config.action = ActionCoarseMonotonicTimeval;
- InterruptTest( &config, tc, 10 );
+ T_true( InterruptTest( &config, tc, 10 ) );
/*
* Try to interrupt the rtems_clock_get_boot_time() directive to provoke a
* change in the timehand generation number.
*/
config.action = ActionBootTime;
- InterruptTest( &config, tc, 10 );
+ T_true( InterruptTest( &config, tc, 10 ) );
/*
* Try to interrupt the rtems_clock_get_boot_time_bintime() directive to
* provoke a change in the timehand generation number.
*/
config.action = ActionBootTimeBintime;
- InterruptTest( &config, tc, 10 );
+ T_true( InterruptTest( &config, tc, 10 ) );
/*
* Try to interrupt the rtems_clock_get_boot_time_timeval() directive to
* provoke a change in the timehand generation number.
*/
config.action = ActionBootTimeTimeval;
- InterruptTest( &config, tc, 10 );
+ T_true( InterruptTest( &config, tc, 10 ) );
}
/**