ci(x86_64): add Asterinas zone1 Jenkins test - #376
Conversation
|
I think it is OK to add a new BID for x86_64/qemu_asterinas |
bb385a6 to
97597d9
Compare
97597d9 to
68c8f18
Compare
|
@Solicey, could you please review the updated PR? We decouple the Jenkins BID from the make/platform board via If we kept the old rule that the BID board must equal the platform board, and still wanted a dedicated Asterinas BID, we would have to introduce a |
|
It would be better to add more test instructions to show that zone1 works fine. For example, |
68c8f18 to
b0abb05
Compare
ffaef19 to
384da7c
Compare
|
@Solicey, thanks for the review. We updated the CI flow: after entering the Asterinas zone1 console, it now runs |
|
@dallasxy, could you please review this PR? The PR adds a dedicated Jenkins build 8 is fully green, including |
384da7c to
8ddc0e3
Compare
| def send_one_by_one(self, command: str, char_delay: float = 0.05) -> None: | ||
| """Send a command one character at a time for sensitive guest consoles.""" | ||
| self._ensure_open() | ||
| payload = command + "\n" | ||
| for char in payload: | ||
| self.backend.write(char.encode(self.encoding, errors="replace")) | ||
| time.sleep(char_delay) |
There was a problem hiding this comment.
Can you explain the reason for adding a send_one_by_one function?
There was a problem hiding this comment.
Thanks for the question. We found that the current Asterinas virtio-console receives one byte per IRQ, which conflicts with sending the whole command at once via send(). I also observed this in normal use: the Asterinas terminal cannot paste, and screen/tmux also require byte-by-byte input. That is why I added send_one_by_one. After removing it and using the old send(), Jenkins build 10 hung because send() could not deliver the complete command:
http://183.242.33.186:8100/job/hvisor_pr_ci_2/job/PR-376/10/
One alternative is to use the existing send path in a char-by-char loop to build the full command. I currently prefer a single helper because it keeps the terminal abstraction clean.
Which approach should we take: keep send_one_by_one, or use send() in a loop to send one character at a time?
8ddc0e3 to
b674821
Compare
b674821 to
43629ab
Compare
|
It seems that there are some conflicts with the dev branch, you can resolve these conflicts manually. |
43629ab to
ccb8582
Compare
ccb8582 to
2ab9007
Compare
ci(x86_64): add Asterinas zone1 Jenkins test
ci(x86_64): add Asterinas zone1 Jenkins test
Motivation
Add Asterinas zone1 coverage to the existing x86_64 QEMU Jenkins CI while keeping
x86_64/qemuas the Linux zone1 test flow.Approach
Use a dedicated
x86_64/qemu_asterinasBID for Asterinas instead of mixing Linux and Asterinas in the same BID. The existingx86_64/qemuBID remains unchanged and only tests Linux zone1.platform_board: qemudecouples the Jenkins BID from the make/platform board:x86_64/qemu_asterinasis only a test identity and server artifact directory.BOARD=qemubecauseplatform/x86_64/qemu_asterinasdoes not exist in the source tree.artifact_dir: qemu_asterinasselects the Asterinas artifact directory.Artifact layout
qemu_asterinasprovides:image/kernel/aster-kernel-osdk-binimage/virtdisk/initramfs.cpio.gzThe shared
x86_64/qemuartifacts still provide zone0 files:image/kernel/setup.binimage/kernel/vmlinux.binimage/virtdisk/rootfs1.imgChanges
Jenkinsfile: addplatform_boardparsing and thex86_64/qemu_asterinasmatrix cell.jenkins/ci.yaml: add the dedicated BID and keep Linux zone1 inx86_64/qemu.jenkins/ci_config.py: expose optionalplatform_board.jenkins/ci_runner.py: map BID to the real platform board, clearBIDfor hvisor make, and addasterinas_zone1_regression.jenkins/prepare.sh: deploy Asterinas kernel/initramfs, Multiboot2 bootloader, and createzone1_disk.imgwithmkfs.ext2 -b 4096.jenkins/terminal.py: addsend_one_by_one()for sensitive guest consoles.platform/x86_64/qemu/scripts/boot_zone1_asterinas.sh: start Asterinas zone1 with the Asterinas virtio config.QEMU lifecycle
Each BID starts one QEMU instance and runs its own test cases. There is no Linux/Asterinas state sharing and no restart between two guest types inside one BID.
Verification
x86_64/qemupasses Linux zone1 startup.x86_64/qemu_asterinasstarts Asterinas zone1 and runs/test/run_regression_test.sh.All regression tests passedand exit code 0; a non-zero regression exit fails immediately.Ctrl-A dto detach from the Asterinas screen and verifies the zone0root@zone0prompt.x86_64/qemu_asterinas.