-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun_local_qemu.sh
More file actions
executable file
·566 lines (492 loc) · 16 KB
/
run_local_qemu.sh
File metadata and controls
executable file
·566 lines (492 loc) · 16 KB
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
66
67
68
69
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
#!/usr/bin/env bash
set -euo pipefail
# 本地一键跑 QEMU 单测链路。
# 目标:
# - 用交叉编译产物在 QEMU 上执行完整 unitMain
# - 校验对齐访问与预期 fault 语义
# - 保持与 local base 相同的三组语义宏矩阵
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/lib/common.sh
source "${scriptDir}/scripts/lib/common.sh"
repoRoot="$(ryanjson_repo_root_from_source "${BASH_SOURCE[0]}" 0)"
cd "${repoRoot}"
userMachineSet=0
userCpuSet=0
userTargetSet=0
if [[ -n "${QEMU_MACHINE+x}" ]]; then userMachineSet=1; fi
if [[ -n "${QEMU_CPU+x}" ]]; then userCpuSet=1; fi
if [[ -n "${QEMU_TARGET+x}" ]]; then userTargetSet=1; fi
qemuMode="${QEMU_MODE:-full}"
qemuMachine="${QEMU_MACHINE:-mps2-an386}"
qemuCpu="${QEMU_CPU:-cortex-m4}"
qemuTimeoutSec="${QEMU_TIMEOUT_SEC:-120}"
qemuTarget="${QEMU_TARGET:-RyanJsonQemu}"
qemuForceClean="${QEMU_FORCE_CONFIG_CLEAN:-0}"
qemuStopOnFail="${QEMU_STOP_ON_FAIL:-1}"
qemuLogRoot="${QEMU_LOG_ROOT:-localLogs/qemu}"
qemuMemory="${QEMU_MEMORY:-64M}"
qemuConsoleLog="${QEMU_CONSOLE_LOG:-1}"
qemuSaveLog="${QEMU_SAVE_LOG:-0}"
qemuMaxCases="${QEMU_MAX_CASES:-0}"
qemuSingleCase="${QEMU_SINGLE_CASE:-}"
qemuStripAnsiLog="${QEMU_STRIP_ANSI_LOG:-0}"
qemuSemihostingMode="legacy"
# 关键日志标记:既要有 unit 全量通过,也要能看到对齐异常的预期现场。
readonly qemuPassPattern='^\[QEMU\]\[RESULT\] UNIT_PASS code=0 tick=[0-9]+\r?$'
readonly qemuAlignedPattern='^\[QEMU\]\[ALIGN\] aligned_access PASS read=0x[0-9A-Fa-f]+\r?$'
readonly qemuUnalignedPattern='^\[QEMU\]\[ALIGN\] unaligned_access TRIGGER addr=0x[0-9A-Fa-f]+\r?$'
readonly qemuExpectedFaultPattern='^\[QEMU\]\[RESULT\] EXPECTED_UNALIGNED_FAULT (cfsr|fallbackAddr)=0x[0-9A-Fa-f]+\r?$'
readonly qemuHardFaultPattern='^\[QEMU\]\[HARDFAULT\] CFSR=0x[0-9A-Fa-f]+ HFSR=0x[0-9A-Fa-f]+ BFAR=0x[0-9A-Fa-f]+ MMFAR=0x[0-9A-Fa-f]+\r?$'
readonly qemuFallbackFaultPattern='^\[QEMU\]\[HARDFAULT\] fallback_soft_trap_no_hw_fault addr=0x[0-9A-Fa-f]+\r?$'
readonly qemuFailurePattern='^\[QEMU\]\[RESULT\] UNIT_FAIL code=-?[0-9]+\r?$'
declare -a caseList=()
# 环境依赖检查
requireQemuToolchain() {
ryanjson_require_cmds "可执行: bash ./scripts/setup/install_qemu_deps.sh" \
xmake arm-none-eabi-gcc arm-none-eabi-objcopy qemu-system-arm
}
detectQemuSemihostingMode() {
if qemu-system-arm -help 2>&1 | grep -q -- "-semihosting-config"; then
qemuSemihostingMode="config"
else
qemuSemihostingMode="legacy"
fi
}
machine_supported() {
local machineName="$1"
qemu-system-arm -machine help | awk '{print $1}' | grep -Fxq "${machineName}"
}
ryanjson_normalize_bool() {
# 统一布尔值归一化(true/false)
local name="$1"
local value="$2"
local lower=""
lower="$(printf '%s' "${value}" | tr '[:upper:]' '[:lower:]')"
case "${lower}" in
true|1|on|yes)
printf 'true\n'
return 0
;;
false|0|off|no)
printf 'false\n'
return 0
;;
*)
ryanjson_log_error "${name} 仅支持 true/false/1/0/on/off/yes/no,当前值:${value}"
return 1
;;
esac
}
ryanjson_parse_single_case() {
local raw="$1"
local strictKey=""
local addAtHead=""
local scientific=""
local extra=""
read -r strictKey addAtHead scientific extra <<< "${raw}"
if [[ -z "${strictKey}" || -z "${addAtHead}" || -z "${scientific}" || -n "${extra}" ]]; then
ryanjson_log_error "QEMU_SINGLE_CASE 格式错误,应为:\"<strict> <head> <sci>\""
return 1
fi
strictKey="$(ryanjson_normalize_bool "QEMU_SINGLE_CASE.strict" "${strictKey}")" || return 1
addAtHead="$(ryanjson_normalize_bool "QEMU_SINGLE_CASE.head" "${addAtHead}")" || return 1
scientific="$(ryanjson_normalize_bool "QEMU_SINGLE_CASE.sci" "${scientific}")" || return 1
printf '%s %s %s\n' "${strictKey}" "${addAtHead}" "${scientific}"
}
# 根据 QEMU 版本能力与用户输入修正 machine/cpu/target
resolveQemuMachineDefaults() {
# 优先 mps2-an386(CM4F),若当前 QEMU 不支持则自动回退到 mps2-an385(CM3)。
if ! machine_supported "${qemuMachine}"; then
if [[ "${qemuMachine}" == "mps2-an386" ]] && machine_supported "mps2-an385"; then
ryanjson_log_info "当前 QEMU 不支持 mps2-an386,自动回退到 mps2-an385。"
qemuMachine="mps2-an385"
if [[ "${userCpuSet}" -eq 0 ]]; then
qemuCpu="cortex-m3"
fi
if [[ "${userTargetSet}" -eq 0 ]]; then
qemuTarget="RyanJsonQemuCm3"
fi
else
ryanjson_log_error "QEMU 不支持 machine=${qemuMachine}"
ryanjson_log_info "可用 machine 列表:"
qemu-system-arm -machine help | sed -n '1,120p'
return 1
fi
fi
# 用户直接选择 an385 且未显式指定 target/cpu 时,自动切到 CM3 构建目标。
if [[ "${qemuMachine}" == "mps2-an385" ]]; then
if [[ "${userCpuSet}" -eq 0 ]]; then
qemuCpu="cortex-m3"
fi
if [[ "${userTargetSet}" -eq 0 ]]; then
qemuTarget="RyanJsonQemuCm3"
fi
fi
}
qemu_run_xmake_config() {
# QEMU 构建专用 xmake 配置(cross/arm)
local caseName="$1"
if [[ "${qemuForceClean}" == "1" ]]; then
ryanjson_log_phase "正在执行 xmake 配置(clean 模式)..."
if ! xmake f -c -p cross -a arm; then
ryanjson_log_error "xmake 配置失败:${caseName}"
return 1
fi
else
ryanjson_log_phase "正在执行 xmake 配置(增量模式)..."
if ! xmake f -p cross -a arm; then
ryanjson_log_error "xmake 配置失败:${caseName}"
return 1
fi
fi
}
qemu_build_target() {
# QEMU 目标构建(带编译错误兜底检查)
local caseName="$1"
local buildLogPath=""
buildLogPath="${qemuLogRoot}/_tmp/${caseName}.build.$$.log"
: > "${buildLogPath}"
if ! xmake -b "${qemuTarget}" 2>&1 | tee "${buildLogPath}"; then
ryanjson_log_error "xmake 构建失败,已终止本用例并跳过 QEMU 运行。"
tail -n 120 "${buildLogPath}" || true
rm -f "${buildLogPath}" >/dev/null 2>&1 || true
return 1
fi
if grep -Eq '(^|[^[:alpha:]])error:' "${buildLogPath}"; then
ryanjson_log_error "构建日志检测到编译错误,已终止本用例并跳过 QEMU 运行。"
tail -n 120 "${buildLogPath}" || true
rm -f "${buildLogPath}" >/dev/null 2>&1 || true
return 1
fi
rm -f "${buildLogPath}" >/dev/null 2>&1 || true
}
qemu_find_elf() {
# 查找 QEMU 目标输出的 ELF
local targetName="$1"
find ./build -type f -name "${targetName}.elf" | head -n 1 || true
}
# 生成语义矩阵并校验 QEMU 参数
prepareQemuCaseList() {
local caseText=""
if [[ -n "${qemuSingleCase}" ]]; then
local normalizedCase=""
if ! normalizedCase="$(ryanjson_parse_single_case "${qemuSingleCase}")"; then
return 1
fi
caseList=("${normalizedCase}")
else
if ! caseText="$(ryanjson_emit_semantic_cases "${qemuMode}" "QEMU_MODE")"; then
return 1
fi
mapfile -t caseList <<< "${caseText}"
fi
if ! ryanjson_require_nonneg_int "QEMU_MAX_CASES" "${qemuMaxCases}"; then
return 1
fi
if ! ryanjson_require_01 "QEMU_SAVE_LOG" "${qemuSaveLog}"; then
return 1
fi
if ! ryanjson_require_01 "QEMU_CONSOLE_LOG" "${qemuConsoleLog}"; then
return 1
fi
if ! ryanjson_require_01 "QEMU_STRIP_ANSI_LOG" "${qemuStripAnsiLog}"; then
return 1
fi
if [[ "${qemuConsoleLog}" == "0" && "${qemuSaveLog}" == "0" ]]; then
ryanjson_log_info "QEMU_CONSOLE_LOG=0 且 QEMU_SAVE_LOG=0 无可见输出,自动切换 QEMU_CONSOLE_LOG=1。"
qemuConsoleLog="1"
fi
if [[ "${qemuSaveLog}" == "1" ]]; then
mkdir -p "${qemuLogRoot}"
fi
mkdir -p "${qemuLogRoot}/_tmp"
if ((qemuMaxCases > 0)) && ((qemuMaxCases < ${#caseList[@]})); then
caseList=("${caseList[@]:0:qemuMaxCases}")
fi
}
# 打印统一 banner
printQemuBanner() {
ryanjson_print_banner_begin "QEMU 本地链路启动(完整 localbase 单测 + 对齐语义)"
ryanjson_print_banner_kv "MODE" "${qemuMode}"
ryanjson_print_banner_kv "TARGET" "${qemuTarget}"
ryanjson_print_banner_kv "MACHINE" "${qemuMachine}"
ryanjson_print_banner_kv "CPU" "${qemuCpu}"
ryanjson_print_banner_kv "TIMEOUT" "${qemuTimeoutSec}s"
ryanjson_print_banner_kv "LOG_ROOT" "${qemuLogRoot}"
ryanjson_print_banner_kv "MEMORY" "${qemuMemory}"
ryanjson_print_banner_kv "CONSOLE_LOG" "${qemuConsoleLog}"
ryanjson_print_banner_kv "SAVE_LOG" "${qemuSaveLog}"
ryanjson_print_banner_kv "STRIP_ANSI_LOG" "${qemuStripAnsiLog}"
ryanjson_print_banner_kv "SEMIHOSTING" "${qemuSemihostingMode}"
ryanjson_print_banner_kv "MAX_CASES" "${qemuMaxCases}"
ryanjson_print_banner_kv_optional "SINGLE_CASE" "${qemuSingleCase}"
ryanjson_print_banner_end
}
# 清洗串口输出,保证 marker 匹配稳定
cleanQemuStream() {
if command -v perl >/dev/null 2>&1; then
# 规范化 UART 输出:保留 ANSI 颜色,去掉 CR 和无意义控制字符,
# 这样后面的 marker 检查可以稳定使用 ^...$。
if [[ "${qemuStripAnsiLog}" == "1" ]]; then
perl -ne 's/\r//g; s/\x1b\[[0-9;]*[A-Za-z]//g; s/[\x00-\x08\x0B\x0C\x0E-\x1A\x1C-\x1F\x7F]//g; next if length($_) > 4096; print;'
else
perl -ne 's/\r//g; s/[\x00-\x08\x0B\x0C\x0E-\x1A\x1C-\x1F\x7F]//g; next if length($_) > 4096; print;'
fi
else
if [[ "${qemuStripAnsiLog}" == "1" ]]; then
tr -d '\000\r' | sed -r 's/\x1B\[[0-9;]*[A-Za-z]//g'
else
tr -d '\000\r'
fi
fi
}
# 子进程定位与强制结束
getQemuChildPid() {
local parentPid="$1"
pgrep -P "${parentPid}" qemu-system-arm | head -n 1 || true
}
stopQemuRun() {
local parentPid="$1"
local childPid=""
local waitDeadline=0
childPid="$(getQemuChildPid "${parentPid}")"
if [[ -n "${childPid}" ]]; then
kill -TERM "${childPid}" >/dev/null 2>&1 || true
fi
waitDeadline=$((SECONDS + 3))
while kill -0 "${parentPid}" >/dev/null 2>&1; do
if ((SECONDS >= waitDeadline)); then
break
fi
sleep 0.2
done
if kill -0 "${parentPid}" >/dev/null 2>&1; then
kill -TERM "${parentPid}" >/dev/null 2>&1 || true
sleep 1
kill -KILL "${parentPid}" >/dev/null 2>&1 || true
fi
}
# 日志 marker 校验
qemuLogHasRequiredMarkers() {
local logPath="$1"
if ! grep -Eq "${qemuPassPattern}" "${logPath}"; then
return 1
fi
if ! grep -Eq "${qemuAlignedPattern}" "${logPath}"; then
return 1
fi
if ! grep -Eq "${qemuUnalignedPattern}" "${logPath}"; then
return 1
fi
if ! grep -Eq "${qemuExpectedFaultPattern}" "${logPath}"; then
return 1
fi
if ! grep -Eq "${qemuHardFaultPattern}" "${logPath}" \
&& ! grep -Eq "${qemuFallbackFaultPattern}" "${logPath}"; then
return 1
fi
return 0
}
qemuLogHasFailureMarkers() {
local logPath="$1"
if grep -Eq "${qemuFailurePattern}" "${logPath}"; then
return 0
fi
return 1
}
reportMissingLogMarkers() {
local logPath="$1"
local missing=0
if ! grep -Eq "${qemuPassPattern}" "${logPath}"; then
ryanjson_log_error "日志缺少关键标记: [QEMU][RESULT] UNIT_PASS code=0 tick=<num>"
missing=1
fi
if ! grep -Eq "${qemuAlignedPattern}" "${logPath}"; then
ryanjson_log_error "日志缺少关键标记: [QEMU][ALIGN] aligned_access PASS read=0x<hex>"
missing=1
fi
if ! grep -Eq "${qemuUnalignedPattern}" "${logPath}"; then
ryanjson_log_error "日志缺少关键标记: [QEMU][ALIGN] unaligned_access TRIGGER addr=0x<hex>"
missing=1
fi
if ! grep -Eq "${qemuExpectedFaultPattern}" "${logPath}"; then
ryanjson_log_error "日志缺少关键标记: [QEMU][RESULT] EXPECTED_UNALIGNED_FAULT <dynamic>"
missing=1
fi
if ! grep -Eq "${qemuHardFaultPattern}" "${logPath}" \
&& ! grep -Eq "${qemuFallbackFaultPattern}" "${logPath}"; then
ryanjson_log_error "日志缺少 fault 现场标记(HARDFAULT cfsr/hfsr 或 fallback addr)"
missing=1
fi
return "${missing}"
}
# 处理临时日志
cleanupCaseLogIfNeeded() {
local keepCaseLog="$1"
local caseLogPath="$2"
if [[ "${keepCaseLog}" == "0" && -n "${caseLogPath}" ]]; then
rm -f "${caseLogPath}" >/dev/null 2>&1 || true
fi
}
# 执行单个语义用例(构建 + 运行 + 日志校验)
run_case() {
local strictKey="$1"
local addAtHead="$2"
local scientific="$3"
local caseName="$(ryanjson_semantic_case_name "${strictKey}" "${addAtHead}" "${scientific}")"
local caseLogPath=""
local keepCaseLog="0"
local deadlineSec=0
local qemuPid=0
local qemuRc=0
local elfPath=""
local -a qemuArgs=()
ryanjson_print_banner_begin "【用例】${caseName}"
ryanjson_print_semantic_kv "${strictKey}" "${addAtHead}" "${scientific}"
ryanjson_print_banner_end
ryanjson_export_semantic_macros "${strictKey}" "${addAtHead}" "${scientific}"
if ! qemu_run_xmake_config "${caseName}"; then
return 1
fi
# 清理旧产物,避免构建失败时误用历史 ELF。
find ./build -type f -name "${qemuTarget}.elf" -delete >/dev/null 2>&1 || true
if ! qemu_build_target "${caseName}"; then
return 1
fi
elfPath="$(qemu_find_elf "${qemuTarget}")"
if [[ -z "${elfPath}" ]]; then
ryanjson_log_error "未找到 ELF 输出(${qemuTarget}.elf)"
return 1
fi
if [[ "${qemuSaveLog}" == "1" ]]; then
caseLogPath="${qemuLogRoot}/${caseName}.log"
keepCaseLog="1"
else
caseLogPath="${qemuLogRoot}/_tmp/${caseName}.log"
keepCaseLog="0"
fi
ryanjson_log_info "ELF: ${elfPath}"
if [[ "${qemuSaveLog}" == "1" ]]; then
ryanjson_log_phase "启动 QEMU 并抓取日志 -> ${caseLogPath}"
else
ryanjson_log_phase "启动 QEMU(终端实时输出,日志临时写入)"
fi
qemuArgs=(
-M "${qemuMachine}"
-cpu "${qemuCpu}"
-nographic
-kernel "${elfPath}"
)
if [[ "${qemuSemihostingMode}" == "config" ]]; then
qemuArgs+=(-semihosting-config enable=on,target=native)
else
qemuArgs+=(-semihosting)
fi
if [[ -n "${qemuMemory}" ]]; then
qemuArgs+=(-m "${qemuMemory}")
fi
ryanjson_init_utf8_log "${caseLogPath}"
deadlineSec=$((SECONDS + qemuTimeoutSec))
set +e
if [[ "${qemuConsoleLog}" == "1" ]]; then
(
qemu-system-arm "${qemuArgs[@]}" 2>&1 | cleanQemuStream | tee -a "${caseLogPath}"
) &
else
(
qemu-system-arm "${qemuArgs[@]}" 2>&1 | cleanQemuStream >> "${caseLogPath}"
) &
fi
qemuPid=$!
while true; do
if ! kill -0 "${qemuPid}" >/dev/null 2>&1; then
wait "${qemuPid}"
qemuRc=$?
break
fi
if ((SECONDS >= deadlineSec)); then
stopQemuRun "${qemuPid}"
wait "${qemuPid}"
qemuRc=124
break
fi
sleep 1
done
set -e
# 给日志管道极短的 flush 时间,避免尾部 marker 还没完全写入。
sleep 0.1
if [[ "${qemuRc}" -eq 124 ]]; then
ryanjson_log_error "QEMU 超时(${qemuTimeoutSec}s)"
tail -n 120 "${caseLogPath}"
cleanupCaseLogIfNeeded "${keepCaseLog}" "${caseLogPath}"
return 1
fi
if qemuLogHasFailureMarkers "${caseLogPath}"; then
ryanjson_log_error "用例失败(检测到 [QEMU][RESULT] UNIT_FAIL)"
tail -n 120 "${caseLogPath}"
cleanupCaseLogIfNeeded "${keepCaseLog}" "${caseLogPath}"
return 1
fi
if ! qemuLogHasRequiredMarkers "${caseLogPath}"; then
reportMissingLogMarkers "${caseLogPath}" || true
ryanjson_log_error "用例失败,日志尾部:"
tail -n 120 "${caseLogPath}"
cleanupCaseLogIfNeeded "${keepCaseLog}" "${caseLogPath}"
return 1
fi
cleanupCaseLogIfNeeded "${keepCaseLog}" "${caseLogPath}"
ryanjson_log_done "通过: ${caseName}"
return 0
}
# 执行矩阵
runQemuMatrix() {
local totalCases="${#caseList[@]}"
local caseIndex=0
local failedCases=0
local entry=""
local strictKey=""
local addAtHead=""
local scientific=""
for entry in "${caseList[@]}"; do
caseIndex=$((caseIndex + 1))
read -r strictKey addAtHead scientific <<< "${entry}"
echo
ryanjson_print_banner_begin "【QEMU 用例 ${caseIndex}/${totalCases}】"
ryanjson_print_banner_end
if run_case "${strictKey}" "${addAtHead}" "${scientific}"; then
:
else
failedCases=$((failedCases + 1))
if [[ "${qemuStopOnFail}" == "1" ]]; then
ryanjson_log_error "按 QEMU_STOP_ON_FAIL=1 提前终止。"
return 1
fi
fi
done
echo
ryanjson_log_done "QEMU 单测矩阵执行完成。"
ryanjson_log_info "模式: ${qemuMode}"
ryanjson_log_info "总用例: ${totalCases}"
ryanjson_log_info "失败用例: ${failedCases}"
if [[ "${qemuSaveLog}" == "1" ]]; then
ryanjson_log_info "日志目录: ${qemuLogRoot}"
else
ryanjson_log_info "日志目录: ${qemuLogRoot}/_tmp(用例结束后自动清理)"
fi
if [[ "${failedCases}" -gt 0 ]]; then
return 1
fi
}
# 入口函数
ryanjson_qemu_main() {
requireQemuToolchain
detectQemuSemihostingMode
resolveQemuMachineDefaults
prepareQemuCaseList
printQemuBanner
runQemuMatrix
}
main() {
ryanjson_qemu_main "$@"
}
main "$@"