duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Failure running tests.


From: Scott Hannahs
Subject: Re: [Duplicity-talk] Failure running tests.
Date: Thu, 12 Sep 2019 12:29:20 -0400

Ken,

Under Mac OS X 10.11.X you can run “ulimit -n 5120” which seems to be sufficient to do the testing phase.  It might be possible to use a smaller number but I haven’t checked.

Under Mac OS 10.14.X running "ulimit -n 5120” will give the error "-bash: ulimit: open files: cannot modify limit: Operation not permitted” if 5120 is more than the current setting.  This was a surprise to me.  So my shell script to run the "setup pytest.py” would fail immediately, since the default is 4096 and I can’t increase to 5120 under the newer Mojave system.  Once I worked around that, I got the errors I sent.

I run the build as a user called fink-bld, this user is not a privileged user.  But this is the user who unpacks the files and owns the entire folder structure where the build and testing are taking place.  This should work and makes sure the build is for a plain vanilla user and not using any of my personal preferences settings and can be built/tested by a non-administrator account.

I have asked that the build directory be kept at the end of testing and there is no folder “testifies” only the zipped version.  However I think the testing suite creates and removes that directory repeatedly.   So having it not exist at the end of testing seems normal.  The pytest goest through all the tests and just records the errors and does not stop.  Was that test supposed to be a case where the cache file does not exist?  There is no cache folder when I extract the testifiles.tar.gz archive manually so not finding a cache is normal and it should be regenerated during testing?

I used “fink” (of course) to install python 3.7, this is installed from source.  And is actually 3.7.4.  These should have the same modules installed on both OS systems.  There may be something in more recently defined unicode glyphs that is incompatible.  At some time, some glyphs (or whatever unicode calls them) have been redefined.  The A with a circle (or angstrom) is an example.  I think there were two different unicode identifiers for these.

-Scott


On Sep 12, 2019, at 12:01 PM, Kenneth Loafman <address@hidden> wrote:

Scott,

I've had access to ulimit from the first.  I'm not sure what you mean.

Who owns the directory where duplicity is testing?  If the testing user can't write to that directory most of the functional tests will fail.

I'm not sure about Python's unicode environment.  How did you install Python?  Was it from binary or source?  If source, how?

...Ken


On Wed, Sep 11, 2019 at 4:39 PM Scott Hannahs <address@hidden> wrote:
Ken,

I just managed to try this on a newer OS (took awhile since there seems to be no access to the ulimit command).  I need to set the max files to some fairly large number.  This does not seem to be necessary for running duplicity but for the testing.  Duplicity seems to run correctly on my system and back things up to the archive.  However, I don’t have funny unicode file names nor am I trying to restart a backup which are the failing tests.

I have updated tox (to 3.14.0).  I installed future version 0.17 and I had found that dependency earlier.  That dependency is just if I need to run the testing phase, correct?  I updated virtualenv to version 16.7.5.

There are two types of errors.  This one has 12 instances and happens on both OS versions.

b'  File "/sw/src/fink.build/duplicity-0.8.04-3/duplicity-0.8.04/duplicity/path.py", line 476, in <lambda>'
b'    util.maybe_ignore_errors(lambda: os.chown(other.name, self.stat.st_uid, self.stat.st_gid))'
b"PermissionError: [Errno 1] Operation not permitted: b'testfiles/cache/3f6f90580e457c90e7202bc33cd9e363/duplicity-full-signatures.19700102T034640Z.sigtar.gz'"
b'During handling of the above exception, another exception occurred:'
b'Traceback (most recent call last):'
b'  File "../bin/duplicity", line 157, in <module>'
b'    if u"Forced assertion for testing" in util.uexc(e):'
b'  File "/sw/src/fink.build/duplicity-0.8.04-3/duplicity-0.8.04/duplicity/util.py", line 120, in uexc'
b'    return fsdecode(m)'
b'  File "/sw/lib/python3.7/os.py", line 821, in fsdecode'
b'    filename = fspath(filename)  # Does type-checking of `filename`.'
b'TypeError: expected str, bytes or os.PathLike object, not int'
...return_val: 1
This seems to be a permission error.  But I can’t even find the cache file that shows the error.  That may be part of the test, but then it has another exception while handling the error in decoding the path.  It seems like there is a some sort of an issue with filename being an “int” instead of str, bytes or os.PathLike object.  I am lost at this point….  :-)

The other error occurs under the older OS (10.11.6) El Capitan and not under the newer (10.14.6) Mojave.  This seems to be in the unicode handling and the arrays are of different number of bytes for the same visual glyphs.  They appear visually to be the same strings, but one lists the last items a s 60 chars, and the second string is 175 chars.  Is El Capitan using some older unicode encoding?  Python 3.7 should be consistent on both systems, or so I thought.  This happens in 5 instances in the older OS.

unit/test_selection.py:240: in ParseTest
    self.assertEqual(indicies, results_as_list)
E   AssertionError: Lists differ: [(), [91 chars] 'Παράδειγμα'), ('прыклад', 'пример', '例', 'Πα[60 chars]t',)] != [(), [91 chars] 'Παράδειγμα'), ('прыклад', 'пример', '例', 'Π[175 chars]t',)]
E   
E   First differing element 4:
E   ('прыклад', 'пример', '例', 'Παράδειγμα')
E   ('прыклад', 'пример', '例', 'Παράδειγμα')
E   
E   Second list contains 2 additional elements.
E   First extra element 8:
E   ('прыклад', 'উদাহরণ')
E   
E     [(),
E      ('прыклад',),
E      ('прыклад', 'пример'),
E      ('прыклад', 'пример', '例'),
E   -  ('прыклад', 'пример', '例', 'Παράδειγμα'),
E   ?                                 ^
E   
E   +  ('прыклад', 'пример', '例', 'Παράδειγμα'),
E   ?                                 ^^
E   
E   +  ('прыклад', 'пример', '例', 'Παράδειγμα', 'דוגמא.txt'),
E   +  ('прыклад', 'пример', '例', 'Παράδειγμα', 'उदाहरण.txt'),
E   -  ('прыклад', 'пример', '例', 'Παράδειγμα', 'ઉદાહરણ.log'),
E   ?                                 ^
E   
E   +  ('прыклад', 'пример', '例', 'Παράδειγμα', 'ઉદાહરણ.log'),
E   ?                                 ^^
E   
E      ('прыклад', 'উদাহরণ'),
E      ('օրինակ.txt',)]




On Sep 9, 2019, at 10:59 AM, Kenneth Loafman <address@hidden> wrote:

Scott,

setup.py (uses dist/makedist) is failing because you do not have the future module installed.  There may be more:

    install_requires=[u'fasteners', u'future'],
    tests_require=[u'pytest', u'pytest-runner', u'fasteners', u'future', u'mock', u'pexpect'],

dist/makedist will make a tarball from the files in dist/relfiles, then tox will use that tarball to install in a virtualenv for testing.

The only modules I see that are way out of date is tox and virtualenv.  An update would help.

...Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]