From a093e70903b0927261c63c2af364179e5d978362 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 5 Apr 2024 21:58:39 +0800 Subject: [PATCH 1/7] python: Run test suite with a time limit The test hang issue is not related to partial environment. It's just a known issue (for eg https://github.com/python/cpython/issues/91155) and happens when we are unlucky. So just run the test suite with a timeout. 1 SBU should be enough: it's approximately 4 times of the time used by the slowest test case, on both an old Athlon 64 3000+ and a Core i5-11300H. I've not seen any test failure on a complete system (the expat-related failure seems fixed by expat-2.6.2 or 2.6.1). TODO: really test this with LFS chroot and document failures if any. --- chapter08/python.xml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/chapter08/python.xml b/chapter08/python.xml index 7ac618c09..8d3c1f905 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -78,11 +78,17 @@ make - Running the tests at this point is not recommended. The - tests are known to hang indefinitely in the partial LFS environment. - If desired, the tests can be rerun at the end of this chapter, or - when Python 3 is reinstalled in BLFS. To run the tests anyway, - issue make test. + Some tests are known to hang indefinitely. So to test the + results, run the test suite but set a 2-minute time limit for each + test case: + +make test TESTOPTS="--timeout 120" + + For a relatively slow system you may need to increase the time + limit and 1 SBU (measured when building Binutils pass 1 with one CPU + core) should be enough. Some tests are flaky, so the test suite will + automatically re-run failed tests. If a test failed but then passed + when re-run, it should be considered as passed. Install the package: From 91cf49535a74b1acde7dc1ba5762c8f774ea1241 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 6 Apr 2024 11:24:05 +0800 Subject: [PATCH 2/7] python: Make it clear that the test indefinitely hanging issue is occasional Or people will report things like "hey I didn't see any test had timed out." --- chapter08/python.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/python.xml b/chapter08/python.xml index 8d3c1f905..0f22ab2a9 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -78,7 +78,7 @@ make - Some tests are known to hang indefinitely. So to test the + Some tests are known to occasionally hang indefinitely. So to test the results, run the test suite but set a 2-minute time limit for each test case: From 9977b8f05b637ba681d93eff617b3b4507e5705b Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 6 Apr 2024 17:38:09 +0800 Subject: [PATCH 3/7] generalinstructions: Remove a false statement about "cp -R destroys symlink" It's just wrong (at least with all recent Coreutils releases). Note that hard links are really destroyed, but AFAIK tar does not keep hard links correctly anyway and destroying hard links won't cause packages fail to build at all. --- part3intro/generalinstructions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/part3intro/generalinstructions.xml b/part3intro/generalinstructions.xml index 624771c2d..37e07f862 100644 --- a/part3intro/generalinstructions.xml +++ b/part3intro/generalinstructions.xml @@ -114,7 +114,7 @@ Do not use any method except the tar command to extract the source code. Notably, using the cp -R command to copy the - source code tree somewhere else can destroy links and + source code tree somewhere else can destroy timestamps in the source tree, and cause the build to fail. From 2f115238afad98b8b734bfccba61a0492fae67b4 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 7 Apr 2024 21:04:05 +0800 Subject: [PATCH 4/7] kernel: Regenerate kernel config with 6.8.2 No real change. --- chapter10/kernel/kernel.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter10/kernel/kernel.version b/chapter10/kernel/kernel.version index 29310f454..166d79d6d 100644 --- a/chapter10/kernel/kernel.version +++ b/chapter10/kernel/kernel.version @@ -1 +1 @@ -6.7.4 +6.8.2 From 6a75210c6d8e2346068dd097fb1b3d4edd3cd0da Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 8 Apr 2024 15:09:51 +0800 Subject: [PATCH 5/7] python: Document test failures with recent expat I didn't see them because I misconfigured Python to use internal expat. With system expat they just fail as we've documented in BLFS. --- chapter08/python.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chapter08/python.xml b/chapter08/python.xml index 0f22ab2a9..d60378abb 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -90,6 +90,10 @@ automatically re-run failed tests. If a test failed but then passed when re-run, it should be considered as passed. + Two tests named test_xml_etree and + test_xml_etree_c are known to fail with expat-2.6.0 + or newer. + Install the package: make install From 9bfd203fadb72045dff9ba540e5bf0ab5646ec1d Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 8 Apr 2024 16:10:03 +0800 Subject: [PATCH 6/7] util-linux: Create a dummy /etc/fstab to satisfy two tests --- chapter08/util-linux.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml index 4df6e04dd..648b204b5 100644 --- a/chapter08/util-linux.xml +++ b/chapter08/util-linux.xml @@ -93,7 +93,14 @@ make - If desired, run the test suite as a non-&root; user: + + If desired, create a dummy /etc/fstab file + to satisfy two tests and run the test suite as a non-&root; + user: Running the test suite as the root user can be harmful to @@ -106,7 +113,8 @@ bash tests/run.sh --srcdir=$PWD --builddir=$PWD -chown -R tester . +touch /etc/fstab +chown -R tester . su tester -c "make -k check" From 9317498c0347ee924ca81ae57f13b74ccb9d373d Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 11 Apr 2024 16:38:50 +0800 Subject: [PATCH 7/7] packages: SSL-ize two URLs --- packages.ent | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages.ent b/packages.ent index 69ff0b3e5..220b05c73 100644 --- a/packages.ent +++ b/packages.ent @@ -144,7 +144,7 @@ - + @@ -703,7 +703,7 @@ - +