automation: Build Xen according to the type of the job
All the build jobs exist in two flavors: debug and non-debug, where the former sets 'debug' variable to 'y' and the latter to 'n'. This variable is only being recognized by the toolstack, because Xen requires enabling/disabling debug build via e.g. menuconfig/config file. As a corollary, we end up building/testing Xen with CONFIG_DEBUG always set to a default value ('y' for unstable and 'n' for stable branches), regardless of the type of the build job.
Fix this behavior by setting CONFIG_DEBUG according to the 'debug' value.
---
Xen used debug variable to control the build type before switching to Kconfig. Support for GitLab CI was added later, which means that this issue was always present. This is a low risk for 4.17 with a benefit of being able to test Xen in both debug and non-debug versions.
--- automation/scripts/build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
automation/scripts/build +5 -4
@@ -21,12 +21,13 @@ if [[ "${RANDCONFIG}" == "y" ]]; then make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig hypervisor_only="y" else + echo "CONFIG_DEBUG=${debug}" > xen/.config + if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then - echo "${EXTRA_XEN_CONFIG}" > xen/.config - make -j$(nproc) -C xen olddefconfig - else - make -j$(nproc) -C xen defconfig + echo "${EXTRA_XEN_CONFIG}" >> xen/.config fi + + make -j$(nproc) -C xen olddefconfig fi # Save the config file before building because build failure causes the script
Signature · 1 line
2.25.1
Quoted 8 lines · Michal Orzel
All the build jobs exist in two flavors: debug and non-debug, where the former sets 'debug' variable to 'y' and the latter to 'n'. This variable is only being recognized by the toolstack, because Xen requires enabling/disabling debug build via e.g. menuconfig/config file. As a corollary, we end up building/testing Xen with
CONFIG_DEBUGalways set to a default value ('y' for unstable and 'n' for stable branches), regardless of the type of the build job.
Quoted 8 lines
Fix this behavior by setting
CONFIG_DEBUGaccording to the 'debug' value.Signed-off-by Michal Orzel <[email protected]>---
Xen used debug variable to control the build type before switching toKconfig. Support for GitLab CI was added later, which means that this issue was always present. This is a low risk for 4.17 with a benefit of being able to test Xen in both debug and non-debug versions.
Both series were floating around for ages before being accepted. It's quite possible that one bitrotted around the other.
This should be backported, and therefore should be considered for 4.17 at this point.
Is there a Gitlab CI run which includes this patch?
~Andrew
Hi Andrew,
Quoted 20 lines · Andrew Cooper
Quoted 8 lines · Michal Orzel
All the build jobs exist in two flavors: debug and non-debug, where the former sets 'debug' variable to 'y' and the latter to 'n'. This variable is only being recognized by the toolstack, because Xen requires enabling/disabling debug build via e.g. menuconfig/config file. As a corollary, we end up building/testing Xen with
CONFIG_DEBUGalways set to a default value ('y' for unstable and 'n' for stable branches), regardless of the type of the build job.Quoted 8 lines
Fix this behavior by setting
CONFIG_DEBUGaccording to the 'debug' value.Signed-off-by Michal Orzel <[email protected]>---
Xen used debug variable to control the build type before switching toKconfig. Support for GitLab CI was added later, which means that this issue was always present. This is a low risk for 4.17 with a benefit of being able to test Xen in both debug and non-debug versions.
Quoted 7 lines
Both series were floating around for ages before being accepted. It's quite possible that one bitrotted around the other.
This should be backported, and therefore should be considered for 4.17 at this point.
Is there a Gitlab CI run which includes this patch?
I submitted the one here not long ago:
https://gitlab.com/xen-project/people/morzel/xen-orzelmichal/-/pipelines/673396949
and there is already one failure in Arm boot-cpupools test because the script sets null scheduler for the domain which is not present in non-debug build...
Quoted 2 lines
~Andrew
~Michal
Quoted 31 lines · Michal Orzel
Hi Andrew,
Quoted 26 lines · Andrew Cooper
Quoted 8 lines · Michal Orzel
All the build jobs exist in two flavors: debug and non-debug, where the former sets 'debug' variable to 'y' and the latter to 'n'. This variable is only being recognized by the toolstack, because Xen requires enabling/disabling debug build via e.g. menuconfig/config file. As a corollary, we end up building/testing Xen with
CONFIG_DEBUGalways set to a default value ('y' for unstable and 'n' for stable branches), regardless of the type of the build job.Quoted 8 lines
Fix this behavior by setting
CONFIG_DEBUGaccording to the 'debug' value.Signed-off-by Michal Orzel <[email protected]>---
Xen used debug variable to control the build type before switching toKconfig. Support for GitLab CI was added later, which means that this issue was always present. This is a low risk for 4.17 with a benefit of being able to test Xen in both debug and non-debug versions.Both series were floating around for ages before being accepted. It's quite possible that one bitrotted around the other.
This should be backported, and therefore should be considered for 4.17 at this point.
Quoted 7 lines
Quoted 1 line
Is there a Gitlab CI run which includes this patch?
and there is already one failure in Arm boot-cpupools test because the script sets null scheduler for the domain which is not present in non-debug build...
The CI finished running the pipeline and it looks like the null sched issue is the only one (at least this means that this patch is worth having). I will push a fix for the boot-cpupools test (I will also mark it as for-4.17).
Quoted 6 lines
Quoted 3 lines
~Andrew
~Michal
~Michal
Hi Michal,
Quoted 12 lines
-----Original Message-----
From: Michal Orzel <[email protected]>
Subject: [for-4.17] automation: Build Xen according to the type of the jobAll the build jobs exist in two flavors: debug and non-debug, where the former sets 'debug' variable to 'y' and the latter to 'n'. This variable is only being recognized by the toolstack, because Xen requires enabling/disabling debug build via e.g. menuconfig/config file. As a corollary, we end up building/testing Xen with
CONFIG_DEBUGalways set to a default value ('y' for unstable and 'n' for stable branches), regardless of the type of the build job.
Quoted 3 lines
Fix this behavior by setting
CONFIG_DEBUGaccording to the 'debug' value.Signed-off-by Michal Orzel <[email protected]>
Kind regards,
Henry
Stefano Stabellini
Reviewed-byQuoted 11 lines · Michal Orzel
All the build jobs exist in two flavors: debug and non-debug, where the former sets 'debug' variable to 'y' and the latter to 'n'. This variable is only being recognized by the toolstack, because Xen requires enabling/disabling debug build via e.g. menuconfig/config file. As a corollary, we end up building/testing Xen with
CONFIG_DEBUGalways set to a default value ('y' for unstable and 'n' for stable branches), regardless of the type of the build job.Fix this behavior by setting
CONFIG_DEBUGaccording to the 'debug' value.Signed-off-by Michal Orzel <[email protected]>
Quoted 34 lines
---
Xen used debug variable to control the build type before switching toKconfig. Support for GitLab CI was added later, which means that this issue was always present. This is a low risk for 4.17 with a benefit of being able to test Xen in both debug and non-debug versions.--- automation/scripts/build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)automation/scripts/build +5
-4@@ -21,12 +21,13 @@ if [[ "${RANDCONFIG}" == "y" ]]; then make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig hypervisor_only="y" else + echo "CONFIG_DEBUG=${debug}" > xen/.config + if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then - echo "${EXTRA_XEN_CONFIG}" > xen/.config - make -j$(nproc) -C xen olddefconfig - else - make -j$(nproc) -C xen defconfig + echo "${EXTRA_XEN_CONFIG}" >> xen/.config fi + + make -j$(nproc) -C xen olddefconfig fi # Save the config file before building because build failure causes the scriptSignature · 1 line
2.25.1