Conversation
|
This relates to RPOPC-867 |
Review Summary by QodoReplace hardcoded exit codes with specific error codes
WalkthroughsDescription• Replace hardcoded exit codes with specific error codes from test_tools • Add multiple fallback methods to install test_tools (wget, curl, git) • Use proper error code constants throughout script for better error handling • Update usage exit to use E_USAGE and final exit to use E_SUCCESS Diagramflowchart LR
A["Script execution"] --> B["Install test_tools"]
B --> C["Try wget method"]
C --> D["Try curl method"]
D --> E["Try git clone method"]
E --> F["Run coremark"]
F --> G["Generate results"]
G --> H["Exit with error code"]
B -.->|fallback| C
C -.->|fallback| D
D -.->|fallback| E
File Changes1. coremark/coremark_run
|
Code Review by Qodo
1. Unvalidated exit code vars
|
|
The hardcoded 101 has to happen as at this our attempt to load test_tools has failed 3 different ways. |
Description
Uses error_codes found in test_tools/error_codes to provide more specific error indication.
Before/After Comparison
Before: Returned a 0 or 1, making determination of having to rerun very course
After: Error codes are now bases on test_tools/error_codes, making it easier to limit when we do a rerun of the test.
Also, changed how we load in test_tools, we try curl, git, and wget, to avoid a failure due to the program not
being installed.
Clerical Stuff
This closes #72
Relates to JIRA: RPOPC-867
Testing
Ran through zathras, with following scenario file
global:
ssh_key_file: replace_your_ssh_key
terminate_cloud: 1
os_vendor: rhel
results_prefix: documentation
os_vendor: rhel
system_type: aws
cloud_os_id: ami-035032ea878eca201
systems:
system1:
tests: "coremark"
host_config: "m5.xlarge"
csv file produced.
iteration,threads,IterationsPerSec,Start_Date,End_Date
1,4,58708.414873,2026-03-13T12:11:27Z,2026-03-13T12:12:18Z
1,4,59802.651251,2026-03-13T12:11:27Z,2026-03-13T12:12:18Z
2,4,58927.519151,2026-03-13T12:12:33Z,2026-03-13T12:13:23Z
2,4,59769.885939,2026-03-13T12:12:33Z,2026-03-13T12:13:23Z
3,4,59017.360940,2026-03-13T12:13:38Z,2026-03-13T12:14:28Z
3,4,59488.399762,2026-03-13T12:13:38Z,2026-03-13T12:14:28Z
4,4,58783.188008,2026-03-13T12:14:43Z,2026-03-13T12:15:34Z
4,4,59627.329193,2026-03-13T12:14:43Z,2026-03-13T12:15:34Z
5,4,58924.625583,2026-03-13T12:15:48Z,2026-03-13T12:16:39Z
5,4,60003.000150,2026-03-13T12:15:48Z,2026-03-13T12:16:39Z
Returned 0 as expected. Testing on rerun verification handled in the appropriate zathras pr.