Message ID | e2d722a5f3fffc5708c1cc99efad63ab04d25ec3.1674819203.git.oleksii.kurochko@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Basic early_printk and smoke test implementation | expand |
On Fri, 27 Jan 2023, Oleksii Kurochko wrote: > Add check if there is a message 'Hello from C env' presents > in log file to be sure that stack is set and C part of early printk > is working. > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > Acked-by: Stefano Stabellini <sstabellini@kernel.org> > Reviewed-by: Alistair Francis <alistair.francis@wdc.com> > --- > Changes in V7: > - Fix dependecy for qemu-smoke-riscv64-gcc job > --- > Changes in V6: > - Rename container name in test.yaml for .qemu-riscv64. > --- > Changes in V5: > - Nothing changed > --- > Changes in V4: > - Nothing changed > --- > Changes in V3: > - Nothing changed > - All mentioned comments by Stefano in Xen mailing list will be > fixed as a separate patch out of this patch series. > --- > automation/gitlab-ci/test.yaml | 20 ++++++++++++++++++++ > automation/scripts/qemu-smoke-riscv64.sh | 20 ++++++++++++++++++++ > 2 files changed, 40 insertions(+) > create mode 100755 automation/scripts/qemu-smoke-riscv64.sh > > diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml > index afd80adfe1..4dbe1b8af7 100644 > --- a/automation/gitlab-ci/test.yaml > +++ b/automation/gitlab-ci/test.yaml > @@ -54,6 +54,19 @@ > tags: > - x86_64 > > +.qemu-riscv64: > + extends: .test-jobs-common > + variables: > + CONTAINER: archlinux:current-riscv64 > + LOGFILE: qemu-smoke-riscv64.log > + artifacts: > + paths: > + - smoke.serial > + - '*.log' > + when: always > + tags: > + - x86_64 > + > .yocto-test: > extends: .test-jobs-common > script: > @@ -234,6 +247,13 @@ qemu-smoke-x86-64-clang-pvh: > needs: > - debian-unstable-clang-debug > > +qemu-smoke-riscv64-gcc: > + extends: .qemu-riscv64 > + script: > + - ./automation/scripts/qemu-smoke-riscv64.sh 2>&1 | tee ${LOGFILE} > + needs: > + - .gcc-riscv64-cross-build This is wrong, I think it should be: archlinux-current-gcc-riscv64 ? > # Yocto test jobs > yocto-qemuarm64: > extends: .yocto-test-arm64 > diff --git a/automation/scripts/qemu-smoke-riscv64.sh b/automation/scripts/qemu-smoke-riscv64.sh > new file mode 100755 > index 0000000000..e0f06360bc > --- /dev/null > +++ b/automation/scripts/qemu-smoke-riscv64.sh > @@ -0,0 +1,20 @@ > +#!/bin/bash > + > +set -ex > + > +# Run the test > +rm -f smoke.serial > +set +e > + > +timeout -k 1 2 \ > +qemu-system-riscv64 \ > + -M virt \ > + -smp 1 \ > + -nographic \ > + -m 2g \ > + -kernel binaries/xen \ > + |& tee smoke.serial > + > +set -e > +(grep -q "Hello from C env" smoke.serial) || exit 1 > +exit 0 > -- > 2.39.0 >
On Fri, 2023-01-27 at 10:14 -0800, Stefano Stabellini wrote: > On Fri, 27 Jan 2023, Oleksii Kurochko wrote: > > Add check if there is a message 'Hello from C env' presents > > in log file to be sure that stack is set and C part of early printk > > is working. > > > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > > Acked-by: Stefano Stabellini <sstabellini@kernel.org> > > Reviewed-by: Alistair Francis <alistair.francis@wdc.com> > > --- > > Changes in V7: > > - Fix dependecy for qemu-smoke-riscv64-gcc job > > --- > > Changes in V6: > > - Rename container name in test.yaml for .qemu-riscv64. > > --- > > Changes in V5: > > - Nothing changed > > --- > > Changes in V4: > > - Nothing changed > > --- > > Changes in V3: > > - Nothing changed > > - All mentioned comments by Stefano in Xen mailing list will be > > fixed as a separate patch out of this patch series. > > --- > > automation/gitlab-ci/test.yaml | 20 ++++++++++++++++++++ > > automation/scripts/qemu-smoke-riscv64.sh | 20 ++++++++++++++++++++ > > 2 files changed, 40 insertions(+) > > create mode 100755 automation/scripts/qemu-smoke-riscv64.sh > > > > diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab- > > ci/test.yaml > > index afd80adfe1..4dbe1b8af7 100644 > > --- a/automation/gitlab-ci/test.yaml > > +++ b/automation/gitlab-ci/test.yaml > > @@ -54,6 +54,19 @@ > > tags: > > - x86_64 > > > > +.qemu-riscv64: > > + extends: .test-jobs-common > > + variables: > > + CONTAINER: archlinux:current-riscv64 > > + LOGFILE: qemu-smoke-riscv64.log > > + artifacts: > > + paths: > > + - smoke.serial > > + - '*.log' > > + when: always > > + tags: > > + - x86_64 > > + > > .yocto-test: > > extends: .test-jobs-common > > script: > > @@ -234,6 +247,13 @@ qemu-smoke-x86-64-clang-pvh: > > needs: > > - debian-unstable-clang-debug > > > > +qemu-smoke-riscv64-gcc: > > + extends: .qemu-riscv64 > > + script: > > + - ./automation/scripts/qemu-smoke-riscv64.sh 2>&1 | tee > > ${LOGFILE} > > + needs: > > + - .gcc-riscv64-cross-build > > This is wrong, I think it should be: archlinux-current-gcc-riscv64 ? > Thanks for noticing. You are right. I changed it to archlinux-current-gcc-riscv64-debug as CONFIG_EARLY_PRINTK is available only when CONFIG_DEBUG is enabled. Please look at new version of the patch series: https://lore.kernel.org/xen-devel/cover.1675163330.git.oleksii.kurochko@gmail.com/T/#t > > > # Yocto test jobs > > yocto-qemuarm64: > > extends: .yocto-test-arm64 > > diff --git a/automation/scripts/qemu-smoke-riscv64.sh > > b/automation/scripts/qemu-smoke-riscv64.sh > > new file mode 100755 > > index 0000000000..e0f06360bc > > --- /dev/null > > +++ b/automation/scripts/qemu-smoke-riscv64.sh > > @@ -0,0 +1,20 @@ > > +#!/bin/bash > > + > > +set -ex > > + > > +# Run the test > > +rm -f smoke.serial > > +set +e > > + > > +timeout -k 1 2 \ > > +qemu-system-riscv64 \ > > + -M virt \ > > + -smp 1 \ > > + -nographic \ > > + -m 2g \ > > + -kernel binaries/xen \ > > + |& tee smoke.serial > > + > > +set -e > > +(grep -q "Hello from C env" smoke.serial) || exit 1 > > +exit 0 > > -- > > 2.39.0 > >
diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index afd80adfe1..4dbe1b8af7 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -54,6 +54,19 @@ tags: - x86_64 +.qemu-riscv64: + extends: .test-jobs-common + variables: + CONTAINER: archlinux:current-riscv64 + LOGFILE: qemu-smoke-riscv64.log + artifacts: + paths: + - smoke.serial + - '*.log' + when: always + tags: + - x86_64 + .yocto-test: extends: .test-jobs-common script: @@ -234,6 +247,13 @@ qemu-smoke-x86-64-clang-pvh: needs: - debian-unstable-clang-debug +qemu-smoke-riscv64-gcc: + extends: .qemu-riscv64 + script: + - ./automation/scripts/qemu-smoke-riscv64.sh 2>&1 | tee ${LOGFILE} + needs: + - .gcc-riscv64-cross-build + # Yocto test jobs yocto-qemuarm64: extends: .yocto-test-arm64 diff --git a/automation/scripts/qemu-smoke-riscv64.sh b/automation/scripts/qemu-smoke-riscv64.sh new file mode 100755 index 0000000000..e0f06360bc --- /dev/null +++ b/automation/scripts/qemu-smoke-riscv64.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -ex + +# Run the test +rm -f smoke.serial +set +e + +timeout -k 1 2 \ +qemu-system-riscv64 \ + -M virt \ + -smp 1 \ + -nographic \ + -m 2g \ + -kernel binaries/xen \ + |& tee smoke.serial + +set -e +(grep -q "Hello from C env" smoke.serial) || exit 1 +exit 0