summaryrefslogtreecommitdiffstats
path: root/spec/rtems/io/val/kernel.yml
blob: 11c7d5d4f4079b92d016b9f7e0a8ab7a3c529bf4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
copyrights:
- Copyright (C) 2021 embedded brains GmbH & Co. KG
enabled-by: true
links: []
test-actions:
- action-brief: |
    Call the function referenced by ${../if/bsp-output-char:/name}.
  action-code: |
    T_report_hash_sha256_update( 'X' );
    ( *BSP_output_char )( 'X' );
    T_report_hash_sha256_update( '\n' );
    ( *BSP_output_char )( '\n' );
  checks: []
  links:
  - role: validation
    uid: ../req/bsp-output-char
- action-brief: |
    If ${../if/bsp-poll-char:/name} references a function, then call it.
  action-code: |
    BSP_polling_getchar_function_type poll_char;
    int c;

    poll_char = BSP_poll_char;

    if ( poll_char != NULL ) {
      c = ( *poll_char )();
    } else {
      c = -1;
    }
  checks:
  - brief: |
      Check that the returned value is minus one or an unsigned character
      value.
    code: |
      T_step_true( ${.:/step}, c == -1 || ( c & ~0xff ) == 0 );
    links:
    - role: validation
      uid: ../req/bsp-poll-char-empty
    - role: validation
      uid: ../req/bsp-poll-char-dequeue
  links: []
test-brief: |
  Tests the functions referenced by ${../if/bsp-output-char:/name} and
  ${../if/bsp-poll-char:/name}.
test-context: []
test-context-support: null
test-description: null
test-header:
  code: null
  freestanding: true
  includes: []
  local-includes: []
  run-params: []
  target: testsuites/validation/tr-io-kernel.h
test-includes:
- rtems/bspIo.h
test-local-includes:
- tr-io-kernel.h
test-setup: null
test-stop: null
test-support: null
test-target: testsuites/validation/tr-io-kernel.c
test-teardown: null
type: test-case