summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/test.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-17 19:42:32 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-23 09:27:47 +0200
commitcc3fd8fcf182cfa35388fc79c14e784a968570ae (patch)
treeb1d2c4cb445837ad51f48a84d893ed05f3d4a4fa /cpukit/include/rtems/test.h
parentlibtest: Add rtems_test_run() (diff)
downloadrtems-cc3fd8fcf182cfa35388fc79c14e784a968570ae.tar.bz2
libtest: Add T_interrupt_test()
Update #3199.
Diffstat (limited to '')
-rw-r--r--cpukit/include/rtems/test.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/cpukit/include/rtems/test.h b/cpukit/include/rtems/test.h
index 5d4c676d16..a7955c735a 100644
--- a/cpukit/include/rtems/test.h
+++ b/cpukit/include/rtems/test.h
@@ -2360,6 +2360,36 @@ void T_busy(uint_fast32_t);
uint_fast32_t T_get_one_clock_tick_busy(void);
+typedef enum {
+ T_INTERRUPT_TEST_INITIAL,
+ T_INTERRUPT_TEST_ACTION,
+ T_INTERRUPT_TEST_BLOCKED,
+ T_INTERRUPT_TEST_CONTINUE,
+ T_INTERRUPT_TEST_DONE,
+ T_INTERRUPT_TEST_EARLY,
+ T_INTERRUPT_TEST_INTERRUPT,
+ T_INTERRUPT_TEST_LATE,
+ T_INTERRUPT_TEST_TIMEOUT
+} T_interrupt_test_state;
+
+typedef struct {
+ void (*prepare)(void *);
+ void (*action)(void *);
+ T_interrupt_test_state (*interrupt)(void *);
+ void (*blocked)(void *);
+ uint32_t max_iteration_count;
+} T_interrupt_test_config;
+
+T_interrupt_test_state T_interrupt_test_change_state(T_interrupt_test_state,
+ T_interrupt_test_state);
+
+T_interrupt_test_state T_interrupt_test_get_state(void);
+
+void T_interrupt_test_busy_wait_for_interrupt(void);
+
+T_interrupt_test_state T_interrupt_test(const T_interrupt_test_config *config,
+ void *arg);
+
void T_report_hash_sha256(T_event, const char *);
void T_check_heap(T_event, const char *);