Ignore:
Timestamp:
04/05/2024 02:05:45 PM (2 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
multilib, trunk, xry111/arm64, xry111/loongarch
Children:
1291a88, 91cf4953
Parents:
6584010
git-author:
Xi Ruoyao <xry111@…> (04/05/2024 01:58:39 PM)
git-committer:
Xi Ruoyao <xry111@…> (04/05/2024 02:05:45 PM)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/python.xml

    r6584010 ra093e70  
    7979<screen><userinput remap="make">make</userinput></screen>
    8080
    81     <para>Running the tests at this point is not recommended.  The
    82     tests are known to hang indefinitely in the partial LFS environment.
    83     If desired, the tests can be rerun at the end of this chapter, or
    84     when Python 3 is reinstalled in BLFS.  To run the tests anyway,
    85     issue <command>make test</command>.</para>
     81    <para>Some tests are known to hang indefinitely.  So to test the
     82    results, run the test suite but set a 2-minute time limit for each
     83    test case:</para>
     84
     85<screen><userinput remap="test">make test TESTOPTS="--timeout 120"</userinput></screen>
     86
     87    <para>For a relatively slow system you may need to increase the time
     88    limit and 1 SBU (measured when building Binutils pass 1 with one CPU
     89    core) should be enough.  Some tests are flaky, so the test suite will
     90    automatically re-run failed tests.  If a test failed but then passed
     91    when re-run, it should be considered as passed.</para>
    8692
    8793    <para>Install the package:</para>
Note: See TracChangeset for help on using the changeset viewer.