diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-09-18 08:51:03 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-09-18 08:52:01 +0200 |
commit | 8d4b2696671fd43d3fc651433fd7d40d6bdcade8 (patch) | |
tree | a944cfce2b448b58c12f65bdab44b3c3d1aabc3a /spec/rtems | |
parent | spec: rtems_configuration_get_interrupt_stack_size() (diff) | |
download | rtems-central-8d4b2696671fd43d3fc651433fd7d40d6bdcade8.tar.bz2 |
spec: Improve RTEMS_DEFINE_GLOBAL_SYMBOL() tests
Assign the symbol address to an object. Check that it has the expected
value.
Diffstat (limited to 'spec/rtems')
-rw-r--r-- | spec/rtems/basedefs/val/basedefs.yml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/rtems/basedefs/val/basedefs.yml b/spec/rtems/basedefs/val/basedefs.yml index a0732956..b48d8301 100644 --- a/spec/rtems/basedefs/val/basedefs.yml +++ b/spec/rtems/basedefs/val/basedefs.yml @@ -1357,6 +1357,21 @@ test-actions: - role: validation uid: ../req/zero-length-array-0 links: [] +- action-brief: | + Use the ${../if/define-global-symbol:/name} macro at the beginning of this + file and assign the address of the symbol to an object. + action-code: | + /* No action */ + checks: + - brief: | + Check that the ${../if/define-global-symbol:/name} macro defines a global + symbol with the correct value. + code: | + T_step_eq_uptr( ${.:/step}, (uintptr_t) global_symbol_2_object, 0x123 ); + links: + - role: validation + uid: ../req/define-global-symbol-1 + links: [] test-brief: | Tests the basedefs macros of the Classic API. test-context: [] @@ -1469,6 +1484,12 @@ test-support: | RTEMS_SYMBOL_NAME( global_symbol_base ) + GLOBAL_SYMBOL_VALULE( abc ) ); + RTEMS_DECLARE_GLOBAL_SYMBOL( global_symbol_2 ); + + RTEMS_DEFINE_GLOBAL_SYMBOL( global_symbol_2, 0x123 ); + + static const char * const volatile global_symbol_2_object = global_symbol_2; + static int deprecated_func( int i ) RTEMS_DEPRECATED; static int deprecated_func( int i ) { |