Commit e0cc468
authored
arm: validate archive and retry on all errors for FVP and toolchain downloads (#19309)
### Summary
The Test ARM Backend workflow has been intermittently failing with
`curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR`
during the FVP corstone download from developer.arm.com's CDN. The
toolchain download in the same setup uses the same bare-curl pattern and
fails the same way when the CDN flakes. In both cases the previous flow
was a single `curl --output ...` followed by a fatal `verify_md5`, so
neither a transient HTTP/2 reset nor a short error body that curl treats
as a successful 200 was retried.
Factor out a `download_with_retry` helper in utils.sh that wraps the
download in a five-attempt outer loop using
`curl --fail --retry-all-errors` and validates each attempt against the
published MD5 before proceeding, with the on-disk file size logged on
failure for diagnosis. Switch verify_md5's mismatch path from `exit 2`
to `return 2` so the helper can treat a bad checksum as a retryable
failure; existing callers (`verify_md5 ... || exit 1`) keep the same
fatal-on-mismatch behavior since the function still returns non-zero on
a bad checksum.
Use the helper from both fvp_utils.sh and toolchain_utils.sh in place of
the bare `curl` + `verify_md5` pair.
Authored with Claude Code.
### Test plan
CI
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils
@Sebastian-Larsson @robell1 parent fe2ce06 commit e0cc468
3 files changed
Lines changed: 47 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | | - | |
| 72 | + | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
| 110 | + | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
63 | | - | |
64 | | - | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
68 | 110 | | |
69 | 111 | | |
70 | 112 | | |
| |||
0 commit comments