Skip to content

Conversation

svmhdvn
Copy link
Contributor

@svmhdvn svmhdvn commented Aug 19, 2025

See full commit stack for incremental details and explanations.

@svmhdvn
Copy link
Contributor Author

svmhdvn commented Aug 19, 2025

@lwhsu @5u623l20 switching to github for the time being since it's a lot easier to reorganize commits and give full context automatically.

@lwhsu
Copy link
Member

lwhsu commented Aug 21, 2025

I'm still reading and thinking. Just a quick response: I think we can drop i386 (Makefile.i386 file) as it's also disabled in main branch. I don't think we would MFC those test/ci stuff as older branches can still use the old mechanism.

QEMU_MAX_MEM_SIZE=64

portinstall-aarch64: portinstall-pkg .PHONY
.if !exists(/usr/local/share/u-boot/u-boot-qemu-arm64/u-boot.bin)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this part also needs to be guarded by USE_QEMU ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied the feedback in v2.

@lwhsu
Copy link
Member

lwhsu commented Aug 21, 2025

Moving bhyve bits into Makefile.{aarch64,amd64} seems introducing some code duplication, perhaps the difference part like -o bootrom can be set as a variable in those files like BHYVE_ADDITIONAL_PARAMETERS and the common parts can still be Makefile?

@svmhdvn
Copy link
Contributor Author

svmhdvn commented Aug 22, 2025

Moving bhyve bits into Makefile.{aarch64,amd64} seems introducing some code duplication, perhaps the difference part like -o bootrom can be set as a variable in those files like BHYVE_ADDITIONAL_PARAMETERS and the common parts can still be Makefile?

The difference is quite large:

  • bhyveload is not supported yet on arm64 (i.e. difference in bootrom loading)
  • lpc is not supported on arm64 (i.e. difference in devices)
  • -o console is used on arm64 (i.e. difference in output configuration)

There is not too much code duplication here in the grand scheme of things, and it keeps things simpler by relying on less variable indirection.

@svmhdvn svmhdvn force-pushed the push-rstnsvuzltmw branch 2 times, most recently from affba5b to 01f28ec Compare August 27, 2025 15:35
@svmhdvn
Copy link
Contributor Author

svmhdvn commented Aug 27, 2025

Fixed merge conflict in v3.

@svmhdvn svmhdvn changed the title tests/ci: use bhyve for arm64 host and guest by default tests/ci: prepare for integrating into ci.freebsd.org Oct 10, 2025
@svmhdvn svmhdvn marked this pull request as draft October 14, 2025 19:54
Currently, since META_DIROUT is created by mktemp(1), it is 0600 by default. 
This makes it slightly annoying to copy out test-report.* files from a CI run.

Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
This sets up future work to allow multiple concurrent
CI runs, each possibly with their own image file.

Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
In an upcoming patch, arm64 hosts will default to using bhyve to run CI. 
However, emulators/qemu-user-static does not exist for arm64, and is not needed 
when the target is also arm64.

This patch ensures that qemu-user-static will only be requested for install if QEMUSTATIC is set.

Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
This patch removes the ci-set-*-var targets and conditionally runs ci-extract-meta
only if CITYPE=full.

The intended external interface into the tests/ci Makefile infrastructure already
requires CITYPE to be set (either through its default CITYPE?=full line, or
through the Make command line). Thus, the ci-set-*-var targets don't
functionally do anything.

Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Bhyve is only supported on amd64/amd64, amd64/i386, and
arm64/arm64. Furthermore, amd64 and arm64 have different
command-line arguments and requirements for running bhyve.

This patch separates the bhyve version of ci-runtest into
architecture-specific Makefiles.

Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
This change is necessary after commit 4227d51 (release: create pkgbase VM and cloud images)

After that commit, pkgbase is expected to be the primary
method of installation going forward. Instead of working
around this in vmimage.subr with NOPKGBASE, going the
pkgbase route helps catch even more test failures.

Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
This allows us to use ci-runtest on a pre-existing CI disk image.
It will be helpful in CI environments (such as ci.freebsd.org) where
building and testing are separated into distinct jobs.

Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Since its inception, 'make ci' has not found a need for
any arch specific or build-type specific overrides for
building the world and kernel as part of building an image.
This change combines them to avoid multiple invocations
of make, which could cause issues due to differences in
command line between the three targets. This also
simplifies the common and arch-specific Makefiles.

Note that this change still maintains an arch-specific
overridable target ci-buildimage-${TARGET_ARCH} which
can be used if needed.

Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
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