1. ferrocene-self-test
tool¶
The tool is used to ensure that the Ferrocene toolchain is installed correctly. |
The tool should be executed on any of the host platforms listed in Compilation targets overview. |
The tool should only execute with success if it was distributed with the same Ferrocene toolchain that it is checking. |
The tool should be executed on the command line. |
The tool accepts no command line arguments, and quits with a fail exit status when they are present. |
The tool displays the checks it performs, and quits with a fail exit status when any of the checks fails. |
1.1. Checks for executables¶
Requirement: REQ_0OAUY3U
|
These executables should be checked:
|
Requirement: REQ_N1VBW46
|
The executable should exist in the |
Requirement: REQ_R2UQ8D3
|
The executable should be a regular file. |
Requirement: REQ_NUP1G0D
|
The executable should have read and execute permissions set for all users. |
Requirement: REQ_GVLWOTQ
|
Check the behavior of |
Requirement: REQ_6OAFM70
|
The executable should exit successfully. |
Requirement: REQ_ABPRHHQ
|
The output of the executable should be UTF-8 text. |
Requirement: REQ_SL5USTK
|
The output of the executable should have at least 3 key-value pairs,
with these 3 keys: |
1.2. Checks for targets¶
Note
In the subsections below, we have these substitutions:
$target
refers to any of the targets listed$hash
is a 16 character hexadecimal string
1.2.1. All targets¶
Note
These checks are for all locally-installed targets listed in Compilation targets overview.
Requirement: REQ_0640QY8
|
Inside of
|
Requirement: REQ_XWYY918
|
The files should exist. |
Requirement: REQ_TI55HCF
|
The files should not have duplicates, which can happen if the |
1.2.2. Targets with std
¶
Note
These checks are for all locally-installed targets which are also marked as having Full standard library support in Compilation targets overview.
Requirement: REQ_RUCUMJJ
|
Inside of
|
Requirement: REQ_GAPK9QF
|
The files should exist. |
Requirement: REQ_IJN9ZPU
|
The files should not have duplicates, which can happen if the |
1.3. Checks for linkers¶
Note
These checks are for the host platform, which is where ferrocene-self-test
is executed.
$target
refers to this host platform.
Requirement: REQ_QQDV24N
|
Inside of |
Requirement: REQ_J42HAPX
|
Inside of |
1.3.1. Platforms that need a C compiler¶
Note
The following checks apply to these Host platforms:
x86-64 Linux (glibc)
Armv8-A Linux (glibc)
Requirement: REQ_GR1AK1Q
|
Search for a system C compiler in the |
Requirement: REQ_FCE5QJ5
|
Use the system C compiler to compile a sample program, and use the linker wrapper for the linking stage. |
Requirement: REQ_5Q3NRL3
|
Check that the system C compiler passes |
Requirement: REQ_1MN4JOQ
|
Ensure that the linker command line arguments that can be accepted are of the form documented in the Safety Manual. |
1.4. Checks for compilation¶
1.4.1. All targets¶
Note
These checks are for all locally-installed targets listed in Compilation targets overview.
Requirement: REQ_99TXVWC
|
Check if we can compile the following Rust crate types:
|
Requirement: REQ_SV3CV3N
|
Check that only the following artefacts are produced by
|
1.4.2. Host targets¶
Note
These checks are for the host platform, which is where ferrocene-self-test
is executed.
Requirement: REQ_8TNOYG8
|
Check if a sample program that |
Requirement: REQ_B07M5S2
|
Check if the output of the program is as expected. |