On Tue, Feb 02, 2016 at 12:16:32PM +0100, Lukas Slebodnik wrote:
> On (28/01/16 17:33), Lukas Slebodnik wrote:
> >On (28/01/16 16:26), Lukas Slebodnik wrote:
> >>On (28/01/16 15:31), Jakub Hrozek wrote:
> >>>On Wed, Jan 13, 2016 at 03:13:40PM +0100, Lukas Slebodnik wrote:
> >>>> ehlo,
> >>>>
> >>>> attached patch should fix race condition in tests.
> >>>>
> >>>> e.g.
> >>>>
======================================================================
> >>>> ERROR: testImport (__main__.PySssMurmurImport)
> >>>> Import the module and assert it comes from tree
> >>>>
----------------------------------------------------------------------
> >>>> Traceback (most recent call last):
> >>>> File "/home/build/sssd/src/tests/pysss_murmur-test.py",
line 71, in testImport
> >>>> os.symlink("_py3sss_murmur.so",
"pysss_murmur.so")
> >>>> FileExistsError: [Errno 17] File exists: '_py3sss_murmur.so'
-> 'pysss_murmur.so'
> >>>>
> >>>>
----------------------------------------------------------------------
> >>>>
> >>>>
======================================================================
> >>>> ERROR: testImport (__main__.PySssMurmurImport)
> >>>> Import the module and assert it comes from tree
> >>>>
----------------------------------------------------------------------
> >>>> Traceback (most recent call last):
> >>>> File "/home/build/sssd/src/tests/pysss_murmur-test.py",
line 73, in testImport
> >>>> os.symlink("_py2sss_murmur.so",
"pysss_murmur.so")
> >>>> OSError: [Errno 17] File exists
> >>>>
> >>>>
----------------------------------------------------------------------
> >>>>
> >>>>
======================================================================
> >>>> ERROR: testImport (__main__.PyHbacImport)
> >>>> Import the module and assert it comes from tree
> >>>>
----------------------------------------------------------------------
> >>>> Traceback (most recent call last):
> >>>> File "/home/build/sssd/src/tests/pyhbac-test.py", line
57, in testImport
> >>>> os.symlink("_py2hbac.so", "pyhbac.so")
> >>>> OSError: [Errno 17] File exists
> >>>>
> >>>>
----------------------------------------------------------------------
> >>>>
> >>>>
======================================================================
> >>>> ERROR: testImport (__main__.PySssMurmurImport)
> >>>> Import the module and assert it comes from tree
> >>>>
----------------------------------------------------------------------
> >>>> Traceback (most recent call last):
> >>>> File "/home/build/sssd/src/tests/pysss_murmur-test.py",
line 79, in testImport
> >>>> raise e
> >>>> File "/home/build/sssd/src/tests/pysss_murmur-test.py",
line 76, in testImport
> >>>> import pysss_murmur
> >>>> ImportError: dynamic module does not define init function
(PyInit_pysss_murmur)
> >>>>
> >>>>
----------------------------------------------------------------------
> >>>>
> >>>> LS
> >>>>
> >>>
> >>>> From e750e0c0eca29d45ea8daf96f1f07e484ebc97a4 Mon Sep 17 00:00:00
2001
> >>>> From: Lukas Slebodnik <lslebodn(a)redhat.com>
> >>>> Date: Wed, 13 Jan 2016 15:06:06 +0100
> >>>> Subject: [PATCH] TESTS: Fix race condition in python test
> >>>>
> >>>> Python tests for pyhbac and pysss_murmur created symbolic
> >>>> links in shared directory ".libs". It happened that both
> >>>> tests created symbolic link in the same time and therefore
> >>>> python2 test could try to import link to python3 module
> >>>> which caused failures in tests.
> >>>
> >>>I tried to garbage-collect stalled patches, but looks like this one
> >>>fails in CI:
> >>>
http://sssd-ci.duckdns.org/logs/job/36/75/fedora_rawhide/ci-build-debug/c...
> >>That's because hard links are not supported between different
filesystems
> >>
> >>======================================================================
> >>ERROR: testImport (__main__.PyHbacImport)
> >>Import the module and assert it comes from tree
> >>----------------------------------------------------------------------
> >>Traceback (most recent call last):
> >> File
"/var/lib/jenkins/workspace/ci/label/fedora_rawhide/src/tests/pyhbac-test.py",
line 63, in testImport
> >> os.link(src_module_path, dest_module_path)
> >>OSError: [Errno 18] Invalid cross-device link
> >>
> >>----------------------------------------------------------------------
> >>
> >>and in my case I have sorce code and test directory on one file system.
> >>I will need to update patch.
> >>
> >Updated version use symbolic-links instead of hard-links
> >
> >LS
>
> >From c587035876f03b60770bc6109b7caa679f950653 Mon Sep 17 00:00:00 2001
> >From: Lukas Slebodnik <lslebodn(a)redhat.com>
> >Date: Wed, 13 Jan 2016 15:06:06 +0100
> >Subject: [PATCH] TESTS: Fix race condition in python test
> >
> Bump.
>
> I can see it also in CI
>
http://sssd-ci.duckdns.org/logs/job/36/94/fedora_rawhide/ci-build-debug/c...
>
http://sssd-ci.duckdns.org/logs/job/36/94/fedora_rawhide/ci-build-debug/s...
Sorry, I forgot about this patch. ACK
CI:
http://sssd-ci.duckdns.org/logs/job/36/98/summary.html
master:
* 9e1de5c83371d91e200254cceef70852f5f94fd2
sssd-1-13:
* 94bafaad2401bc647a31a22953ad2d985c88b06e
LS