summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-09-06 18:47:18 -0400
committerTom Rini <[email protected]>2023-09-06 18:47:18 -0400
commit515e0af77b25fba24ef6a3c72afee6ae3c739825 (patch)
tree457a3efd29cec24714a8aef99e588f9f27695126
parent48aaabe44182d11f3f66960407e3f25dfe7b9e99 (diff)
parent57c7cb66b681501923f351672dc4acff70736299 (diff)
Merge branch '2023-09-06-assorted-CI-updates' into next
- Merge in a number of changes for CI. The biggest ones of note are that we now support sandbox64 in CI, and Azure has been reworked to generally have more consistent overall runtime for the pipeline.
-rw-r--r--.azure-pipelines.yml372
-rw-r--r--.gitlab-ci.yml51
-rw-r--r--configs/sandbox64_defconfig1
-rw-r--r--test/dm/test-fdt.c4
-rw-r--r--test/print_ut.c42
-rw-r--r--tools/docker/Dockerfile2
6 files changed, 218 insertions, 254 deletions
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index d137d71dd5b..421c5018b40 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -67,16 +67,6 @@ stages:
:^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h
:^include/linux/kconfig.h :^tools/ && exit 1 || exit 0
- - job: cppcheck
- displayName: 'Static code analysis with cppcheck'
- pool:
- vmImage: $(ubuntu_vm)
- container:
- image: $(ci_runner_image)
- options: $(container_option)
- steps:
- - script: cppcheck -j$(nproc) --force --quiet --inline-suppr .
-
- job: docs
displayName: 'Build documentation'
pool:
@@ -92,28 +82,6 @@ stages:
make htmldocs KDOC_WERROR=1
make infodocs
- - job: todo
- displayName: 'Search for TODO within source tree'
- pool:
- vmImage: $(ubuntu_vm)
- container:
- image: $(ci_runner_image)
- options: $(container_option)
- steps:
- - script: grep -r TODO .
- - script: grep -r FIXME .
- - script: grep -r HACK . | grep -v HACKKIT
-
- - job: sloccount
- displayName: 'Some statistics about the code base'
- pool:
- vmImage: $(ubuntu_vm)
- container:
- image: $(ci_runner_image)
- options: $(container_option)
- steps:
- - script: sloccount .
-
- job: maintainers
displayName: 'Ensure all configs have MAINTAINERS entries'
pool:
@@ -126,7 +94,7 @@ stages:
./tools/buildman/buildman --maintainer-check || exit 0
- job: tools_only
- displayName: 'Ensure host tools build'
+ displayName: 'Ensure host tools and env tools build'
pool:
vmImage: $(ubuntu_vm)
container:
@@ -135,16 +103,7 @@ stages:
steps:
- script: |
make tools-only_config tools-only -j$(nproc)
-
- - job: envtools
- displayName: 'Ensure env tools build'
- pool:
- vmImage: $(ubuntu_vm)
- container:
- image: $(ci_runner_image)
- options: $(container_option)
- steps:
- - script: |
+ make mrproper
make tools-only_config envtools -j$(nproc)
- job: utils
@@ -244,19 +203,109 @@ stages:
steps:
- script: make pip
-- stage: test_py
+ - job: create_test_py_wrapper_script
+ displayName: 'Create and stage a wrapper for test.py runs'
+ pool:
+ vmImage: $(ubuntu_vm)
+ steps:
+ - checkout: none
+ - script: |
+ cat << EOF > test.sh
+ #!/bin/bash
+ set -ex
+ # the below corresponds to .gitlab-ci.yml "before_script"
+ cd \${WORK_DIR}
+ git config --global --add safe.directory \${WORK_DIR}
+ git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
+ ln -s travis-ci /tmp/uboot-test-hooks/bin/\`hostname\`
+ ln -s travis-ci /tmp/uboot-test-hooks/py/\`hostname\`
+ grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
+ grub-mkimage --prefix=\"\" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
+ if [[ "\${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then
+ wget -O - https://github.com/riscv-software-src/opensbi/releases/download/v1.2/opensbi-1.2-rv-bin.tar.xz | tar -C /tmp -xJ;
+ export OPENSBI=/tmp/opensbi-1.2-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
+ fi
+ if [[ "\${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "\${TEST_PY_BD}" == "sifive_unleashed" ]]; then
+ wget -O - https://github.com/riscv-software-src/opensbi/releases/download/v1.2/opensbi-1.2-rv-bin.tar.xz | tar -C /tmp -xJ;
+ export OPENSBI=/tmp/opensbi-1.2-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
+ fi
+ # the below corresponds to .gitlab-ci.yml "script"
+ cd \${WORK_DIR}
+ export UBOOT_TRAVIS_BUILD_DIR=/tmp/\${TEST_PY_BD}
+ if [ -n "\${BUILD_ENV}" ]; then
+ export \${BUILD_ENV};
+ fi
+ pip install -r tools/buildman/requirements.txt
+ tools/buildman/buildman -o \${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board \${TEST_PY_BD} \${OVERRIDE}
+ cp ~/grub_x86.efi \${UBOOT_TRAVIS_BUILD_DIR}/
+ cp ~/grub_x64.efi \${UBOOT_TRAVIS_BUILD_DIR}/
+ cp /opt/grub/grubriscv64.efi \${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi
+ cp /opt/grub/grubaa64.efi \${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi
+ cp /opt/grub/grubarm.efi \${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi
+ # create sdcard / spi-nor images for sifive unleashed using genimage
+ if [[ "\${TEST_PY_BD}" == "sifive_unleashed" ]]; then
+ mkdir -p root;
+ cp \${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .;
+ cp \${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .;
+ rm -rf tmp;
+ genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg;
+ cp images/sdcard.img \${UBOOT_TRAVIS_BUILD_DIR}/;
+ rm -rf tmp;
+ genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
+ cp images/spi-nor.img \${UBOOT_TRAVIS_BUILD_DIR}/;
+ fi
+ if [[ "\${TEST_PY_BD}" == "coreboot" ]]; then
+ wget -O - "https://drive.google.com/uc?id=1uJ2VkUQ8czWFZmhJQ90Tp8V_zrJ6BrBH&export=download" |xz -dc >\${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom;
+ wget -O - "https://drive.google.com/uc?id=149Cz-5SZXHNKpi9xg6R_5XITWohu348y&export=download" >cbfstool;
+ chmod a+x cbfstool;
+ ./cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f \${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000;
+ fi
+ virtualenv -p /usr/bin/python3 /tmp/venv
+ . /tmp/venv/bin/activate
+ pip install -r test/py/requirements.txt
+ pip install pytest-azurepipelines
+ export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:\${PATH}
+ export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci
+ # "\${var:+"-k \$var"}" expands to "" if \$var is empty, "-k \$var" if not
+ ./test/py/test.py -ra -o cache_dir="\$UBOOT_TRAVIS_BUILD_DIR"/.pytest_cache --bd \${TEST_PY_BD} \${TEST_PY_ID} \${TEST_PY_TEST_SPEC:+"-k \${TEST_PY_TEST_SPEC}"} --build-dir "\$UBOOT_TRAVIS_BUILD_DIR" --report-dir "\$UBOOT_TRAVIS_BUILD_DIR"
+ # the below corresponds to .gitlab-ci.yml "after_script"
+ rm -rf /tmp/uboot-test-hooks /tmp/venv
+ EOF
+ - task: CopyFiles@2
+ displayName: 'Copy test.sh for later usage'
+ inputs:
+ contents: 'test.sh'
+ targetFolder: '$(Build.ArtifactStagingDirectory)'
+ - publish: '$(Build.ArtifactStagingDirectory)/test.sh'
+ displayName: 'Publish test.sh'
+ artifact: testsh
+
+- stage: test_py_sandbox
jobs:
- - job: test_py
- displayName: 'test.py'
+ - job: test_py_sandbox
+ displayName: 'test.py for sandbox'
pool:
vmImage: $(ubuntu_vm)
strategy:
matrix:
sandbox:
TEST_PY_BD: "sandbox"
+ sandbox_asan:
+ TEST_PY_BD: "sandbox"
+ OVERRIDE: "-a ASAN"
+ TEST_PY_TEST_SPEC: "version"
sandbox_clang:
TEST_PY_BD: "sandbox"
OVERRIDE: "-O clang-16"
+ sandbox_clang_asan:
+ TEST_PY_BD: "sandbox"
+ OVERRIDE: "-O clang-16 -a ASAN"
+ TEST_PY_TEST_SPEC: "version"
+ sandbox64:
+ TEST_PY_BD: "sandbox64"
+ sandbox64_clang:
+ TEST_PY_BD: "sandbox64"
+ OVERRIDE: "-O clang-16"
sandbox_nolto:
TEST_PY_BD: "sandbox"
BUILD_ENV: "NO_LTO=1"
@@ -276,6 +325,47 @@ stages:
BUILD_ENV: "FTRACE=1 NO_LTO=1"
TEST_PY_TEST_SPEC: "trace"
OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000 -a CONFIG_TRACE_BUFFER_SIZE=0x02000000"
+ steps:
+ - download: current
+ artifact: testsh
+ - script: |
+ # make current directory writeable to uboot user inside the container
+ # as sandbox testing need create files like spi flash images, etc.
+ # (TODO: clean up this in the future)
+ chmod 777 .
+ chmod 755 $(Pipeline.Workspace)/testsh/test.sh
+ # Filesystem tests need extra docker args to run
+ set --
+ # mount -o loop needs the loop devices
+ if modprobe loop; then
+ for d in $(find /dev -maxdepth 1 -name 'loop*'); do
+ set -- "$@" --device $d:$d
+ done
+ fi
+ # Needed for mount syscall (for guestmount as well)
+ set -- "$@" --cap-add SYS_ADMIN
+ # Default apparmor profile denies mounts
+ set -- "$@" --security-opt apparmor=unconfined
+ # Some tests using libguestfs-tools need the fuse device to run
+ docker run "$@" --device /dev/fuse:/dev/fuse \
+ -v $PWD:$(work_dir) \
+ -v $(Pipeline.Workspace):$(Pipeline.Workspace) \
+ -e WORK_DIR="${WORK_DIR}" \
+ -e TEST_PY_BD="${TEST_PY_BD}" \
+ -e TEST_PY_ID="${TEST_PY_ID}" \
+ -e TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}" \
+ -e OVERRIDE="${OVERRIDE}" \
+ -e BUILD_ENV="${BUILD_ENV}" $(ci_runner_image) \
+ $(Pipeline.Workspace)/testsh/test.sh
+
+- stage: test_py_qemu
+ jobs:
+ - job: test_py_qemu
+ displayName: 'test.py for QEMU platforms'
+ pool:
+ vmImage: $(ubuntu_vm)
+ strategy:
+ matrix:
coreboot:
TEST_PY_BD: "coreboot"
TEST_PY_ID: "--id qemu"
@@ -372,97 +462,25 @@ stages:
TEST_PY_ID: "--id qemu"
TEST_PY_TEST_SPEC: "not sleep"
steps:
+ - download: current
+ artifact: testsh
- script: |
- cat << EOF > test.sh
- set -ex
- # make environment variables available as tests are running inside a container
- export WORK_DIR="${WORK_DIR}"
- export TEST_PY_BD="${TEST_PY_BD}"
- export TEST_PY_ID="${TEST_PY_ID}"
- export TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}"
- export OVERRIDE="${OVERRIDE}"
- export BUILD_ENV="${BUILD_ENV}"
- EOF
- cat << "EOF" >> test.sh
- # the below corresponds to .gitlab-ci.yml "before_script"
- cd ${WORK_DIR}
- git config --global --add safe.directory ${WORK_DIR}
- git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
- ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
- ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
- grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
- grub-mkimage --prefix=\"\" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
- if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then
- wget -O - https://github.com/riscv-software-src/opensbi/releases/download/v1.2/opensbi-1.2-rv-bin.tar.xz | tar -C /tmp -xJ;
- export OPENSBI=/tmp/opensbi-1.2-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
- fi
- if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
- wget -O - https://github.com/riscv-software-src/opensbi/releases/download/v1.2/opensbi-1.2-rv-bin.tar.xz | tar -C /tmp -xJ;
- export OPENSBI=/tmp/opensbi-1.2-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
- fi
- # the below corresponds to .gitlab-ci.yml "script"
- cd ${WORK_DIR}
- export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD};
- if [ -n "${BUILD_ENV}" ]; then
- export ${BUILD_ENV};
- fi
- pip install -r tools/buildman/requirements.txt
- tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board ${TEST_PY_BD} ${OVERRIDE}
- cp ~/grub_x86.efi ${UBOOT_TRAVIS_BUILD_DIR}/
- cp ~/grub_x64.efi ${UBOOT_TRAVIS_BUILD_DIR}/
- cp /opt/grub/grubriscv64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi
- cp /opt/grub/grubaa64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi
- cp /opt/grub/grubarm.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi
- # create sdcard / spi-nor images for sifive unleashed using genimage
- if [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
- mkdir -p root;
- cp ${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .;
- cp ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .;
- rm -rf tmp;
- genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg;
- cp images/sdcard.img ${UBOOT_TRAVIS_BUILD_DIR}/;
- rm -rf tmp;
- genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
- cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
- fi
- if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
- wget -O - "https://drive.google.com/uc?id=1uJ2VkUQ8czWFZmhJQ90Tp8V_zrJ6BrBH&export=download" |xz -dc >${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom;
- wget -O - "https://drive.google.com/uc?id=149Cz-5SZXHNKpi9xg6R_5XITWohu348y&export=download" >cbfstool;
- chmod a+x cbfstool;
- ./cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000;
- fi
- virtualenv -p /usr/bin/python3 /tmp/venv
- . /tmp/venv/bin/activate
- pip install -r test/py/requirements.txt
- pip install pytest-azurepipelines
- export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
- export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
- # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
- ./test/py/test.py -ra -o cache_dir="$UBOOT_TRAVIS_BUILD_DIR"/.pytest_cache --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR" --report-dir "$UBOOT_TRAVIS_BUILD_DIR";
- # the below corresponds to .gitlab-ci.yml "after_script"
- rm -rf /tmp/uboot-test-hooks /tmp/venv
- EOF
- cat test.sh
# make current directory writeable to uboot user inside the container
# as sandbox testing need create files like spi flash images, etc.
# (TODO: clean up this in the future)
chmod 777 .
- # Filesystem tests need extra docker args to run
- set --
- if [[ "${TEST_PY_BD}" == "sandbox" ]]; then
- # mount -o loop needs the loop devices
- if modprobe loop; then
- for d in $(find /dev -maxdepth 1 -name 'loop*'); do
- set -- "$@" --device $d:$d
- done
- fi
- # Needed for mount syscall (for guestmount as well)
- set -- "$@" --cap-add SYS_ADMIN
- # Default apparmor profile denies mounts
- set -- "$@" --security-opt apparmor=unconfined
- fi
+ chmod 755 $(Pipeline.Workspace)/testsh/test.sh
# Some tests using libguestfs-tools need the fuse device to run
- docker run "$@" --device /dev/fuse:/dev/fuse -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/test.sh
+ docker run "$@" --device /dev/fuse:/dev/fuse \
+ -v $PWD:$(work_dir) \
+ -v $(Pipeline.Workspace):$(Pipeline.Workspace) \
+ -e WORK_DIR="${WORK_DIR}" \
+ -e TEST_PY_BD="${TEST_PY_BD}" \
+ -e TEST_PY_ID="${TEST_PY_ID}" \
+ -e TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}" \
+ -e OVERRIDE="${OVERRIDE}" \
+ -e BUILD_ENV="${BUILD_ENV}" $(ci_runner_image) \
+ $(Pipeline.Workspace)/testsh/test.sh
retryCountOnTaskFailure: 2 # QEMU may be too slow, etc.
- stage: world_build
@@ -476,84 +494,26 @@ stages:
# Use almost the same target division in .travis.yml, only merged
# 3 small build jobs (arc/microblaze/xtensa) into one.
matrix:
- arc_nios2_m68k_microblaze_xtensa:
- BUILDMAN: "arc nios2 microblaze m68k xtensa"
- amlogic:
- BUILDMAN: "amlogic"
- arm11_arm7_arm920t_arm946es:
- BUILDMAN: "arm11 arm7 arm920t arm946es"
- arm926ejs:
- BUILDMAN: "arm926ejs -x freescale,siemens,at91,kirkwood,omap"
- at91_non_armv7:
- BUILDMAN: "at91 -x armv7"
- at91_non_arm926ejs:
- BUILDMAN: "at91 -x arm926ejs"
- boundary_engicam_toradex:
- BUILDMAN: "boundary engicam toradex"
- arm_bcm:
- BUILDMAN: "bcm -x mips"
- nxp_arm32:
- BUILDMAN: "freescale -x powerpc,m68k,aarch64,ls101,ls102,ls104,ls108,ls20,lx216"
- nxp_ls101x_ls108x:
- BUILDMAN: "freescale&ls101 freescale&ls108"
- nxp_ls102x:
- BUILDMAN: "freescale&ls102 -x keymile"
- nxp_ls104x:
- BUILDMAN: "freescale&ls104"
- nxp_ls20xx_lx216x:
- BUILDMAN: "freescale&ls20 freescale&lx216"
- imx6:
- BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex"
+ am33xx_at91_kirkwood_mvebu_omap:
+ BUILDMAN: "am33xx at91_kirkwood mvebu omap -x siemens"
+ amlogic_bcm_boundary_engicam_siemens_technexion_oradex:
+ BUILDMAN: "amlogic bcm boundary engicam siemens technexion toradex -x mips"
+ arm_nxp_minus_imx:
+ BUILDMAN: "freescale -x powerpc,m68k,imx,mx"
imx:
- BUILDMAN: "mx -x mx6,imx8,freescale,technexion,toradex"
- imx8_imx9:
- BUILDMAN: "imx8 imx9 -x engicam,technexion,toradex"
- keymiles_siemens_technexion:
- BUILDMAN: "keymile siemens technexion"
- keystone2_keystone3:
- BUILDMAN: "k2 k3 -x siemens,toradex"
- sandbox_asan:
- BUILDMAN: "sandbox"
- OVERRIDE: "-a ASAN"
- sandbox_clang_asan:
- BUILDMAN: "sandbox"
- OVERRIDE: "-O clang-16 -a ASAN"
- samsung_socfpga_renesas:
- BUILDMAN: "samsung socfpga renesas"
- sun4i_sun9i:
- BUILDMAN: "sun4i sun9i"
- sun5i_sun6i:
- BUILDMAN: "sun5i sun6i"
- sun7i:
- BUILDMAN: "sun7i"
- sun8i:
- BUILDMAN: "sun8i"
- sun50i:
- BUILDMAN: "sun50i"
- arm_catch_all:
- BUILDMAN: "arm -x arm11,arm7,arm9,aarch64,at91,bcm,freescale,kirkwood,mvebu,renesas,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,toradex,socfpga,k2,k3,zynq"
- sandbox_x86:
- BUILDMAN: "sandbox x86"
- kirkwood_mvebu_uniphier:
- BUILDMAN: "kirkwood mvebu uniphier"
- mips:
- BUILDMAN: "mips"
+ BUILDMAN: "mx imx -x boundary,engicam,technexion,toradex"
+ rk:
+ BUILDMAN: "rk"
+ sunxi:
+ BUILDMAN: "sunxi"
powerpc:
- BUILDMAN: "powerpc -x keymile"
- tegra:
- BUILDMAN: "tegra -x toradex"
- am33xx_omap:
- BUILDMAN: "am33xx omap -x siemens"
+ BUILDMAN: "powerpc"
+ arm_catch_all:
+ BUILDMAN: "arm -x aarch64,am33xx,at91,bcm,ls1,kirkwood,mvebu,omap,rk,siemens,mx,sunxi,technexion,toradex"
aarch64_catch_all:
- BUILDMAN: "aarch64 -x amlogic,bcm,imx8,imx9,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
- rk_non_rockchip_64bit:
- BUILDMAN: "rk&aarch64 -x rockchip"
- rk_rockchip_64bit:
- BUILDMAN: "rk&aarch64&rockchip"
- zynq_zynqmp_versal:
- BUILDMAN: "zynq&armv7 versal zynqmp&aarch64"
- riscv:
- BUILDMAN: "riscv"
+ BUILDMAN: "aarch64 -x amlogic,bcm,engicam,imx,ls1,ls2,lx216,mvebu,rk,siemens,sunxi,toradex"
+ everything_but_arm_and_powerpc:
+ BUILDMAN: "-x arm,powerpc"
steps:
- script: |
cat << EOF > build.sh
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6d7ffdd1bbc..6efbd8021c8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -151,22 +151,6 @@ check for new CONFIG symbols outside Kconfig:
:^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h
:^include/linux/kconfig.h :^tools/ && exit 1 || exit 0
-# QA jobs for code analytics
-# static code analysis with cppcheck (we can add --enable=all later)
-cppcheck:
- stage: testsuites
- script:
- - cppcheck -j$(nproc) --force --quiet --inline-suppr .
-
-# search for TODO within source tree
-grep TODO/FIXME/HACK:
- stage: testsuites
- script:
- - grep -r TODO .
- - grep -r FIXME .
- # search for HACK within source tree and ignore HACKKIT board
- - grep -r HACK . | grep -v HACKKIT
-
# build documentation
docs:
stage: testsuites
@@ -177,12 +161,6 @@ docs:
- make htmldocs KDOC_WERROR=1
- make infodocs
-# some statistics about the code base
-sloccount:
- stage: testsuites
- script:
- - sloccount .
-
# ensure all configs have MAINTAINERS entries
Check for configs without MAINTAINERS entry:
stage: testsuites
@@ -190,16 +168,12 @@ Check for configs without MAINTAINERS entry:
- ./tools/buildman/buildman --maintainer-check || exit 0
# Ensure host tools build
-Build tools-only:
- stage: testsuites
- script:
- - make tools-only_config tools-only -j$(nproc)
-
-# Ensure env tools build
-Build envtools:
+Build tools-only and envtools:
stage: testsuites
script:
- - make tools-only_config envtools -j$(nproc)
+ - make tools-only_config tools-only -j$(nproc);
+ make mrproper;
+ make tools-only_config envtools -j$(nproc)
Run binman, buildman, dtoc, Kconfig and patman testsuites:
stage: testsuites
@@ -291,6 +265,23 @@ sandbox without LTO test.py:
BUILD_ENV: "NO_LTO=1"
<<: *buildman_and_testpy_dfn
+sandbox64 test.py:
+ variables:
+ TEST_PY_BD: "sandbox64"
+ <<: *buildman_and_testpy_dfn
+
+sandbox64 with clang test.py:
+ variables:
+ TEST_PY_BD: "sandbox64"
+ OVERRIDE: "-O clang-16"
+ <<: *buildman_and_testpy_dfn
+
+sandbox64 without LTO test.py:
+ variables:
+ TEST_PY_BD: "sandbox64"
+ BUILD_ENV: "NO_LTO=1"
+ <<: *buildman_and_testpy_dfn
+
sandbox_spl test.py:
variables:
TEST_PY_BD: "sandbox_spl"
diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
index 55a01b7eb9d..b97380544a3 100644
--- a/configs/sandbox64_defconfig
+++ b/configs/sandbox64_defconfig
@@ -13,6 +13,7 @@ CONFIG_SYS_MEMTEST_END=0x00101000
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_BOOTSTAGE=y
CONFIG_BOOTSTAGE_REPORT=y
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index eeecd1dc2de..72d0eb57e21 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -135,8 +135,8 @@ int dm_check_devices(struct unit_test_state *uts, int num_devices)
* want to test the code that sets that up
* (testfdt_drv_probe()).
*/
- base = fdtdec_get_addr(gd->fdt_blob, dev_of_offset(dev),
- "ping-expect");
+ base = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
+ "ping-expect", -1);
debug("dev=%d, base=%d: %s\n", i, base,
fdt_get_name(gd->fdt_blob, dev_of_offset(dev), NULL));
diff --git a/test/print_ut.c b/test/print_ut.c
index 47a6ce57840..b26f6281b01 100644
--- a/test/print_ut.c
+++ b/test/print_ut.c
@@ -283,16 +283,21 @@ static int print_do_hex_dump(struct unit_test_state *uts)
/* bytes */
console_record_reset();
print_hex_dump_bytes("", DUMP_PREFIX_ADDRESS, buf, 0x12);
- ut_assert_nextline("00000000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff ..\"3DUfw........");
- ut_assert_nextline("00000010: 10 00 ..");
+ ut_assert_nextline("%0*lx: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff ..\"3DUfw........",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL);
+ ut_assert_nextline("%0*lx: 10 00 ..",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL);
ut_assert_console_end();
/* line length */
console_record_reset();
print_hex_dump("", DUMP_PREFIX_ADDRESS, 8, 1, buf, 0x12, true);
- ut_assert_nextline("00000000: 00 11 22 33 44 55 66 77 ..\"3DUfw");
- ut_assert_nextline("00000008: 88 99 aa bb cc dd ee ff ........");
- ut_assert_nextline("00000010: 10 00 ..");
+ ut_assert_nextline("%0*lx: 00 11 22 33 44 55 66 77 ..\"3DUfw",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL);
+ ut_assert_nextline("%0*lx: 88 99 aa bb cc dd ee ff ........",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x8UL);
+ ut_assert_nextline("%0*lx: 10 00 ..",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL);
ut_assert_console_end();
unmap_sysmem(buf);
@@ -300,31 +305,39 @@ static int print_do_hex_dump(struct unit_test_state *uts)
console_record_reset();
buf[0x41] = 0x41;
print_hex_dump("", DUMP_PREFIX_ADDRESS, 0x40, 1, buf, 0x42, true);
- ut_assert_nextline("00000000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..\"3DUfw........................................................");
- ut_assert_nextline("00000040: 00 41 .A");
+ ut_assert_nextline("%0*lx: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..\"3DUfw........................................................",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL);
+ ut_assert_nextline("%0*lx: 00 41 .A",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x40UL);
ut_assert_console_end();
/* 16-bit */
console_record_reset();
print_hex_dump("", DUMP_PREFIX_ADDRESS, 0, 2, buf, 0x12, true);
- ut_assert_nextline("00000000: 1100 3322 5544 7766 9988 bbaa ddcc ffee ..\"3DUfw........");
- ut_assert_nextline("00000010: 0010 ..");
+ ut_assert_nextline("%0*lx: 1100 3322 5544 7766 9988 bbaa ddcc ffee ..\"3DUfw........",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL);
+ ut_assert_nextline("%0*lx: 0010 ..",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL);
ut_assert_console_end();
unmap_sysmem(buf);
/* 32-bit */
console_record_reset();
print_hex_dump("", DUMP_PREFIX_ADDRESS, 0, 4, buf, 0x14, true);
- ut_assert_nextline("00000000: 33221100 77665544 bbaa9988 ffeeddcc ..\"3DUfw........");
- ut_assert_nextline("00000010: 00000010 ....");
+ ut_assert_nextline("%0*lx: 33221100 77665544 bbaa9988 ffeeddcc ..\"3DUfw........",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL);
+ ut_assert_nextline("%0*lx: 00000010 ....",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL);
ut_assert_console_end();
unmap_sysmem(buf);
/* 64-bit */
console_record_reset();
print_hex_dump("", DUMP_PREFIX_ADDRESS, 16, 8, buf, 0x18, true);
- ut_assert_nextline("00000000: 7766554433221100 ffeeddccbbaa9988 ..\"3DUfw........");
- ut_assert_nextline("00000010: 0000000000000010 ........");
+ ut_assert_nextline("%0*lx: 7766554433221100 ffeeddccbbaa9988 ..\"3DUfw........",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL);
+ ut_assert_nextline("%0*lx: 0000000000000010 ........",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL);
ut_assert_console_end();
unmap_sysmem(buf);
@@ -337,7 +350,8 @@ static int print_do_hex_dump(struct unit_test_state *uts)
buf[4 + i] = 126 + i;
buf[8] = 255;
print_hex_dump("", DUMP_PREFIX_ADDRESS, 0, 1, buf, 10, true);
- ut_assert_nextline("00000000: 00 1f 20 21 7e 7f 80 81 ff 99 .. !~.....");
+ ut_assert_nextline("%0*lx: 00 1f 20 21 7e 7f 80 81 ff 99 .. !~.....",
+ IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL);
ut_assert_console_end();
unmap_sysmem(buf);
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 279b3a3504c..1acb5413c7e 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -43,7 +43,6 @@ RUN apt-get update && apt-get install -y \
clang-16 \
coreutils \
cpio \
- cppcheck \
curl \
device-tree-compiler \
dosfstools \
@@ -105,7 +104,6 @@ RUN apt-get update && apt-get install -y \
python3-virtualenv \
rpm2cpio \
sbsigntool \
- sloccount \
socat \
softhsm2 \
sparse \