Add gnu testsuite execution for OEQA
RFC PATCH 1/1 Add gnu testsuite execution for OEQA
This patch is an RFC for adding support to execute the gnu test suites for binutils, gcc and glibc. With the intention for enabling automated test running of these test suites within the OEQA framework such that they can be executed by the Yocto Autobuilder.
Please note that this patch is not a complete implementation and needs additional work as well as changes based on comments and feedback from this RFC.
The test suites covered need significant resources or build artifacts such that running them on the target is undesirable which rules out the use of ptest. Because of this the test suites can be run on the build host and if necessary call out to the target.
The following implementation creates a number of recipes that are used to build/execute the test suites for the different components. The reason for creating separate recipes is primarily due to dependencies and the need for components in the sysroot. For example binutils has tests that use the C compiler however binutils is a dependency for the C compiler and thus would cause a dependency loop. The issue with sysroots occurs with dependence on *-initial recipes and the test suites needing the non-initial version.
Some issues with splitting the recipes:
- Rebuilds the recipe
- Like gcc-cross-testsuite in this patch, could use a stashed builddir
- Source is duplicated
- gcc gets around this with shared source
- Requires having the recipe files and maintaining them
- Multiple versions of recipes
- Multiple variants of recipes (-cross, -crosssdk, -native if desired)
Target execution is another issue with the test suites. Note that binutils however does not require any target execution. In this patch both qemu-linux-user and ssh target execution solutions are provided. For the purposes of OE, qemu-linux-user may suffice as it has great success at executing gcc and gcc-runtime tests with acceptable success at executing the glibc tests.
The glibc test suite can be problematic to execute for a few reasons:
- Requires access to the exact same filesystem as the build host
- On physical targets and QEMU this requires NFS mounts
- Relies on exact syscall behaviour
- Causes some issues where there are differences between qemu-linux-user and the target architectures kernel
- Can consume significant resources (e.g. OOM, or worse trigger bugs/panics in kernel drivers)
- Slow to execute
- With QEMU system emulation it can take many hours
- With some physical target architectures it can take days (e.g. microblaze)
The significantly increased execution speed of qemu-linux-user vs qemu system with glibc, and the ability for qemu-linux-user to be executed in parallel with the gcc test suite makes it a strong solution for continuous integration testing.
The following table shows results for the major test suite components running with qemu-linux-user execution. The numbers represent 'failed tests'/'total tests'. The machines used to run the tests are the qemu* machine for the associated architecture, not all qemu machines available in oe-core were tested. It is important to note that these results are only indicative of qemu-linux-user behaviour and that there are a number of test failures that are due to issues not specific to qemu-linux-user.
| gcc | g++ | libstdc++ | binutils | gas | ld | glibc x86-64 | 589/135169 | 457/131913 | 1/13008 | 0/ 236 | 0/ 1256 | 166/ 1975 | 1423/ 5991 arm | 469/123905 | 365/128416 | 19/12788 | 0/ 191 | 0/ 872 | 155/ 1479 | 64/ 5130 aarch64 | 460/130904 | 364/128977 | 1/12789 | 0/ 190 | 0/ 442 | 157/ 1474 | 76/ 5882 powerpc | 18336/116624 | 6747/128636 | 33/12996 | 0/ 187 | 1/ 265 | 157/ 1352 | 1218/ 5110 mips64 | 1174/134744 | 401/130195 | 22/12780 | 0/ 213 | 43/ 7245 | 803/ 1634 | 2032/ 5847 riscv64 | 456/106399 | 376/128427 | 1/12748 | 0/ 185 | 0/ 257 | 152/ 1062 | 88/ 5847
This patch also introduces some OEQA test cases which cover running the test suites. However in this specific patch it does not include any implementation for the automated setup of qemu system emulation testing with runqemu and NFS mounting for glibc tests. Also not included in these test cases is any known test failure filtering.
I would also be interested in the opinion with regards to whether these test suites should be executed as part of the existing Yocto Autobuilder instance.
--- meta/lib/oeqa/selftest/cases/toolchain.py | 24 +++++ meta/recipes-core/glibc/glibc-testsuite_2.29.bb | 120 +++++++++++++++++++++ .../binutils/binutils-cross-testsuite_2.32.bb | 25 +++++ meta/recipes-devtools/gcc/gcc-common.inc | 3 +- .../gcc/gcc-cross-testsuite_9.1.bb | 37 +++++++ .../gcc/gcc-runtime-testsuite_9.1.bb | 37 +++++++ meta/recipes-devtools/gcc/gcc-testsuite.inc | 65 +++++++++++ 7 files changed, 310 insertions(+), 1 deletion(-) create mode 100644 meta/lib/oeqa/selftest/cases/toolchain.py create mode 100644 meta/recipes-core/glibc/glibc-testsuite_2.29.bb create mode 100644 meta/recipes-devtools/binutils/binutils-cross-testsuite_2.32.bb create mode 100644 meta/recipes-devtools/gcc/gcc-cross-testsuite_9.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-runtime-testsuite_9.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-testsuite.inc
meta/lib/oeqa/selftest/cases/toolchain.py new file +24 -0
@@ -0,0 +1,24 @@ +# SPDX-License-Identifier: MIT +import os +from oeqa.selftest.case import OESelftestTestCase +from oeqa.utils.commands import bitbake, get_bb_var + +class OEToolchainSelfTest(OESelftestTestCase): + """ + Test cases for OE's toolchain: binutils, gcc and glibc + """ + + def test_binutils_cross(self): + cross_pn = "binutils-cross-testsuite-{0}".format(get_bb_var("TUNE_ARCH")) + bitbake("{0} -c check".format(cross_pn)) + + def test_gcc_cross(self): + cross_pn = "gcc-cross-testsuite-{0}".format(get_bb_var("TUNE_ARCH")) + bitbake("{0} -c check".format(cross_pn)) + + def test_gcc_runtime(self): + bitbake("gcc-runtime-testsuite -c check") + + def test_glibc(self): + bitbake("glibc-testsuite -c check") +
meta/recipes-core/glibc/glibc-testsuite_2.29.bb new file +120 -0
120 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils-cross-testsuite_2.32.bb new file +25 -0
@@ -0,0 +1,25 @@ +require binutils-cross_${PV}.bb + +PN = "binutils-cross-testsuite-${TARGET_ARCH}" + +PROVIDES = "" + +DEPENDS += "dejagnu-native expect-native" + +DEPENDS += "virtual/${TARGET_PREFIX}gcc" +DEPENDS += "virtual/${TARGET_PREFIX}compilerlibs" +DEPENDS += "virtual/libc" + +# these are needed for testsuite +export CC_FOR_TARGET = "${TARGET_PREFIX}gcc" +export CXX_FOR_TARGET = "${TARGET_PREFIX}g++" +export GCC_FOR_TARGET = "${TARGET_PREFIX}gcc" + +EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} " + +do_check[dirs] = "${B}" +do_check() { + oe_runmake check +} +addtask check before do_build after do_compile +
meta/recipes-devtools/gcc/gcc-common.inc +2 -1
@@ -17,7 +17,8 @@ python extract_stashed_builddir () { src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}") dest = d.getVar("B") oe.path.copyhardlinktree(src, dest) - staging_processfixme([src + "/fixmepath"], dest, dest, dest, d) + #staging_processfixme([src + "/fixmepath"], dest, dest, dest, d) + staging_processfixme([src + "/fixmepath"], dest, d.getVar("RECIPE_SYSROOT"), d.getVar("RECIPE_SYSROOT_NATIVE"), d) } def get_gcc_float_setting(bb, d):
meta/recipes-devtools/gcc/gcc-cross-testsuite_9.1.bb new file +37 -0
@@ -0,0 +1,37 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require gcc-cross.inc + +PN = "gcc-cross-testsuite-${TARGET_ARCH}" + +PROVIDES = "" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS += "dejagnu-native expect-native" +DEPENDS += "qemu-native" + +DEPENDS += "virtual/libc" +DEPENDS += "virtual/${TARGET_PREFIX}compilerlibs" + +require gcc-testsuite.inc + +EXTRACONFFUNCS += "extract_stashed_builddir" +do_configure[depends] += "${COMPILERDEP}" + +do_configure() { +} + +do_compile[noexec] = "1" +do_install[noexec] = "1" +do_package[noexec] = "1" + +EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} " + +do_check[prefuncs] += "check_prepare" +do_check[dirs] = "${WORKDIR}/dejagnu ${B}" +do_check() { + export DEJAGNU="${WORKDIR}/dejagnu/site.exp" + oe_runmake check-gcc check-g++ RUNTESTFLAGS="--target_board=qemu-linux-user" + #oe_runmake check-gcc check-g++ RUNTESTFLAGS="--target_board=linux-ssh" +} +addtask check before do_build after do_configure +
meta/recipes-devtools/gcc/gcc-runtime-testsuite_9.1.bb new file +37 -0
@@ -0,0 +1,37 @@ +require gcc-runtime_${PV}.bb + +PROVIDES = "" +DEPENDS += "dejagnu-native expect-native" +DEPENDS += "qemu-native" + +require gcc-testsuite.inc + +DEPENDS += "gcc-runtime" + +python () { + check = [] + for i in d.getVar("RUNTIMETARGET").split(): + check.append("check-target-{0}".format(i)) + d.setVar("RUNTIMETARGET_CHECK", " ".join(check)) +} + +do_configure_append() { + # HACK: this works around the configure setting CXX with -nostd* args + sed -i 's/-nostdinc++ -nostdlib++//g' $(find ${B} -name testsuite_flags | head -1) +} + +EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} " + +do_check[prefuncs] += "check_prepare" +do_check[dirs] = "${WORKDIR}/dejagnu ${B}" +do_check() { + export DEJAGNU="${WORKDIR}/dejagnu/site.exp" + + # no test should need more that 10G of memory, this prevents tests like pthread7-rope from memory leaking + ulimit -Sm 10485760 + + oe_runmake ${RUNTIMETARGET_CHECK} RUNTESTFLAGS="--target_board=qemu-linux-user" + #oe_runmake ${RUNTIMETARGET_CHECK} RUNTESTFLAGS="--target_board=linux-ssh" +} +addtask check before do_build after do_compile +
meta/recipes-devtools/gcc/gcc-testsuite.inc new file +65 -0
65 lines not on this page · raw message
---
2.20.1
Quoted 7 lines · Nathan Rossi
This patch is an RFC for adding support to execute the gnu test suites for binutils, gcc and glibc. With the intention for enabling automated test running of these test suites within the OEQA framework such that they can be executed by the Yocto Autobuilder.
Please note that this patch is not a complete implementation and needs additional work as well as changes based on comments and feedback from this RFC.
This is rather cool, thanks!
Looking at this was on my todo list once we got the existing OEQA, ptest and ltp setups working well. I'm very happy to have been beaten to it though.
Quoted 5 lines
The test suites covered need significant resources or build artifacts such that running them on the target is undesirable which rules out the use of ptest. Because of this the test suites can be run on the build host and if necessary call out to the target.
Quoted 7 lines
The following implementation creates a number of recipes that are used to build/execute the test suites for the different components. The reason for creating separate recipes is primarily due to dependencies and the need for components in the sysroot. For example binutils has tests that use the C compiler however binutils is a dependency for the C compiler and thus would cause a dependency loop. The issue with sysroots occurs with dependence on
*-initialrecipes and the test suites needing the non-initial version.
I think this means you're working with something pre-warrior as we got rid of most of the *-initial recipes apart from libgcc-initial.
Quoted 8 lines
Some issues with splitting the recipes:
- Rebuilds the recipe
- Like gcc-cross-testsuite in this patch, could use a stashed builddir
- Source is duplicated
- gcc gets around this with shared source
- Requires having the recipe files and maintaining them
- Multiple versions of recipes
- Multiple variants of recipes (-cross, -crosssdk, -native if desired)
It might be possible to have multiple tasks in these recipes and have the later tasks depend on other pieces of the system like the C compiler, thereby avoiding the need for splitting if only the later tasks have the dependencies. Not sure if it would work or not but may be worth exploring.
Quoted 5 lines
Target execution is another issue with the test suites. Note that binutils however does not require any target execution. In this patch both qemu-linux-user and ssh target execution solutions are provided. For the purposes of OE, qemu-linux-user may suffice as it has great success at executing gcc and gcc-runtime tests with acceptable success at executing the glibc tests.
I feel fairly strongly that we probably want to execute these kinds of tests under qemu system mode, not the user mode. The reason is that we want to be as close to the target environment as we can be and that qemu-user testing is at least as much of a test of qemu's emulation that it is the behaviour of the compiler or libc (libc in particular). I was thinking this and then later read you confirmed my suspicions below...
Quoted 3 lines
The glibc test suite can be problematic to execute for a few reasons:
- Requires access to the exact same filesystem as the build host
- On physical targets and QEMU this requires NFS mounts
We do have unfs support already under qemu which might make this possible.
Quoted 3 lines
- Relies on exact syscall behaviour
- Causes some issues where there are differences between qemu-linux-user and the target architectures kernel
Right, this one worries me and pushes me to want to use qemu system mode.
Quoted 2 lines
- Can consume significant resources (e.g. OOM, or worse trigger bugs/panics in kernel drivers)
Any rough guide to what significant is here? ptest needs 1GB memory for example. qemu-system mode should limit that to the VMs at least?
Quoted 2 lines
- Slow to execute
- With QEMU system emulation it can take many hours
We do have KVM acceleration for x86 and arm FWIW which is probably where we'd start testing this on the autobuilder.
Quoted 6 lines
- With some physical target architectures it can take days (e.g. microblaze)
The significantly increased execution speed of qemu-linux-user vs qemu system with glibc, and the ability for qemu-linux-user to be executed in parallel with the gcc test suite makes it a strong solution for continuous integration testing.
Was that with or without KVM?
Quoted 8 lines
The following table shows results for the major test suite components running with qemu-linux-user execution. The numbers represent 'failed tests'/'total tests'. The machines used to run the tests are the
qemu*machine for the associated architecture, not all qemu machines available in oe-core were tested. It is important to note that these results are only indicative of qemu-linux-user behaviour and that there are a number of test failures that are due to issues not specific to qemu-linux-user.
Quoted 7 lines
| gcc | g++ | libstdc++ | binutils | gas | ld | glibc x86-64 | 589/135169 | 457/131913 | 1/13008 | 0/ 236 | 0/ 1256 | 166/ 1975 | 1423/ 5991 arm | 469/123905 | 365/128416 | 19/12788 | 0/ 191 | 0/ 872 | 155/ 1479 | 64/ 5130 aarch64 | 460/130904 | 364/128977 | 1/12789 | 0/ 190 | 0/ 442 | 157/ 1474 | 76/ 5882 powerpc | 18336/116624 | 6747/128636 | 33/12996 | 0/ 187 | 1/ 265 | 157/ 1352 | 1218/ 5110 mips64 | 1174/134744 | 401/130195 | 22/12780 | 0/ 213 | 43/ 7245 | 803/ 1634 | 2032/ 5847 riscv64 | 456/106399 | 376/128427 | 1/12748 | 0/ 185 | 0/ 257 | 152/ 1062 | 88/ 5847
I'd be interested to know how these numbers compare to the ssh execution...
The binutils results look good! :)
Quoted 5 lines
This patch also introduces some OEQA test cases which cover running the test suites. However in this specific patch it does not include any implementation for the automated setup of qemu system emulation testing with runqemu and NFS mounting for glibc tests. Also not included in these test cases is any known test failure filtering.
The known test failure filtering is something we can use the OEQA backend for, I'd envisage this being intergrated in a similar way to the way we added ptest/ltp/ltp-posix there.
Quoted 2 lines
I would also be interested in the opinion with regards to whether these test suites should be executed as part of the existing Yocto Autobuilder instance.
Short answer is yes. We won't run them all the time but when it makes sense and I'd happily see the autobuilder apart to be able to trigger these appropriately. We can probably run the KVM accelerated arches more often than the others.
Plenty of implementation details to further discuss but this is great to see!
Cheers,
Richard
Hey guys,
Quoted 34 lines · Richard Purdie
Quoted 1 line · Nathan Rossi
This patch is an RFC for adding support to execute the gnu test suites
for
Quoted 1 line
binutils, gcc and glibc. With the intention for enabling automated test
running
Quoted 1 line
of these test suites within the OEQA framework such that they can be
executed by
Quoted 4 lines
the Yocto Autobuilder.
Please note that this patch is not a complete implementation and needs additional work as well as changes based on comments and feedback from
this RFC.
This is rather cool, thanks!
Looking at this was on my todo list once we got the existing OEQA, ptest and ltp setups working well. I'm very happy to have been beaten to it though.
Quoted 1 line
The test suites covered need significant resources or build artifacts
such
Quoted 1 line
that running them on the target is undesirable which rules out the use
of ptest.
Quoted 1 line
Because of this the test suites can be run on the build host and if
necessary
Quoted 4 lines
call out to the target.
The following implementation creates a number of recipes that are used to build/execute the test suites for the different components. The reason
for
Quoted 1 line
creating separate recipes is primarily due to dependencies and the need
for
Quoted 2 lines
components in the sysroot. For example binutils has tests that use the C compiler however binutils is a dependency for the C compiler and thus
Quoted 8 lines
would
Quoted 1 line
cause a dependency loop. The issue with sysroots occurs with dependence
on
Quoted 1 line
*-initialrecipes and the test suites needing the non-initial version.I think this means you're working with something pre-warrior as we got rid of most of the *-initial recipes apart from libgcc-initial.
Yup, I agree with this, and yes, we still have initial recipes, which is
in what Nathan based his work.
Quoted 9 lines
Quoted 8 lines
Some issues with splitting the recipes:
- Rebuilds the recipe
- Like gcc-cross-testsuite in this patch, could use a stashed builddir
- Source is duplicated
- gcc gets around this with shared source
- Requires having the recipe files and maintaining them
- Multiple versions of recipes
- Multiple variants of recipes (-cross, -crosssdk, -native if desired)
Quoted 6 lines
It might be possible to have multiple tasks in these recipes and have the later tasks depend on other pieces of the system like the C compiler, thereby avoiding the need for splitting if only the later tasks have the dependencies. Not sure if it would work or not but may be worth exploring.
Worth exploring but might end up being more convoluted than necessary IMO. Benefit vs Complication issue.
Quoted 9 lines
Quoted 1 line
Target execution is another issue with the test suites. Note that
binutils
Quoted 3 lines
however does not require any target execution. In this patch both qemu-linux-user and ssh target execution solutions are provided. For the purposes of OE, qemu-linux-user may suffice as it has great success at
executing
Quoted 1 line
gcc and gcc-runtime tests with acceptable success at executing the glibc
tests.
Quoted 8 lines
I feel fairly strongly that we probably want to execute these kinds of tests under qemu system mode, not the user mode. The reason is that we want to be as close to the target environment as we can be and that qemu-user testing is at least as much of a test of qemu's emulation that it is the behaviour of the compiler or libc (libc in particular). I was thinking this and then later read you confirmed my suspicions below...
I believe the QEMU recipe splitting is also new in the tree, and Nathan isn't basing his work on that,
so there might be some issues there.
Quoted 20 lines
Quoted 4 lines
The glibc test suite can be problematic to execute for a few reasons:
- Requires access to the exact same filesystem as the build host
- On physical targets and QEMU this requires NFS mountsWe do have unfs support already under qemu which might make this possible.
Quoted 2 lines
- Relies on exact syscall behaviour
- Causes some issues where there are differences betweenqemu-linux-user and
Quoted 1 line
the target architectures kernel
Right, this one worries me and pushes me to want to use qemu system mode.
Quoted 1 line
- Can consume significant resources (e.g. OOM, or worse trigger
bugs/panics in
Quoted 1 line
kernel drivers)
Quoted 9 lines
Any rough guide to what significant is here? ptest needs 1GB memory for example. qemu-system mode should limit that to the VMs at least?
Quoted 2 lines
- Slow to execute
- With QEMU system emulation it can take many hoursWe do have KVM acceleration for x86 and arm FWIW which is probably where we'd start testing this on the autobuilder.
Excuse me if I'm mistaken, but would this be something similar to what we did for python3 optimization?
Quoted 41 lines
Quoted 2 lines
- With some physical target architectures it can take days (e.g.
microblaze)
Quoted 2 lines
The significantly increased execution speed of qemu-linux-user vs qemu
system
Quoted 1 line
with glibc, and the ability for qemu-linux-user to be executed in
parallel with
Quoted 2 lines
the gcc test suite makes it a strong solution for continuous integration testing.
Was that with or without KVM?
Quoted 1 line
The following table shows results for the major test suite components
running
Quoted 1 line
with qemu-linux-user execution. The numbers represent 'failed
tests'/'total
Quoted 1 line
tests'. The machines used to run the tests are the
qemu*machine forthe
Quoted 1 line
associated architecture, not all qemu machines available in oe-core were
tested.
Quoted 2 lines
It is important to note that these results are only indicative of qemu-linux-user behaviour and that there are a number of test failures
that are
Quoted 3 lines
due to issues not specific to qemu-linux-user.
| gcc | g++ | libstdc++ | binutils | gas
| ld | glibc > x86-64 | 589/135169 | 457/131913 | 1/13008 | 0/ 236 | 0/ 1256 | 166/ 1975 | 1423/ 5991 > arm | 469/123905 | 365/128416 | 19/12788 | 0/ 191 | 0/ 872 | 155/ 1479 | 64/ 5130 > aarch64 | 460/130904 | 364/128977 | 1/12789 | 0/ 190 | 0/ 442 | 157/ 1474 | 76/ 5882 > powerpc | 18336/116624 | 6747/128636 | 33/12996 | 0/ 187 | 1/ 265 | 157/ 1352 | 1218/ 5110 > mips64 | 1174/134744 | 401/130195 | 22/12780 | 0/ 213 | 43/ 7245 | 803/ 1634 | 2032/ 5847 > riscv64 | 456/106399 | 376/128427 | 1/12748 | 0/ 185 | 0/ 257 | 152/ 1062 | 88/ 5847
Quoted 6 lines
I'd be interested to know how these numbers compare to the ssh execution...
The binutils results look good! :)
This is awesome!, some are a little scary though (percentage wise)
Quoted 15 lines
Quoted 1 line
This patch also introduces some OEQA test cases which cover running the
test
Quoted 1 line
suites. However in this specific patch it does not include any
implementation
Quoted 1 line
for the automated setup of qemu system emulation testing with runqemu
and NFS
Quoted 1 line
mounting for glibc tests. Also not included in these test cases is any
known
Quoted 1 line
test failure filtering.
The known test failure filtering is something we can use the OEQA backend for, I'd envisage this being intergrated in a similar way to the way we added ptest/ltp/ltp-posix there.
Quoted 1 line
I would also be interested in the opinion with regards to whether these
Quoted 9 lines
test
Quoted 1 line
suites should be executed as part of the existing Yocto Autobuilder
instance.
Short answer is yes. We won't run them all the time but when it makes sense and I'd happily see the autobuilder apart to be able to trigger these appropriately. We can probably run the KVM accelerated arches more often than the others.
Would we separate test cases into different sets/suites based on importance?, and yes
I'd love to see this in the Yocto AB.
Quoted 8 lines
Plenty of implementation details to further discuss but this is great to see!
Cheers,
Richard
This looks good, great work Nathan!, my only other comment would be that we would
probably need two versions of the patches (one for thud) and one for master/warrior where
some of the changes to *-initial recipes and qemu- system/user have happened already.
Regards,
Alejandro
Quoted 6 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
*M.S. Alejandro Enedino Herna**ndez Samaniego*
Quoted 76 lines · Alejandro Enedino Hernandez Samaniego
Hey guys,
Quoted 29 lines · Richard Purdie
Quoted 7 lines · Nathan Rossi
This patch is an RFC for adding support to execute the gnu test suites for binutils, gcc and glibc. With the intention for enabling automated test running of these test suites within the OEQA framework such that they can be executed by the Yocto Autobuilder.
Please note that this patch is not a complete implementation and needs additional work as well as changes based on comments and feedback from this RFC.
This is rather cool, thanks!
Looking at this was on my todo list once we got the existing OEQA, ptest and ltp setups working well. I'm very happy to have been beaten to it though.
Quoted 5 lines
The test suites covered need significant resources or build artifacts such that running them on the target is undesirable which rules out the use of ptest. Because of this the test suites can be run on the build host and if necessary call out to the target.
Quoted 7 lines
The following implementation creates a number of recipes that are used to build/execute the test suites for the different components. The reason for creating separate recipes is primarily due to dependencies and the need for components in the sysroot. For example binutils has tests that use the C compiler however binutils is a dependency for the C compiler and thus would cause a dependency loop. The issue with sysroots occurs with dependence on
*-initialrecipes and the test suites needing the non-initial version.Quoted 2 lines
I think this means you're working with something pre-warrior as we got rid of most of the *-initial recipes apart from libgcc-initial.
Yup, I agree with this, and yes, we still have initial recipes, which is in what Nathan based his work.
Quoted 10 lines
Quoted 9 lines
Some issues with splitting the recipes:
- Rebuilds the recipe
- Like gcc-cross-testsuite in this patch, could use a stashed builddir
- Source is duplicated
- gcc gets around this with shared source
- Requires having the recipe files and maintaining them
- Multiple versions of recipes
- Multiple variants of recipes (-cross, -crosssdk, -native if desired)Quoted 5 lines
It might be possible to have multiple tasks in these recipes and have the later tasks depend on other pieces of the system like the C compiler, thereby avoiding the need for splitting if only the later tasks have the dependencies. Not sure if it would work or not but may be worth exploring.
Worth exploring but might end up being more convoluted than necessary IMO. Benefit vs Complication issue.
Quoted 7 lines
Quoted 6 lines
Target execution is another issue with the test suites. Note that binutils however does not require any target execution. In this patch both qemu-linux-user and ssh target execution solutions are provided. For the purposes of OE, qemu-linux-user may suffice as it has great success at executing gcc and gcc-runtime tests with acceptable success at executing the glibc tests.
Quoted 7 lines
I feel fairly strongly that we probably want to execute these kinds of tests under qemu system mode, not the user mode. The reason is that we want to be as close to the target environment as we can be and that qemu-user testing is at least as much of a test of qemu's emulation that it is the behaviour of the compiler or libc (libc in particular). I was thinking this and then later read you confirmed my suspicions below...
Quoted 2 lines
I believe the QEMU recipe splitting is also new in the tree, and Nathan isn't basing his work on that, so there might be some issues there.
I have been working against a relatively recent master, and have been rebasing every now and again. The qemu system/user split likely will not be a big problem, since at least at this point I have kept all the qemu system tooling as runqemu setup in OEQA. So would work fine on master/warrior/thud.
Quoted 82 lines
Quoted 20 lines
Quoted 6 lines
The glibc test suite can be problematic to execute for a few reasons:
- Requires access to the exact same filesystem as the build host
- On physical targets and QEMU this requires NFS mountsWe do have unfs support already under qemu which might make this possible.
Quoted 3 lines
- Relies on exact syscall behaviour
- Causes some issues where there are differences between qemu-linux-user and the target architectures kernelRight, this one worries me and pushes me to want to use qemu system mode.
Quoted 2 lines
- Can consume significant resources (e.g. OOM, or worse trigger bugs/panics in kernel drivers)
Quoted 8 lines
Any rough guide to what significant is here? ptest needs 1GB memory for example. qemu-system mode should limit that to the VMs at least?
Quoted 2 lines
- Slow to execute
- With QEMU system emulation it can take many hoursWe do have KVM acceleration for x86 and arm FWIW which is probably where we'd start testing this on the autobuilder.
Excuse me if I'm mistaken, but would this be something similar to what we did for python3 optimization?
Quoted 27 lines
Quoted 8 lines
- With some physical target architectures it can take days (e.g. microblaze)
The significantly increased execution speed of qemu-linux-user vs qemu system with glibc, and the ability for qemu-linux-user to be executed in parallel with the gcc test suite makes it a strong solution for continuous integration testing.
Was that with or without KVM?
Quoted 8 lines
The following table shows results for the major test suite components running with qemu-linux-user execution. The numbers represent 'failed tests'/'total tests'. The machines used to run the tests are the
qemu*machine for the associated architecture, not all qemu machines available in oe-core were tested. It is important to note that these results are only indicative of qemu-linux-user behaviour and that there are a number of test failures that are due to issues not specific to qemu-linux-user.Quoted 7 lines
| gcc | g++ | libstdc++ | binutils | gas | ld | glibc x86-64 | 589/135169 | 457/131913 | 1/13008 | 0/ 236 | 0/ 1256 | 166/ 1975 | 1423/ 5991 arm | 469/123905 | 365/128416 | 19/12788 | 0/ 191 | 0/ 872 | 155/ 1479 | 64/ 5130 aarch64 | 460/130904 | 364/128977 | 1/12789 | 0/ 190 | 0/ 442 | 157/ 1474 | 76/ 5882 powerpc | 18336/116624 | 6747/128636 | 33/12996 | 0/ 187 | 1/ 265 | 157/ 1352 | 1218/ 5110 mips64 | 1174/134744 | 401/130195 | 22/12780 | 0/ 213 | 43/ 7245 | 803/ 1634 | 2032/ 5847 riscv64 | 456/106399 | 376/128427 | 1/12748 | 0/ 185 | 0/ 257 | 152/ 1062 | 88/ 5847Quoted 5 lines
I'd be interested to know how these numbers compare to the ssh execution...
The binutils results look good! :)
This is awesome!, some are a little scary though (percentage wise)
Quoted 14 lines
Quoted 6 lines
This patch also introduces some OEQA test cases which cover running the test suites. However in this specific patch it does not include any implementation for the automated setup of qemu system emulation testing with runqemu and NFS mounting for glibc tests. Also not included in these test cases is any known test failure filtering.
The known test failure filtering is something we can use the OEQA backend for, I'd envisage this being intergrated in a similar way to the way we added ptest/ltp/ltp-posix there.
Quoted 2 lines
I would also be interested in the opinion with regards to whether these test suites should be executed as part of the existing Yocto Autobuilder instance.
Quoted 8 lines
Quoted 4 lines
Short answer is yes. We won't run them all the time but when it makes sense and I'd happily see the autobuilder apart to be able to trigger these appropriately. We can probably run the KVM accelerated arches more often than the others.
Would we separate test cases into different sets/suites based on importance?, and yes I'd love to see this in the Yocto AB.
It might be worth splitting out the sub component test suites, e.g. check-gcc and check-g++ as separate OEQA test cases. Which would probably help to run parallel system qemu instances. However it would be more complicated to split further.
Quoted 5 lines
Quoted 5 lines
Plenty of implementation details to further discuss but this is great to see!
Quoted 8 lines
Quoted 4 lines
Cheers,
Richard
This looks good, great work Nathan!, my only other comment would be that we would probably need two versions of the patches (one for thud) and one for master/warrior where some of the changes to *-initial recipes and qemu- system/user have happened already.
Certainly possible to make a thud version, but best to do that once a version for master is completed.
Thanks,
Nathan
Quoted 17 lines
Regards,
Alejandro
Quoted 6 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core--
M.S. Alejandro Enedino Hernandez Samaniego
Quoted 29 lines · Richard Purdie
Quoted 7 lines · Nathan Rossi
This patch is an RFC for adding support to execute the gnu test suites for binutils, gcc and glibc. With the intention for enabling automated test running of these test suites within the OEQA framework such that they can be executed by the Yocto Autobuilder.
Please note that this patch is not a complete implementation and needs additional work as well as changes based on comments and feedback from this RFC.
This is rather cool, thanks!
Looking at this was on my todo list once we got the existing OEQA, ptest and ltp setups working well. I'm very happy to have been beaten to it though.
Quoted 5 lines
The test suites covered need significant resources or build artifacts such that running them on the target is undesirable which rules out the use of ptest. Because of this the test suites can be run on the build host and if necessary call out to the target.
Quoted 7 lines
The following implementation creates a number of recipes that are used to build/execute the test suites for the different components. The reason for creating separate recipes is primarily due to dependencies and the need for components in the sysroot. For example binutils has tests that use the C compiler however binutils is a dependency for the C compiler and thus would cause a dependency loop. The issue with sysroots occurs with dependence on
*-initialrecipes and the test suites needing the non-initial version.
Quoted 2 lines
I think this means you're working with something pre-warrior as we got rid of most of the *-initial recipes apart from libgcc-initial.
I have been working against master (maybe a few days old). However I hit the sysroot collision in gcc-cross with what I thought was a -initial recipe. So I split it out and kept moving ahead.
Turns out it was just one file, specifically an empty limits.h that is created by the gcc-cross recipe itself.
(http://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-cross.inc#n49)
Quoted 10 lines
Quoted 9 lines
Some issues with splitting the recipes:
- Rebuilds the recipe
- Like gcc-cross-testsuite in this patch, could use a stashed builddir
- Source is duplicated
- gcc gets around this with shared source
- Requires having the recipe files and maintaining them
- Multiple versions of recipes
- Multiple variants of recipes (-cross, -crosssdk, -native if desired)
Quoted 5 lines
It might be possible to have multiple tasks in these recipes and have the later tasks depend on other pieces of the system like the C compiler, thereby avoiding the need for splitting if only the later tasks have the dependencies. Not sure if it would work or not but may be worth exploring.
Initially I had started out with binutils having the do_check task which depended on the populate_sysroot task of the associated dependencies and this was working well for binutils at least. The only concern I had with this was whether tainting the recipe sysroots would be problematic?
Given the sysroot/-initial issue with gcc was not a dependency problem I have tried with the check tasks in gcc-cross and gcc-runtime and there does not appear to have any issues. So splitting the recipes for binutils, gcc-cross and gcc-runtime is not necessary.
For glibc the sysroot has libgcc-initial, so the sysroot collision is still a problem for it.
Quoted 15 lines
Quoted 6 lines
Target execution is another issue with the test suites. Note that binutils however does not require any target execution. In this patch both qemu-linux-user and ssh target execution solutions are provided. For the purposes of OE, qemu-linux-user may suffice as it has great success at executing gcc and gcc-runtime tests with acceptable success at executing the glibc tests.
I feel fairly strongly that we probably want to execute these kinds of tests under qemu system mode, not the user mode. The reason is that we want to be as close to the target environment as we can be and that qemu-user testing is at least as much of a test of qemu's emulation that it is the behaviour of the compiler or libc (libc in particular). I was thinking this and then later read you confirmed my suspicions below...
Quoted 6 lines
Quoted 3 lines
The glibc test suite can be problematic to execute for a few reasons:
- Requires access to the exact same filesystem as the build host
- On physical targets and QEMU this requires NFS mountsWe do have unfs support already under qemu which might make this possible.
unfs works great and I was using it for testing out the ssh support. However I did notice that is does rely on the host having rpcbind installed. This does prevent running the tests without root (even if using slirp for qemu).
Quoted 5 lines
Quoted 4 lines
- Relies on exact syscall behaviour
- Causes some issues where there are differences between qemu-linux-user and the target architectures kernel
Quoted 8 lines
Right, this one worries me and pushes me to want to use qemu system mode.
Quoted 2 lines
- Can consume significant resources (e.g. OOM, or worse trigger bugs/panics in kernel drivers)
Any rough guide to what significant is here? ptest needs 1GB memory for example. qemu-system mode should limit that to the VMs at least?
This is a tricky one, and my comment is mostly based on prior experience with running glibc tests on less common targets (like microblaze). Where the stability of the kernel when handling large amount of NFS traffic alongside cpu/memory heavy tasks would cause panics and some times kernel hangs. I am not sure how generally this applies though, will report on this once I have some tests results with more of the qemu machines running via system emulation/ssh.
Quoted 7 lines
Quoted 3 lines
- Slow to execute
- With QEMU system emulation it can take many hoursWe do have KVM acceleration for x86 and arm FWIW which is probably where we'd start testing this on the autobuilder.
Quoted 8 lines
Quoted 6 lines
- With some physical target architectures it can take days (e.g. microblaze)
The significantly increased execution speed of qemu-linux-user vs qemu system with glibc, and the ability for qemu-linux-user to be executed in parallel with the gcc test suite makes it a strong solution for continuous integration testing.
Was that with or without KVM?
Without KVM. I will add KVM testing with the system emulation tests I run, to get a better idea on exact performance differences.
Quoted 17 lines
Quoted 9 lines
The following table shows results for the major test suite components running with qemu-linux-user execution. The numbers represent 'failed tests'/'total tests'. The machines used to run the tests are the
qemu*machine for the associated architecture, not all qemu machines available in oe-core were tested. It is important to note that these results are only indicative of qemu-linux-user behaviour and that there are a number of test failures that are due to issues not specific to qemu-linux-user.Quoted 7 lines
| gcc | g++ | libstdc++ | binutils | gas | ld | glibc x86-64 | 589/135169 | 457/131913 | 1/13008 | 0/ 236 | 0/ 1256 | 166/ 1975 | 1423/ 5991 arm | 469/123905 | 365/128416 | 19/12788 | 0/ 191 | 0/ 872 | 155/ 1479 | 64/ 5130 aarch64 | 460/130904 | 364/128977 | 1/12789 | 0/ 190 | 0/ 442 | 157/ 1474 | 76/ 5882 powerpc | 18336/116624 | 6747/128636 | 33/12996 | 0/ 187 | 1/ 265 | 157/ 1352 | 1218/ 5110 mips64 | 1174/134744 | 401/130195 | 22/12780 | 0/ 213 | 43/ 7245 | 803/ 1634 | 2032/ 5847 riscv64 | 456/106399 | 376/128427 | 1/12748 | 0/ 185 | 0/ 257 | 152/ 1062 | 88/ 5847
Quoted 2 lines
I'd be interested to know how these numbers compare to the ssh execution...
I will setup some OEQA automation to get results for this. It might take me a little bit since they can be slow to run.
Quoted 9 lines
The binutils results look good! :)
Quoted 5 lines
This patch also introduces some OEQA test cases which cover running the test suites. However in this specific patch it does not include any implementation for the automated setup of qemu system emulation testing with runqemu and NFS mounting for glibc tests. Also not included in these test cases is any known test failure filtering.
Quoted 3 lines
The known test failure filtering is something we can use the OEQA backend for, I'd envisage this being intergrated in a similar way to the way we added ptest/ltp/ltp-posix there.
I am not very familiar with the OEQA backend, and was not able to find anything about test filtering in lib/oeqa (just searching). Maybe I am looking in the wrong place, any pointers for where this part of the backend is located?
Thanks,
Nathan
Quoted 16 lines
Quoted 3 lines
I would also be interested in the opinion with regards to whether these test suites should be executed as part of the existing Yocto Autobuilder instance.
Short answer is yes. We won't run them all the time but when it makes sense and I'd happily see the autobuilder apart to be able to trigger these appropriately. We can probably run the KVM accelerated arches more often than the others.
Plenty of implementation details to further discuss but this is great to see!
Cheers,
Richard
Quoted 114 lines · Nathan Rossi
Quoted 29 lines · Richard Purdie
Quoted 7 lines · Nathan Rossi
This patch is an RFC for adding support to execute the gnu test suites for binutils, gcc and glibc. With the intention for enabling automated test running of these test suites within the OEQA framework such that they can be executed by the Yocto Autobuilder.
Please note that this patch is not a complete implementation and needs additional work as well as changes based on comments and feedback from this RFC.
This is rather cool, thanks!
Looking at this was on my todo list once we got the existing OEQA, ptest and ltp setups working well. I'm very happy to have been beaten to it though.
Quoted 5 lines
The test suites covered need significant resources or build artifacts such that running them on the target is undesirable which rules out the use of ptest. Because of this the test suites can be run on the build host and if necessary call out to the target.
Quoted 7 lines
The following implementation creates a number of recipes that are used to build/execute the test suites for the different components. The reason for creating separate recipes is primarily due to dependencies and the need for components in the sysroot. For example binutils has tests that use the C compiler however binutils is a dependency for the C compiler and thus would cause a dependency loop. The issue with sysroots occurs with dependence on
*-initialrecipes and the test suites needing the non-initial version.Quoted 2 lines
I think this means you're working with something pre-warrior as we got rid of most of the *-initial recipes apart from libgcc-initial.
I have been working against master (maybe a few days old). However I hit the sysroot collision in gcc-cross with what I thought was a -initial recipe. So I split it out and kept moving ahead.
Turns out it was just one file, specifically an empty
limits.hthat is created by the gcc-cross recipe itself.
(http://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-cross.inc#n49)Quoted 10 lines
Quoted 9 lines
Some issues with splitting the recipes:
- Rebuilds the recipe
- Like gcc-cross-testsuite in this patch, could use a stashed builddir
- Source is duplicated
- gcc gets around this with shared source
- Requires having the recipe files and maintaining them
- Multiple versions of recipes
- Multiple variants of recipes (-cross, -crosssdk, -native if desired)Quoted 5 lines
It might be possible to have multiple tasks in these recipes and have the later tasks depend on other pieces of the system like the C compiler, thereby avoiding the need for splitting if only the later tasks have the dependencies. Not sure if it would work or not but may be worth exploring.
Initially I had started out with binutils having the
do_checktask which depended on thepopulate_sysroottask of the associated dependencies and this was working well for binutils at least. The only concern I had with this was whether tainting the recipe sysroots would be problematic?Given the sysroot/-initial issue with gcc was not a dependency problem I have tried with the check tasks in gcc-cross and gcc-runtime and there does not appear to have any issues. So splitting the recipes for binutils, gcc-cross and gcc-runtime is not necessary.
For glibc the sysroot has libgcc-initial, so the sysroot collision is still a problem for it.
Quoted 15 lines
Quoted 6 lines
Target execution is another issue with the test suites. Note that binutils however does not require any target execution. In this patch both qemu-linux-user and ssh target execution solutions are provided. For the purposes of OE, qemu-linux-user may suffice as it has great success at executing gcc and gcc-runtime tests with acceptable success at executing the glibc tests.
I feel fairly strongly that we probably want to execute these kinds of tests under qemu system mode, not the user mode. The reason is that we want to be as close to the target environment as we can be and that qemu-user testing is at least as much of a test of qemu's emulation that it is the behaviour of the compiler or libc (libc in particular). I was thinking this and then later read you confirmed my suspicions below...
Quoted 6 lines
Quoted 3 lines
The glibc test suite can be problematic to execute for a few reasons:
- Requires access to the exact same filesystem as the build host
- On physical targets and QEMU this requires NFS mountsWe do have unfs support already under qemu which might make this possible.
unfs works great and I was using it for testing out the ssh support. However I did notice that is does rely on the host having rpcbind installed. This does prevent running the tests without root (even if using slirp for qemu).
Quoted 5 lines
Quoted 4 lines
- Relies on exact syscall behaviour
- Causes some issues where there are differences between qemu-linux-user and the target architectures kernelQuoted 8 lines
Right, this one worries me and pushes me to want to use qemu system mode.
Quoted 2 lines
- Can consume significant resources (e.g. OOM, or worse trigger bugs/panics in kernel drivers)
Any rough guide to what significant is here? ptest needs 1GB memory for example. qemu-system mode should limit that to the VMs at least?
Quoted 7 lines
This is a tricky one, and my comment is mostly based on prior experience with running glibc tests on less common targets (like microblaze). Where the stability of the kernel when handling large amount of NFS traffic alongside cpu/memory heavy tasks would cause panics and some times kernel hangs. I am not sure how generally this applies though, will report on this once I have some tests results with more of the qemu machines running via system emulation/ssh.
So I only hit one major issue with the oe-core qemu* machines I tested on when running under system emulation, specifically with aarch64/qemuarm64.
One (or more) test in the "c" suite of gcc causes qemu to crash due to what appears to be an internal qemu issue.
qemu outputted:qemu-4.0.0/tcg/tcg.c:3952: tcg_gen_code: Assertion `s->gen_insn_end_off[num_insns] == off' failed.
The test that caused this was:gcc.target/aarch64/advsimd-intrinsics/vldX.c -O2 execution test
Quoted 37 lines
Quoted 8 lines
Quoted 4 lines
- Slow to execute
- With QEMU system emulation it can take many hoursWe do have KVM acceleration for x86 and arm FWIW which is probably where we'd start testing this on the autobuilder.
Quoted 8 lines
Quoted 6 lines
- With some physical target architectures it can take days (e.g. microblaze)
The significantly increased execution speed of qemu-linux-user vs qemu system with glibc, and the ability for qemu-linux-user to be executed in parallel with the gcc test suite makes it a strong solution for continuous integration testing.
Was that with or without KVM?
Without KVM. I will add KVM testing with the system emulation tests I run, to get a better idea on exact performance differences.
Quoted 17 lines
Quoted 16 lines
The following table shows results for the major test suite components running with qemu-linux-user execution. The numbers represent 'failed tests'/'total tests'. The machines used to run the tests are the
qemu*machine for the associated architecture, not all qemu machines available in oe-core were tested. It is important to note that these results are only indicative of qemu-linux-user behaviour and that there are a number of test failures that are due to issues not specific to qemu-linux-user.| gcc | g++ | libstdc++ | binutils | gas | ld | glibc x86-64 | 589/135169 | 457/131913 | 1/13008 | 0/ 236 | 0/ 1256 | 166/ 1975 | 1423/ 5991 arm | 469/123905 | 365/128416 | 19/12788 | 0/ 191 | 0/ 872 | 155/ 1479 | 64/ 5130 aarch64 | 460/130904 | 364/128977 | 1/12789 | 0/ 190 | 0/ 442 | 157/ 1474 | 76/ 5882 powerpc | 18336/116624 | 6747/128636 | 33/12996 | 0/ 187 | 1/ 265 | 157/ 1352 | 1218/ 5110 mips64 | 1174/134744 | 401/130195 | 22/12780 | 0/ 213 | 43/ 7245 | 803/ 1634 | 2032/ 5847 riscv64 | 456/106399 | 376/128427 | 1/12748 | 0/ 185 | 0/ 257 | 152/ 1062 | 88/ 5847
Quoted 5 lines
Quoted 2 lines
I'd be interested to know how these numbers compare to the ssh execution...
I will setup some OEQA automation to get results for this. It might take me a little bit since they can be slow to run.
Just an update here, managed to get the results for this. As you will see below, running some of these tests is very slow on qemu system emulation. Though kvm did give a decent boost in performance.
Note: qemuarm64 (sys) is missing gcc results because one of the gcc tests crashes qemu.
| g++ | gcc | glibc
| libatomic | libgomp | libitm | libstdc++-v3
qemuarm (usr) | 365/128416 | 469/123905 | 65/ 5130
| 0/ 49 | 0/ 2515 | 0/ 46 | 23/12782
qemuarm (sys) | 365/128416 | 468/123874 | 47/ 5130
| 0/ 49 | 0/ 2515 | 18/ 46 | 48/12790
qemux86-64 (usr) | 457/131913 | 589/135169 | 1423/ 5991
| 0/ 54 | 0/ 2522 | 0/ 46 | 1/13008
qemux86-64 (sys) | 418/131913 | 519/135221 | 1418/ 5991
| 0/ 54 | 1/ 2522 | 18/ 46 | 51/13010
qemux86-64 (sys+kvm) | 418/131913 | 519/135415 | 40/ 5991
| 0/ 54 | 1/ 2522 | 18/ 46 | 46/13010
qemuarm64 (usr) | 364/128977 | 459/130904 | 75/ 5882
| 0/ 54 | 0/ 2515 | 0/ 46 | 1/12789
qemuarm64 (sys) | 364/128977 | | 43/ 5882
| 0/ 54 | 0/ 2515 | 18/ 46 | 62/12791
qemuppc (usr) | 6747/128636 | 18336/116624 | 1220/ 5110
| 0/ 49 | 2/ 2515 | 0/ 46 | 33/12996
qemuppc (sys) | 383/129056 | 800/119824 | 1188/ 5110
| 0/ 49 | 2/ 2515 | 18/ 46 | 34/12998
qemuriscv64 (usr) | 376/128427 | 460/106399 | 86/ 5847
| 0/ 54 | 4/ 2508 | | 1/12748
qemuriscv64 (sys) | 376/128427 | 458/106451 | 53/ 5847
| 0/ 54 | 0/ 2508 | | 52/12750
| g++ | gcc | glibc
| libatomic | libgomp | libitm | libstdc++-v3
qemuarm (usr) | 9m 24s | 15m 3s | 37m 10s
| 8s | 6m 52s | 8s | 1h 24s
qemuarm (sys) | 3h 58m 30s | 12h 21m 44s | 5h 36m 53s
| 55s | 45m 57s | 53s | 12h 16m 11s
qemux86-64 (usr) | 8m 22s | 15m 48s | 36m 52s
| 8s | 6m 1s | 8s | 34m 42s
qemux86-64 (sys) | 5h 38m 27s | 15h 15m 40s | 5h 54m 42s
| 1m 8s | 45m 52s | 55s | 3h 26m 11s
qemux86-64 (sys+kvm) | 16m 22s | 56m 44s | 2h 29m 45s
| 25s | 16m 58s | 21s | 19m 20s
qemuarm64 (usr) | 8m 34s | 16m 15s | 44m 25s
| 8s | 6m 23s | 8s | 35m 38s
qemuarm64 (sys) | 4h 2m 53s | | 6h 2m 39s
| 1m 7s | 44m 47s | 53s | 3h 9m 37s
qemuppc (usr) | 6m 54s | 10m 47s | 32m 50s
| 6s | 6m 22s | 7s | 34m 25s
qemuppc (sys) | 5h 46m 23s | 16h 16m 10s | 4h 10m 6s
| 1m 16s | 1h 3m 11s | 1m 12s | 4h 32m 45s
qemuriscv64 (usr) | 6m 54s | 10m 23s | 36m 50s
| 7s | 9m 38s | | 33m 13s
qemuriscv64 (sys) | 2h 19m 24s | 6h 27m 37s | 4h 23m 43s
| 47s | 31m 47s | | 1h 52m 18sRegards,
Nathan
Quoted 40 lines
Quoted 10 lines
The binutils results look good! :)
Quoted 5 lines
This patch also introduces some OEQA test cases which cover running the test suites. However in this specific patch it does not include any implementation for the automated setup of qemu system emulation testing with runqemu and NFS mounting for glibc tests. Also not included in these test cases is any known test failure filtering.
Quoted 3 lines
The known test failure filtering is something we can use the OEQA backend for, I'd envisage this being intergrated in a similar way to the way we added ptest/ltp/ltp-posix there.
I am not very familiar with the OEQA backend, and was not able to find anything about test filtering in lib/oeqa (just searching). Maybe I am looking in the wrong place, any pointers for where this part of the backend is located?
Thanks,
NathanQuoted 16 lines
Quoted 3 lines
I would also be interested in the opinion with regards to whether these test suites should be executed as part of the existing Yocto Autobuilder instance.
Short answer is yes. We won't run them all the time but when it makes sense and I'd happily see the autobuilder apart to be able to trigger these appropriately. We can probably run the KVM accelerated arches more often than the others.
Plenty of implementation details to further discuss but this is great to see!
Cheers,
Richard
Quoted 7 lines · Nathan Rossi
So I only hit one major issue with the oe-core qemu* machines I tested on when running under system emulation, specifically with aarch64/qemuarm64.
One (or more) test in the "c" suite of gcc causes qemu to crash due to what appears to be an internal qemu issue.
Quoted 6 lines
qemu outputted:
qemu-4.0.0/tcg/tcg.c:3952:tcg_gen_code: Assertion `s->gen_insn_end_off[num_insns] == off' failed.The test that caused this was:
gcc.target/aarch64/advsimd-intrinsics/vldX.c-O2 execution test
Ok, interesting. I'd hope that issue could be resolved if it started causing problems for us, or we could skip that test as a workaround I guess.
Quoted 6 lines
Just an update here, managed to get the results for this. As you will see below, running some of these tests is very slow on qemu system emulation. Though kvm did give a decent boost in performance.
Note: qemuarm64 (sys) is missing gcc results because one of the gcc tests crashes qemu.
The results were wrapped and hard to read so I unwrapped them (added here for others):
| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 365/128416 | 469/123905 | 65/ 5130 | 0/ 49 | 0/ 2515 | 0/ 46 | 23/12782 qemuarm (sys) | 365/128416 | 468/123874 | 47/ 5130 | 0/ 49 | 0/ 2515 | 18/ 46 | 48/12790 qemux86-64 (usr) | 457/131913 | 589/135169 | 1423/ 5991 | 0/ 54 | 0/ 2522 | 0/ 46 | 1/13008 qemux86-64 (sys) | 418/131913 | 519/135221 | 1418/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 51/13010 qemux86-64 (sys+kvm) | 418/131913 | 519/135415 | 40/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 46/13010 qemuarm64 (usr) | 364/128977 | 459/130904 | 75/ 5882 | 0/ 54 | 0/ 2515 | 0/ 46 | 1/12789 qemuarm64 (sys) | 364/128977 | | 43/ 5882 | 0/ 54 | 0/ 2515 | 18/ 46 | 62/12791 qemuppc (usr) | 6747/128636 | 18336/116624 | 1220/ 5110 | 0/ 49 | 2/ 2515 | 0/ 46 | 33/12996 qemuppc (sys) | 383/129056 | 800/119824 | 1188/ 5110 | 0/ 49 | 2/ 2515 | 18/ 46 | 34/12998 qemuriscv64 (usr) | 376/128427 | 460/106399 | 86/ 5847 | 0/ 54 | 4/ 2508 | | 1/12748 qemuriscv64 (sys) | 376/128427 | 458/106451 | 53/ 5847 | 0/ 54 | 0/ 2508 | | 52/12750
| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 9m 24s | 15m 3s | 37m 10s | 8s | 6m 52s | 8s | 1h 24s qemuarm (sys) | 3h 58m 30s | 12h 21m 44s | 5h 36m 53s | 55s | 45m 57s | 53s | 12h 16m 11s qemux86-64 (usr) | 8m 22s | 15m 48s | 36m 52s | 8s | 6m 1s | 8s | 34m 42s qemux86-64 (sys) | 5h 38m 27s | 15h 15m 40s | 5h 54m 42s | 1m 8s | 45m 52s | 55s | 3h 26m 11s qemux86-64 (sys+kvm) | 16m 22s | 56m 44s | 2h 29m 45s | 25s | 16m 58s | 21s | 19m 20s qemuarm64 (usr) | 8m 34s | 16m 15s | 44m 25s | 8s | 6m 23s | 8s | 35m 38s qemuarm64 (sys) | 4h 2m 53s | | 6h 2m 39s | 1m 7s | 44m 47s | 53s | 3h 9m 37s qemuppc (usr) | 6m 54s | 10m 47s | 32m 50s | 6s | 6m 22s | 7s | 34m 25s qemuppc (sys) | 5h 46m 23s | 16h 16m 10s | 4h 10m 6s | 1m 16s | 1h 3m 11s | 1m 12s | 4h 32m 45s qemuriscv64 (usr) | 6m 54s | 10m 23s | 36m 50s | 7s | 9m 38s | | 33m 13s qemuriscv64 (sys) | 2h 19m 24s | 6h 27m 37s | 4h 23m 43s | 47s | 31m 47s | | 1h 52m 18s
This makes very interesting reading, thanks!
I'm quite amazed how much faster user mode qemu is at running the tests against a system kvm qemu. The accuracy of sys, usr and sys+kvm looks questionable in different places.
There isn't a clear answer here although its obvious qemuppc user mode emulation is bad. The usermode testing is clearly the winner speed wise by a long margin. I would like to understand why though as KVM should be reasonable...
Cheers,
Richard
Quoted 12 lines · On 7/24/19 8:55 AM, [email protected] wrote:
Quoted 11 lines · Nathan Rossi
So I only hit one major issue with the oe-core qemu* machines I tested on when running under system emulation, specifically with aarch64/qemuarm64.
One (or more) test in the "c" suite of gcc causes qemu to crash due to what appears to be an internal qemu issue.
qemu outputted:
qemu-4.0.0/tcg/tcg.c:3952:tcg_gen_code: Assertion `s->gen_insn_end_off[num_insns] == off' failed.
Quoted 6 lines
Quoted 2 lines
The test that caused this was:
gcc.target/aarch64/advsimd-intrinsics/vldX.c-O2 execution testOk, interesting. I'd hope that issue could be resolved if it started causing problems for us, or we could skip that test as a workaround I guess.
When we have done similar testing like this, we have skipped these tests. Much of the time they are in corner case instructions and not something that really gives relevant results.
But with that said, we should check if QEMU is already aware of this failure and if not report it to them.
(The GNU tests also test various instructions that may not be available on all processors, we've seen this many times on IA32 machines. They just assume all instructions are available, even if running on an older CPU. So this is also something to be aware of when interpreting the results. -- but QEMU shouldn't crash!)
--Mark
Quoted 55 lines
Quoted 6 lines
Just an update here, managed to get the results for this. As you will see below, running some of these tests is very slow on qemu system emulation. Though kvm did give a decent boost in performance.
Note: qemuarm64 (sys) is missing gcc results because one of the gcc tests crashes qemu.
The results were wrapped and hard to read so I unwrapped them (added here for others):
| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 365/128416 | 469/123905 | 65/ 5130 | 0/ 49 | 0/ 2515 | 0/ 46 | 23/12782 qemuarm (sys) | 365/128416 | 468/123874 | 47/ 5130 | 0/ 49 | 0/ 2515 | 18/ 46 | 48/12790 qemux86-64 (usr) | 457/131913 | 589/135169 | 1423/ 5991 | 0/ 54 | 0/ 2522 | 0/ 46 | 1/13008 qemux86-64 (sys) | 418/131913 | 519/135221 | 1418/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 51/13010 qemux86-64 (sys+kvm) | 418/131913 | 519/135415 | 40/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 46/13010 qemuarm64 (usr) | 364/128977 | 459/130904 | 75/ 5882 | 0/ 54 | 0/ 2515 | 0/ 46 | 1/12789 qemuarm64 (sys) | 364/128977 | | 43/ 5882 | 0/ 54 | 0/ 2515 | 18/ 46 | 62/12791 qemuppc (usr) | 6747/128636 | 18336/116624 | 1220/ 5110 | 0/ 49 | 2/ 2515 | 0/ 46 | 33/12996 qemuppc (sys) | 383/129056 | 800/119824 | 1188/ 5110 | 0/ 49 | 2/ 2515 | 18/ 46 | 34/12998 qemuriscv64 (usr) | 376/128427 | 460/106399 | 86/ 5847 | 0/ 54 | 4/ 2508 | | 1/12748 qemuriscv64 (sys) | 376/128427 | 458/106451 | 53/ 5847 | 0/ 54 | 0/ 2508 | | 52/12750| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 9m 24s | 15m 3s | 37m 10s | 8s | 6m 52s | 8s | 1h 24s qemuarm (sys) | 3h 58m 30s | 12h 21m 44s | 5h 36m 53s | 55s | 45m 57s | 53s | 12h 16m 11s qemux86-64 (usr) | 8m 22s | 15m 48s | 36m 52s | 8s | 6m 1s | 8s | 34m 42s qemux86-64 (sys) | 5h 38m 27s | 15h 15m 40s | 5h 54m 42s | 1m 8s | 45m 52s | 55s | 3h 26m 11s qemux86-64 (sys+kvm) | 16m 22s | 56m 44s | 2h 29m 45s | 25s | 16m 58s | 21s | 19m 20s qemuarm64 (usr) | 8m 34s | 16m 15s | 44m 25s | 8s | 6m 23s | 8s | 35m 38s qemuarm64 (sys) | 4h 2m 53s | | 6h 2m 39s | 1m 7s | 44m 47s | 53s | 3h 9m 37s qemuppc (usr) | 6m 54s | 10m 47s | 32m 50s | 6s | 6m 22s | 7s | 34m 25s qemuppc (sys) | 5h 46m 23s | 16h 16m 10s | 4h 10m 6s | 1m 16s | 1h 3m 11s | 1m 12s | 4h 32m 45s qemuriscv64 (usr) | 6m 54s | 10m 23s | 36m 50s | 7s | 9m 38s | | 33m 13s qemuriscv64 (sys) | 2h 19m 24s | 6h 27m 37s | 4h 23m 43s | 47s | 31m 47s | | 1h 52m 18sThis makes very interesting reading, thanks!
I'm quite amazed how much faster user mode qemu is at running the tests against a system kvm qemu. The accuracy of sys, usr and sys+kvm looks questionable in different places.
There isn't a clear answer here although its obvious qemuppc user mode emulation is bad. The usermode testing is clearly the winner speed wise by a long margin. I would like to understand why though as KVM should be reasonable...
Cheers,
Richard
Quoted 21 lines · Mark Hatle
Quoted 12 lines · On 7/24/19 8:55 AM, [email protected] wrote:
Quoted 11 lines · Nathan Rossi
So I only hit one major issue with the oe-core qemu* machines I tested on when running under system emulation, specifically with aarch64/qemuarm64.
One (or more) test in the "c" suite of gcc causes qemu to crash due to what appears to be an internal qemu issue.
qemu outputted:
qemu-4.0.0/tcg/tcg.c:3952:tcg_gen_code: Assertion `s->gen_insn_end_off[num_insns] == off' failed.Quoted 6 lines
Quoted 2 lines
The test that caused this was:
gcc.target/aarch64/advsimd-intrinsics/vldX.c-O2 execution testOk, interesting. I'd hope that issue could be resolved if it started causing problems for us, or we could skip that test as a workaround I guess.
Quoted 6 lines
When we have done similar testing like this, we have skipped these tests. Much of the time they are in corner case instructions and not something that really gives relevant results.
But with that said, we should check if QEMU is already aware of this failure and if not report it to them.
Something I forgot to note was that this specific test runs fine under qemu user.
Quoted 6 lines
(The GNU tests also test various instructions that may not be available on all processors, we've seen this many times on IA32 machines. They just assume all instructions are available, even if running on an older CPU. So this is also something to be aware of when interpreting the results. -- but QEMU shouldn't crash!)
Yes this is something I noticed with -mhard-float/-msoft-float on arm.
Quoted 12 lines
--Mark
Quoted 9 lines
Quoted 6 lines
Just an update here, managed to get the results for this. As you will see below, running some of these tests is very slow on qemu system emulation. Though kvm did give a decent boost in performance.
Note: qemuarm64 (sys) is missing gcc results because one of the gcc tests crashes qemu.
The results were wrapped and hard to read so I unwrapped them (added here for others):
Sorry about that.
Quoted 27 lines
Quoted 27 lines
| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 365/128416 | 469/123905 | 65/ 5130 | 0/ 49 | 0/ 2515 | 0/ 46 | 23/12782 qemuarm (sys) | 365/128416 | 468/123874 | 47/ 5130 | 0/ 49 | 0/ 2515 | 18/ 46 | 48/12790 qemux86-64 (usr) | 457/131913 | 589/135169 | 1423/ 5991 | 0/ 54 | 0/ 2522 | 0/ 46 | 1/13008 qemux86-64 (sys) | 418/131913 | 519/135221 | 1418/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 51/13010 qemux86-64 (sys+kvm) | 418/131913 | 519/135415 | 40/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 46/13010 qemuarm64 (usr) | 364/128977 | 459/130904 | 75/ 5882 | 0/ 54 | 0/ 2515 | 0/ 46 | 1/12789 qemuarm64 (sys) | 364/128977 | | 43/ 5882 | 0/ 54 | 0/ 2515 | 18/ 46 | 62/12791 qemuppc (usr) | 6747/128636 | 18336/116624 | 1220/ 5110 | 0/ 49 | 2/ 2515 | 0/ 46 | 33/12996 qemuppc (sys) | 383/129056 | 800/119824 | 1188/ 5110 | 0/ 49 | 2/ 2515 | 18/ 46 | 34/12998 qemuriscv64 (usr) | 376/128427 | 460/106399 | 86/ 5847 | 0/ 54 | 4/ 2508 | | 1/12748 qemuriscv64 (sys) | 376/128427 | 458/106451 | 53/ 5847 | 0/ 54 | 0/ 2508 | | 52/12750| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 9m 24s | 15m 3s | 37m 10s | 8s | 6m 52s | 8s | 1h 24s qemuarm (sys) | 3h 58m 30s | 12h 21m 44s | 5h 36m 53s | 55s | 45m 57s | 53s | 12h 16m 11s qemux86-64 (usr) | 8m 22s | 15m 48s | 36m 52s | 8s | 6m 1s | 8s | 34m 42s qemux86-64 (sys) | 5h 38m 27s | 15h 15m 40s | 5h 54m 42s | 1m 8s | 45m 52s | 55s | 3h 26m 11s qemux86-64 (sys+kvm) | 16m 22s | 56m 44s | 2h 29m 45s | 25s | 16m 58s | 21s | 19m 20s qemuarm64 (usr) | 8m 34s | 16m 15s | 44m 25s | 8s | 6m 23s | 8s | 35m 38s qemuarm64 (sys) | 4h 2m 53s | | 6h 2m 39s | 1m 7s | 44m 47s | 53s | 3h 9m 37s qemuppc (usr) | 6m 54s | 10m 47s | 32m 50s | 6s | 6m 22s | 7s | 34m 25s qemuppc (sys) | 5h 46m 23s | 16h 16m 10s | 4h 10m 6s | 1m 16s | 1h 3m 11s | 1m 12s | 4h 32m 45s qemuriscv64 (usr) | 6m 54s | 10m 23s | 36m 50s | 7s | 9m 38s | | 33m 13s qemuriscv64 (sys) | 2h 19m 24s | 6h 27m 37s | 4h 23m 43s | 47s | 31m 47s | | 1h 52m 18s
Quoted 5 lines
Quoted 5 lines
This makes very interesting reading, thanks!
I'm quite amazed how much faster user mode qemu is at running the tests against a system kvm qemu. The accuracy of sys, usr and sys+kvm looks questionable in different places.
The speed user mode qemu gets comes from multi-threaded execution. Whilst kvm gets better single threaded execution performance over user mode qemu, more threads of tests can run with user mode. I probably should have mentioned all the above runs were on an 8 thread system. So on a bigger build machine user mode qemu probably gets even better scaling.
Quoted 5 lines
Quoted 5 lines
There isn't a clear answer here although its obvious qemuppc user mode emulation is bad. The usermode testing is clearly the winner speed wise by a long margin. I would like to understand why though as KVM should be reasonable...
Just given some inspection of the systems and host while running, it appears that two of the major performances hits were the overheads in SSH (e.g. encryption, etc) and the use of multiple threads trying to run things on the single core target.
I will look into the test failures with user mode and try to resolve some of them. If its possible to have similar results between usr/sys then it would help make the choice between them a lot easier. Resolving some of the test failures should also help to bring the results in line with expectation.
Regards,
Nathan
Quoted 10 lines
Quoted 9 lines
Cheers,
Richard
Does the speed improve if system Qemu is configured to use several cpu cores (I think this doesn’t happen by default in yocto)?
Alex
Quoted 133 lines · Nathan Rossi
Quoted 23 lines · Mark Hatle
Quoted 14 lines · On 7/24/19 8:55 AM, [email protected] wrote:
Quoted 12 lines · Nathan Rossi
So I only hit one major issue with the oe-core qemu* machines I tested on when running under system emulation, specifically with aarch64/qemuarm64.
One (or more) test in the "c" suite of gcc causes qemu to crash due to what appears to be an internal qemu issue.
qemu outputted:
qemu-4.0.0/tcg/tcg.c:3952:tcg_gen_code: Assertion `s->gen_insn_end_off[num_insns] == off' failed.Quoted 6 lines
Quoted 2 lines
The test that caused this was:
gcc.target/aarch64/advsimd-intrinsics/vldX.c-O2 execution testOk, interesting. I'd hope that issue could be resolved if it started causing problems for us, or we could skip that test as a workaround I guess.
Quoted 6 lines
When we have done similar testing like this, we have skipped these tests. Much of the time they are in corner case instructions and not something that really gives relevant results.
But with that said, we should check if QEMU is already aware of this failure and if not report it to them.
Something I forgot to note was that this specific test runs fine under qemu user.
Quoted 6 lines
(The GNU tests also test various instructions that may not be available on all processors, we've seen this many times on IA32 machines. They just assume all instructions are available, even if running on an older CPU. So this is also something to be aware of when interpreting the results. -- but QEMU shouldn't crash!)
Yes this is something I noticed with -mhard-float/-msoft-float on arm.
Quoted 12 lines
--Mark
Quoted 9 lines
Quoted 6 lines
Just an update here, managed to get the results for this. As you will see below, running some of these tests is very slow on qemu system emulation. Though kvm did give a decent boost in performance.
Note: qemuarm64 (sys) is missing gcc results because one of the gcc tests crashes qemu.
The results were wrapped and hard to read so I unwrapped them (added here for others):
Sorry about that.
Quoted 27 lines
Quoted 27 lines
| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 365/128416 | 469/123905 | 65/ 5130 | 0/ 49 | 0/ 2515 | 0/ 46 | 23/12782 qemuarm (sys) | 365/128416 | 468/123874 | 47/ 5130 | 0/ 49 | 0/ 2515 | 18/ 46 | 48/12790 qemux86-64 (usr) | 457/131913 | 589/135169 | 1423/ 5991 | 0/ 54 | 0/ 2522 | 0/ 46 | 1/13008 qemux86-64 (sys) | 418/131913 | 519/135221 | 1418/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 51/13010 qemux86-64 (sys+kvm) | 418/131913 | 519/135415 | 40/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 46/13010 qemuarm64 (usr) | 364/128977 | 459/130904 | 75/ 5882 | 0/ 54 | 0/ 2515 | 0/ 46 | 1/12789 qemuarm64 (sys) | 364/128977 | | 43/ 5882 | 0/ 54 | 0/ 2515 | 18/ 46 | 62/12791 qemuppc (usr) | 6747/128636 | 18336/116624 | 1220/ 5110 | 0/ 49 | 2/ 2515 | 0/ 46 | 33/12996 qemuppc (sys) | 383/129056 | 800/119824 | 1188/ 5110 | 0/ 49 | 2/ 2515 | 18/ 46 | 34/12998 qemuriscv64 (usr) | 376/128427 | 460/106399 | 86/ 5847 | 0/ 54 | 4/ 2508 | | 1/12748 qemuriscv64 (sys) | 376/128427 | 458/106451 | 53/ 5847 | 0/ 54 | 0/ 2508 | | 52/12750| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 9m 24s | 15m 3s | 37m 10s | 8s | 6m 52s | 8s | 1h 24s qemuarm (sys) | 3h 58m 30s | 12h 21m 44s | 5h 36m 53s | 55s | 45m 57s | 53s | 12h 16m 11s qemux86-64 (usr) | 8m 22s | 15m 48s | 36m 52s | 8s | 6m 1s | 8s | 34m 42s qemux86-64 (sys) | 5h 38m 27s | 15h 15m 40s | 5h 54m 42s | 1m 8s | 45m 52s | 55s | 3h 26m 11s qemux86-64 (sys+kvm) | 16m 22s | 56m 44s | 2h 29m 45s | 25s | 16m 58s | 21s | 19m 20s qemuarm64 (usr) | 8m 34s | 16m 15s | 44m 25s | 8s | 6m 23s | 8s | 35m 38s qemuarm64 (sys) | 4h 2m 53s | | 6h 2m 39s | 1m 7s | 44m 47s | 53s | 3h 9m 37s qemuppc (usr) | 6m 54s | 10m 47s | 32m 50s | 6s | 6m 22s | 7s | 34m 25s qemuppc (sys) | 5h 46m 23s | 16h 16m 10s | 4h 10m 6s | 1m 16s | 1h 3m 11s | 1m 12s | 4h 32m 45s qemuriscv64 (usr) | 6m 54s | 10m 23s | 36m 50s | 7s | 9m 38s | | 33m 13s qemuriscv64 (sys) | 2h 19m 24s | 6h 27m 37s | 4h 23m 43s | 47s | 31m 47s | | 1h 52m 18sQuoted 5 lines
Quoted 5 lines
This makes very interesting reading, thanks!
I'm quite amazed how much faster user mode qemu is at running the tests against a system kvm qemu. The accuracy of sys, usr and sys+kvm looks questionable in different places.
The speed user mode qemu gets comes from multi-threaded execution. Whilst kvm gets better single threaded execution performance over user mode qemu, more threads of tests can run with user mode. I probably should have mentioned all the above runs were on an 8 thread system. So on a bigger build machine user mode qemu probably gets even better scaling.
Quoted 5 lines
Quoted 5 lines
There isn't a clear answer here although its obvious qemuppc user mode emulation is bad. The usermode testing is clearly the winner speed wise by a long margin. I would like to understand why though as KVM should be reasonable...
Just given some inspection of the systems and host while running, it appears that two of the major performances hits were the overheads in SSH (e.g. encryption, etc) and the use of multiple threads trying to run things on the single core target.
I will look into the test failures with user mode and try to resolve some of them. If its possible to have similar results between usr/sys then it would help make the choice between them a lot easier. Resolving some of the test failures should also help to bring the results in line with expectation.
Regards,
NathanQuoted 10 lines
Quoted 9 lines
Cheers,
Richard
Signature · 4 lines
_______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 2 lines · Alexander Kanavin
Does the speed improve if system Qemu is configured to use several cpu cores (I think this doesn’t happen by default in yocto)?
Sorry for the delayed response. I had tested this initially and did not see any decent scaling but wanted to test it more.
After some further testing and inspection, it still does not scale as one might expect. Moving from 1 core to 2 provided a small performance boost, but scaling up to 4 or 8 cores provided very little gain. Looking at what the host is doing occasionally showed that rngd was using 125% CPU, but since sshd is supposed to be using /dev/urandom I am not sure what is limiting the performance.
Regards,
Nathan
Quoted 136 lines
Alex
Quoted 133 lines · Nathan Rossi
Quoted 23 lines · Mark Hatle
Quoted 14 lines · On 7/24/19 8:55 AM, [email protected] wrote:
Quoted 12 lines · Nathan Rossi
So I only hit one major issue with the oe-core qemu* machines I tested on when running under system emulation, specifically with aarch64/qemuarm64.
One (or more) test in the "c" suite of gcc causes qemu to crash due to what appears to be an internal qemu issue.
qemu outputted:
qemu-4.0.0/tcg/tcg.c:3952:tcg_gen_code: Assertion `s->gen_insn_end_off[num_insns] == off' failed.Quoted 6 lines
Quoted 2 lines
The test that caused this was:
gcc.target/aarch64/advsimd-intrinsics/vldX.c-O2 execution testOk, interesting. I'd hope that issue could be resolved if it started causing problems for us, or we could skip that test as a workaround I guess.
Quoted 6 lines
When we have done similar testing like this, we have skipped these tests. Much of the time they are in corner case instructions and not something that really gives relevant results.
But with that said, we should check if QEMU is already aware of this failure and if not report it to them.
Something I forgot to note was that this specific test runs fine under qemu user.
Quoted 6 lines
(The GNU tests also test various instructions that may not be available on all processors, we've seen this many times on IA32 machines. They just assume all instructions are available, even if running on an older CPU. So this is also something to be aware of when interpreting the results. -- but QEMU shouldn't crash!)
Yes this is something I noticed with -mhard-float/-msoft-float on arm.
Quoted 12 lines
--Mark
Quoted 9 lines
Quoted 6 lines
Just an update here, managed to get the results for this. As you will see below, running some of these tests is very slow on qemu system emulation. Though kvm did give a decent boost in performance.
Note: qemuarm64 (sys) is missing gcc results because one of the gcc tests crashes qemu.
The results were wrapped and hard to read so I unwrapped them (added here for others):
Sorry about that.
Quoted 27 lines
Quoted 27 lines
| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 365/128416 | 469/123905 | 65/ 5130 | 0/ 49 | 0/ 2515 | 0/ 46 | 23/12782 qemuarm (sys) | 365/128416 | 468/123874 | 47/ 5130 | 0/ 49 | 0/ 2515 | 18/ 46 | 48/12790 qemux86-64 (usr) | 457/131913 | 589/135169 | 1423/ 5991 | 0/ 54 | 0/ 2522 | 0/ 46 | 1/13008 qemux86-64 (sys) | 418/131913 | 519/135221 | 1418/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 51/13010 qemux86-64 (sys+kvm) | 418/131913 | 519/135415 | 40/ 5991 | 0/ 54 | 1/ 2522 | 18/ 46 | 46/13010 qemuarm64 (usr) | 364/128977 | 459/130904 | 75/ 5882 | 0/ 54 | 0/ 2515 | 0/ 46 | 1/12789 qemuarm64 (sys) | 364/128977 | | 43/ 5882 | 0/ 54 | 0/ 2515 | 18/ 46 | 62/12791 qemuppc (usr) | 6747/128636 | 18336/116624 | 1220/ 5110 | 0/ 49 | 2/ 2515 | 0/ 46 | 33/12996 qemuppc (sys) | 383/129056 | 800/119824 | 1188/ 5110 | 0/ 49 | 2/ 2515 | 18/ 46 | 34/12998 qemuriscv64 (usr) | 376/128427 | 460/106399 | 86/ 5847 | 0/ 54 | 4/ 2508 | | 1/12748 qemuriscv64 (sys) | 376/128427 | 458/106451 | 53/ 5847 | 0/ 54 | 0/ 2508 | | 52/12750| g++ | gcc | glibc | libatomic | libgomp | libitm | libstdc++-v3 qemuarm (usr) | 9m 24s | 15m 3s | 37m 10s | 8s | 6m 52s | 8s | 1h 24s qemuarm (sys) | 3h 58m 30s | 12h 21m 44s | 5h 36m 53s | 55s | 45m 57s | 53s | 12h 16m 11s qemux86-64 (usr) | 8m 22s | 15m 48s | 36m 52s | 8s | 6m 1s | 8s | 34m 42s qemux86-64 (sys) | 5h 38m 27s | 15h 15m 40s | 5h 54m 42s | 1m 8s | 45m 52s | 55s | 3h 26m 11s qemux86-64 (sys+kvm) | 16m 22s | 56m 44s | 2h 29m 45s | 25s | 16m 58s | 21s | 19m 20s qemuarm64 (usr) | 8m 34s | 16m 15s | 44m 25s | 8s | 6m 23s | 8s | 35m 38s qemuarm64 (sys) | 4h 2m 53s | | 6h 2m 39s | 1m 7s | 44m 47s | 53s | 3h 9m 37s qemuppc (usr) | 6m 54s | 10m 47s | 32m 50s | 6s | 6m 22s | 7s | 34m 25s qemuppc (sys) | 5h 46m 23s | 16h 16m 10s | 4h 10m 6s | 1m 16s | 1h 3m 11s | 1m 12s | 4h 32m 45s qemuriscv64 (usr) | 6m 54s | 10m 23s | 36m 50s | 7s | 9m 38s | | 33m 13s qemuriscv64 (sys) | 2h 19m 24s | 6h 27m 37s | 4h 23m 43s | 47s | 31m 47s | | 1h 52m 18sQuoted 5 lines
Quoted 5 lines
This makes very interesting reading, thanks!
I'm quite amazed how much faster user mode qemu is at running the tests against a system kvm qemu. The accuracy of sys, usr and sys+kvm looks questionable in different places.
The speed user mode qemu gets comes from multi-threaded execution. Whilst kvm gets better single threaded execution performance over user mode qemu, more threads of tests can run with user mode. I probably should have mentioned all the above runs were on an 8 thread system. So on a bigger build machine user mode qemu probably gets even better scaling.
Quoted 5 lines
Quoted 5 lines
There isn't a clear answer here although its obvious qemuppc user mode emulation is bad. The usermode testing is clearly the winner speed wise by a long margin. I would like to understand why though as KVM should be reasonable...
Just given some inspection of the systems and host while running, it appears that two of the major performances hits were the overheads in SSH (e.g. encryption, etc) and the use of multiple threads trying to run things on the single core target.
I will look into the test failures with user mode and try to resolve some of them. If its possible to have similar results between usr/sys then it would help make the choice between them a lot easier. Resolving some of the test failures should also help to bring the results in line with expectation.
Regards,
NathanQuoted 10 lines
Quoted 9 lines
Cheers,
Richard
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
This is awesome!
Quoted 7 lines · Nathan Rossi
| gcc | g++ | libstdc++ | binutils | gas | ld | glibc x86-64 | 589/135169 | 457/131913 | 1/13008 | 0/ 236 | 0/ 1256 | 166/ 1975 | 1423/ 5991 arm | 469/123905 | 365/128416 | 19/12788 | 0/ 191 | 0/ 872 | 155/ 1479 | 64/ 5130 aarch64 | 460/130904 | 364/128977 | 1/12789 | 0/ 190 | 0/ 442 | 157/ 1474 | 76/ 5882 powerpc | 18336/116624 | 6747/128636 | 33/12996 | 0/ 187 | 1/ 265 | 157/ 1352 | 1218/ 5110 mips64 | 1174/134744 | 401/130195 | 22/12780 | 0/ 213 | 43/ 7245 | 803/ 1634 | 2032/ 5847 riscv64 | 456/106399 | 376/128427 | 1/12748 | 0/ 185 | 0/ 257 | 152/ 1062 | 88/ 5847
So what I'm really interested in is what those numbers look like for e.g. x86-64 on real hardware: are the test suites always failing a bit, or are these indicative of problems we've introduced?
Ross
Quoted 12 lines · Ross
This is awesome!
Quoted 7 lines · Nathan Rossi
| gcc | g++ | libstdc++ | binutils | gas | ld | glibc x86-64 | 589/135169 | 457/131913 | 1/13008 | 0/ 236 | 0/ 1256 | 166/ 1975 | 1423/ 5991 arm | 469/123905 | 365/128416 | 19/12788 | 0/ 191 | 0/ 872 | 155/ 1479 | 64/ 5130 aarch64 | 460/130904 | 364/128977 | 1/12789 | 0/ 190 | 0/ 442 | 157/ 1474 | 76/ 5882 powerpc | 18336/116624 | 6747/128636 | 33/12996 | 0/ 187 | 1/ 265 | 157/ 1352 | 1218/ 5110 mips64 | 1174/134744 | 401/130195 | 22/12780 | 0/ 213 | 43/ 7245 | 803/ 1634 | 2032/ 5847 riscv64 | 456/106399 | 376/128427 | 1/12748 | 0/ 185 | 0/ 257 | 152/ 1062 | 88/ 5847
Quoted 3 lines
So what I'm really interested in is what those numbers look like for e.g. x86-64 on real hardware: are the test suites always failing a bit, or are these indicative of problems we've introduced?
Just to clarify, by real hardware are you interested in the tests running against a system running with a oe distro + kernel. Or just running on e.g. the build host?
As for the failing tests, do not put to much emphasis on the values provided. I am sure there are a number of tests that are failing due to minor configuration issues that simply need a deeper look at the test result and output to fix the issue. And the large number of failures for powerpc are due to qemu user failing due to illegal instruction.
The goal would be to get the results similar to what other users/distro get, by reviewing results posted here:
https://gcc.gnu.org/ml/gcc-testresults/.
And for glibc the results from: https://sourceware.org/glibc/wiki/Release/2.29
Thanks,
Nathan
Quoted 11 lines · Nathan Rossi
Just to clarify, by real hardware are you interested in the tests running against a system running with a oe distro + kernel. Or just running on e.g. the build host?
As for the failing tests, do not put to much emphasis on the values provided. I am sure there are a number of tests that are failing due to minor configuration issues that simply need a deeper look at the test result and output to fix the issue. And the large number of failures for powerpc are due to qemu user failing due to illegal instruction.
Quoted 4 lines
The goal would be to get the results similar to what other users/distro get, by reviewing results posted here:
https://gcc.gnu.org/ml/gcc-testresults/.
And for glibc the results from: https://sourceware.org/glibc/wiki/Release/2.29
Ah that's useful that they publish those. So the test results for 2.29 on x86-64 are:
5961 PASS
21 UNSUPPORTED
17 XFAIL
2 XPASS
And your report has 1423 failures, so *something* is broken. As you say, some flaw in qemu-user is most likely the culprit there. Compare to the ARM results:
9 FAIL
5041 PASS
31 UNSUPPORTED
17 XFAIL
2 XPASS
Your report has 64 failures, which is much closer even with qemu-user.
Ross
Quoted 14 lines · Nathan Rossi
Quoted 12 lines · Ross
This is awesome!
Quoted 7 lines · Nathan Rossi
| gcc | g++ | libstdc++ | binutils | gas | ld | glibc x86-64 | 589/135169 | 457/131913 | 1/13008 | 0/ 236 | 0/ 1256 | 166/ 1975 | 1423/ 5991 arm | 469/123905 | 365/128416 | 19/12788 | 0/ 191 | 0/ 872 | 155/ 1479 | 64/ 5130 aarch64 | 460/130904 | 364/128977 | 1/12789 | 0/ 190 | 0/ 442 | 157/ 1474 | 76/ 5882 powerpc | 18336/116624 | 6747/128636 | 33/12996 | 0/ 187 | 1/ 265 | 157/ 1352 | 1218/ 5110 mips64 | 1174/134744 | 401/130195 | 22/12780 | 0/ 213 | 43/ 7245 | 803/ 1634 | 2032/ 5847 riscv64 | 456/106399 | 376/128427 | 1/12748 | 0/ 185 | 0/ 257 | 152/ 1062 | 88/ 5847
Quoted 4 lines
Quoted 3 lines
So what I'm really interested in is what those numbers look like for e.g. x86-64 on real hardware: are the test suites always failing a bit, or are these indicative of problems we've introduced?
these numbers id PASS/FAIL are not usual, usually it should be only handful of failures, but this could be
some simple basic missing piece, since dejaGNU is quite picky at times.
Quoted 23 lines
Just to clarify, by real hardware are you interested in the tests running against a system running with a oe distro + kernel. Or just running on e.g. the build host?
As for the failing tests, do not put to much emphasis on the values provided. I am sure there are a number of tests that are failing due to minor configuration issues that simply need a deeper look at the test result and output to fix the issue. And the large number of failures for powerpc are due to qemu user failing due to illegal instruction.
The goal would be to get the results similar to what other users/distro get, by reviewing results posted here:
https://gcc.gnu.org/ml/gcc-testresults/.
And for glibc the results from: https://sourceware.org/glibc/wiki/Release/2.29Thanks,
Nathan
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core