#66 Run selftest suite on Fedora CI
Merged 5 years ago by churchyard. Opened 5 years ago by churchyard.
rpms/ churchyard/python3 test_ci_selftest  into  master

file modified
+1 -1
@@ -1066,7 +1066,7 @@ 

    #   @unittest._expectedFailureInRpmBuild

    WITHIN_PYTHON_RPM_BUILD= \

    LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \

-     -wW --slowest --findleaks \

+     -wW --slowest -j0 \

      -x test_distutils \

      -x test_bdist_rpm \

      -x test_gdb \

file modified
+13 -3
@@ -11,7 +11,17 @@ 

      - smoke:

          dir: python/smoke

          run: VERSION=3.7 ./venv.sh

+     - selftest:

+         dir: python/selftest

+         run: VERSION=3.7 X="-x test_socket -x test_asyncgen -x test_asyncio -x test_compile -x test_concurrent_futures -x test_itertools -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_shutil -x test_time -x test_multiprocessing_spawn -x test_threading -x test_wsgiref" ./parallel.sh

+     - findleaks:

+         dir: python/selftest

+         run: VERSION=3.7 X="-x test_socket -x test_asyncgen -x test_asyncio -x test_compile -x test_concurrent_futures -x test_itertools -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_shutil -x test_time -x test_multiprocessing_spawn -x test_threading -x test_wsgiref" ./findleaks.sh

      required_packages:

-     - gcc

-     - python3-tox

-     - python3-devel

+     - gcc  # for extension building in venv and selftest

+     - python3-debug  # for leak testing

+     - python3-devel  # for extension building in venv and selftest

+     - python3-tkinter  # for selftest

+     - python3-test  # for selftest

+     - python3-tox  # for venv tests

+     - glibc-all-langpacks # for locale tests

no initial comment

@psss Any idea how would I reproduce this locally?

@psss I am trying to help out (FYI)

So locally I get:

+ python3.7 -m test -j0 -x test_socket
/usr/bin/python3.7: No module named test.__main__; 'test' is a package and cannot be directly executed

And that's OK, as I forgot to specify that python3-test should get installed.

Why the test actually run on the CI is a mystery for me.

Verified: On the CI all noarch and x86_64 packages from the Koji scratch build are installed.

The Ci build has the virtual OS image in Artifacts. When I downloaded it, I could get in:

$ virt-customize -a test_subject.qcow2 --root-password password:toor
[   0,0] Examining the guest ...
[  20,1] Setting a random seed
[  20,1] Setting the machine ID in /etc/machine-id
[  20,1] Setting passwords
[  22,1] Finishing off
$ guestfish -a test_subject.qcow2 -i touch /etc/cloud/cloud-init.disabled  # disbale cloud-init
$ virt-install --connect qemu:///system -n python-test -r 1024 --network=default --import --disk path=./test_subject.qcow2 --nographics
...
Fedora 30 (Cloud Edition)
Kernel 4.20.0-0.rc2.git0.1.fc30.x86_64 on an x86_64 (ttyS0)

localhost login: root
Password: toor
[root@localhost ~]# python3 --version
Python 3.7.1
[root@localhost /]# python3.7 -m test -j0 -x test_socket

I haven't found the tests in the image, so i had to reconstruct the actual invocation by hand, but the tests run. I'll see whether I can reproduce the failure.

So this I get locally:

== Tests result: FAILURE ==

390 tests OK.

2 tests failed:
    test_asyncio test_ssl

22 tests skipped:
    test_asdl_parser test_clinic test_curses test_devpoll test_gdb
    test_kqueue test_msilib test_ossaudiodev test_smtpnet
    test_socketserver test_startfile test_timeout test_tix test_tk
    test_ttk_guionly test_urllib2net test_urllibnet test_winconsoleio
    test_winreg test_winsound test_xmlrpc_net test_zipfile64

Total duration: 8 min 29 sec
Tests result: FAILURE

This I get on the CI:

== Tests result: FAILURE ==

385 tests OK.

7 tests failed:
    test_asyncgen test_distutils test_multiprocessing_forkserver
    test_shutil test_ssl test_threading test_time

22 tests skipped:
    test_asdl_parser test_clinic test_curses test_devpoll test_gdb
    test_kqueue test_msilib test_ossaudiodev test_smtpnet
    test_socketserver test_startfile test_timeout test_tix test_tk
    test_ttk_guionly test_urllib2net test_urllibnet test_winconsoleio
    test_winreg test_winsound test_xmlrpc_net test_zipfile64

Total duration: 12 min 17 sec
Tests result: FAILURE

I'll rerun the tests couple times to see if they are flaky.

First Ci result:

== Tests result: FAILURE ==

382 tests OK.

10 tests failed:
    test_asyncgen test_asyncio test_compile test_concurrent_futures
    test_itertools test_multiprocessing_fork
    test_multiprocessing_forkserver test_shutil test_ssl test_time

22 tests skipped:
    test_asdl_parser test_clinic test_curses test_devpoll test_gdb
    test_kqueue test_msilib test_ossaudiodev test_smtpnet
    test_socketserver test_startfile test_timeout test_tix test_tk
    test_ttk_guionly test_urllib2net test_urllibnet test_winconsoleio
    test_winreg test_winsound test_xmlrpc_net test_zipfile64

Total duration: 42 min 9 sec
Tests result: FAILURE

Local runs however seem to deliver the same results over and over (2 failures: test_asyncio test_ssl).

Ha! A third local failure:

== Tests result: FAILURE ==

389 tests OK.

3 tests failed:
    test_asyncio test_ssl test_time

22 tests skipped:
    test_asdl_parser test_clinic test_curses test_devpoll test_gdb
    test_kqueue test_msilib test_ossaudiodev test_smtpnet
    test_socketserver test_startfile test_timeout test_tix test_tk
    test_ttk_guionly test_urllib2net test_urllibnet test_winconsoleio
    test_winreg test_winsound test_xmlrpc_net test_zipfile64

Total duration: 7 min 27 sec
Tests result: FAILURE

This is so unreliable. Not sure whether we should:

  • spend extraordinary time and effort to figure out why
  • get a list of flaky tests and disable them for now (most likely for ever)
  • abandon the effort

Thoughts?

@pviktori @torsava @cstratak @lbalhar @vstinner

rebased onto 03feeb689f54ebc35cf48dfd7993c222d63fc9a2

5 years ago

Instead of abandoning the effort, I'd disable the flaky tests. Running most of the tests is better than none.

Is it possible to disable a group of tests just for the CI, but still run them during build?

Metadata Update from @churchyard:
- Pull-request tagged with: WIP, feature, tests

5 years ago

Disable flaky tests – but not forever :)
Fixing flaky tests will join "CI on all arches" on the list of things needed before we can disable the rpmbuild %check.

rebased onto 111e9bee236fb5e1ef9b1144925429e2c394d89e

5 years ago

1 new commit added

  • Run the testsuite in parallel, --findleaks runs in the CI
5 years ago

Metadata Update from @churchyard:
- Pull-request untagged with: WIP

5 years ago

Metadata Update from @churchyard:
- Pull-request tagged with: review needed

5 years ago

Please add glibc-all-langpacks explicitly as well. With that, merge if it passes.

rebased onto ffd0715ac20f7373c8ce861911e8aa4ab9ee27f7

5 years ago

Metadata Update from @churchyard:
- Pull-request untagged with: review needed
- Pull-request tagged with: rebase and merge

5 years ago

rebased onto bc86296

5 years ago

Metadata Update from @churchyard:
- Request assigned

5 years ago

Pull-Request has been merged by churchyard

5 years ago