Skip to content

test(convert): pin QEMU guest RAM to 4G in CI - #136

Merged
imlk0 merged 1 commit into
masterfrom
ci/pin-qemu-ram-4g
Sep 18, 2026
Merged

imlk0 merged 1 commit into
masterfrom
ci/pin-qemu-ram-4g

Conversation

@imlk0

@imlk0 imlk0 commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The test-convert boot test derived QEMU guest RAM from 80% of the CI runner's host memory (~5.6–12.8 GB). That is large enough to mask low-memory boot failures: a guest that fails to boot at smaller RAM sizes still boots in CI, so this class of regression never surfaces.

Changes

  • tests/test-convert.sh: add --ram <size> option and QEMU_RAM_SIZE env var. test_qemu_boot() uses it, defaulting to host×0.8 when unset (local dev unchanged).
  • Makefile: run-convert-test-case plumbs QEMU_RAM through to --ram.
  • .github/workflows/build-rpm.yml: pin all test-convert jobs to QEMU_RAM=4G.

CI behavior

Boot mode is unchanged (q35 + OVMF/UEFI + TCG, KVM=N). With 4G, bootloader=uki jobs are expected to fail to boot until the UKI image is rebuilt compactly; grub jobs are unaffected (no UEFI PE load path). This is the intended low-memory gate.

CI results (24 test-convert jobs)

bootloader × distro sub-matrix (delta × enc) result
uki + alinux4 3 × 2 = 6 ❌ 6/6 failure
uki + alinux3 3 × 2 = 6 ✅ 6/6 success
grub + alinux4 3 × 2 = 6 ✅ 6/6 success
grub + alinux3 3 × 2 = 6 ✅ 6/6 success

Total: 6 failure / 18 success. Failures are confined to uki + alinux4; uki + alinux3 boots fine at 4G, and all grub jobs pass on both distros — i.e. 4G is sufficient for every non-affected path, and the failure trigger is specific to the alinux4 UKI build.

Verification

  • bash -n tests/test-convert.sh — OK
  • shellcheck tests/test-convert.sh — clean
  • cargo fmt --check — OK
  • QEMU_RAM_SIZE resolution verified: unset → host×0.8, 4G → 4G, 4096M → 4096M

test_qemu_boot() derived RAM_SIZE from 80% of the CI runner's host
memory (~5.6-12.8 GB), which silently masked the UKI SizeOfImage
"hole" regression: UEFI LoadImage() must allocate the full
SizeOfImage (~2.93 GiB for the mis-built UKI) as contiguous memory
up front, so it only fails at low memory. Add a --ram option and
QEMU_RAM_SIZE env var (plumbed through the Makefile as QEMU_RAM) and
pin all CI test-convert jobs to 4G so this class of regression
surfaces in CI. The script default stays at host*0.8 for local
development.

Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Assisted-by: Claude:glm-5.2[1m]
@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@imlk0
imlk0 merged commit e8552e5 into master Sep 18, 2026
36 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants