Fix glibc test failures when running through qemu
cover Fix glibc test failures when running through qemu
After applying these changes, the number of tests failing for glibc come down to 69 on autobuilder. Result summary for qemux86-64:
-----------------------------------------------------------------------
---------------------------------------
Recipe | Passed | Failed | Skipped | Time(s)
-----------------------------------------------------------------------
---------------------------------------
binutils | 289 | 0 | 8 | - binutils-gas | 1582 | 4 | 1 | - binutils-ld | 1622 | 6 | 111 | - gcc | 149696 | 28 | 27599 | - gcc-g++ | 219260 | 30 | 21108 | - gcc-libatomic | 27 | 1 | 27 | - gcc-libgomp | 3426 | 1 | 1962 | - gcc-libitm | 24 | 1 | 24 | - gcc-libstdc++-v3 | 9695 | 32 | 5459 | - glibc | 4984 | 69 | 147 | - rust | 15768 | 0 | 554 | -
-----------------------------------------------------------------------
---------------------------------------
Some of the remaining failing tests (~8) need python/gdb or gprof to be installed. Some (~8) seem to be still triggering out of memory errors.
Some others (~26) fail while trying to setup test container with error:
error: test-container.c:844: Cannot create testroot lock
Anuj Mittal (4):
glibc/check-test-wrapper: don't emit warnings from ssh selftest/cases/glibc.py: increase the memory for testing oeqa/utils/nfs: allow requesting non-udp ports selftest/cases/glibc.py: switch to using NFS over TCP
meta/lib/oeqa/selftest/cases/glibc.py | 6 +++--- meta/lib/oeqa/utils/nfs.py | 4 ++-- meta/recipes-core/glibc/glibc/check-test-wrapper | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.41.0
PATCH 1/4 glibc/check-test-wrapper: don't emit warnings from ssh
Dont fill up the test log with ssh warning about having added the host to list of known hosts.
Also helps fix a test case failure where stderr log was being compared to a known value.
--- meta/recipes-core/glibc/glibc/check-test-wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc/check-test-wrapper +1 -1
@@ -58,7 +58,7 @@ elif targettype == "ssh": user = os.environ.get("SSH_HOST_USER", None) port = os.environ.get("SSH_HOST_PORT", None) - command = ["ssh", "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=no"] + command = ["ssh", "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=no", "-o", "LogLevel=quiet"] if port: command += ["-p", str(port)] if not host:
Signature · 1 line
2.41.0
PATCH 2/4 selftest/cases/glibc.py: increase the memory for testing
In reply to Anuj MittalSome of the tests trigger OOM and fail. Increase the amount of memory available so we dont run into these issues.
--- meta/lib/oeqa/selftest/cases/glibc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/glibc.py +1 -1
@@ -65,7 +65,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): bitbake("core-image-minimal") # start runqemu - qemu = s.enter_context(runqemu("core-image-minimal", runqemuparams = "nographic")) + qemu = s.enter_context(runqemu("core-image-minimal", runqemuparams = "nographic", qemuparams = "-m 1024")) # validate that SSH is working status, _ = qemu.run("uname")
Signature · 1 line
2.41.0
PATCH 3/4 oeqa/utils/nfs: allow requesting non-udp ports
In reply to Anuj MittalAllows setting up NFS over TCP as well.
--- meta/lib/oeqa/utils/nfs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/utils/nfs.py +2 -2
@@ -12,7 +12,7 @@ from oeqa.utils.commands import bitbake, get_bb_var, Command from oeqa.utils.network import get_free_port @contextlib.contextmanager -def unfs_server(directory, logger = None): +def unfs_server(directory, logger = None, udp = True): unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native") if not os.path.exists(os.path.join(unfs_sysroot, "usr", "bin", "unfsd")): # build native tool
@@ -26,7 +26,7 @@ def unfs_server(directory, logger = None): exports.write("{0} (rw,no_root_squash,no_all_squash,insecure)\n".format(directory).encode()) # find some ports for the server - nfsport, mountport = get_free_port(udp = True), get_free_port(udp = True) + nfsport, mountport = get_free_port(udp), get_free_port(udp) nenv = dict(os.environ) nenv['PATH'] = "{0}/sbin:{0}/usr/sbin:{0}/usr/bin:".format(unfs_sysroot) + nenv.get('PATH', '')
Signature · 1 line
2.41.0
PATCH 4/4 selftest/cases/glibc.py: switch to using NFS over TCP
In reply to Anuj MittalThis provides a more reliable test execution when running tests that write a large buffer/file and significantly reduces the localedata test failures.
--- meta/lib/oeqa/selftest/cases/glibc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/glibc.py +2 -2
@@ -45,7 +45,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): with contextlib.ExitStack() as s: # use the base work dir, as the nfs mount, since the recipe directory may not exist tmpdir = get_bb_var("BASE_WORKDIR") - nfsport, mountport = s.enter_context(unfs_server(tmpdir)) + nfsport, mountport = s.enter_context(unfs_server(tmpdir, udp = False)) # build core-image-minimal with required packages default_installed_packages = [
@@ -74,7 +74,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): # setup nfs mount if qemu.run("mkdir -p \"{0}\"".format(tmpdir))[0] != 0: raise Exception("Failed to setup NFS mount directory on target") - mountcmd = "mount -o noac,nfsvers=3,port={0},udp,mountport={1} \"{2}:{3}\" \"{3}\"".format(nfsport, mountport, qemu.server_ip, tmpdir) + mountcmd = "mount -o noac,nfsvers=3,port={0},mountport={1} \"{2}:{3}\" \"{3}\"".format(nfsport, mountport, qemu.server_ip, tmpdir) status, output = qemu.run(mountcmd) if status != 0: raise Exception("Failed to setup NFS mount on target ({})".format(repr(output)))
Signature · 1 line
2.41.0