Iustin Pop [Mon, 10 Oct 2022 20:16:59 +0000 (23:16 +0300)]
Refresh the README
This updates the list of supported Python versions (since I can't test with Python 3.4 anymore), and adds a bit more details about dependencies needed for building from source - fixes #33.
Iustin Pop [Sun, 9 Oct 2022 19:37:08 +0000 (22:37 +0300)]
Switch CI images to newest and drop Python < 3.7
The Ubuntu 18 image with Python 3.4 is going away soon. Python 3.6 is no longer supported on newest Ubuntu *and* MacOS, so let's just switch the CI image to newer versions. If this makes the CI pass again, I'll bump supported Python versions.
Iustin Pop [Sat, 5 Jun 2021 16:05:30 +0000 (18:05 +0200)]
Enable PyPy runs as well
Switch the 'python-version' key to expanded, since it's too long
now. Also enable fail-fast, as otherwise too much time is spent
testing passing things.
Note that pypy supports a smaller range of versions (which is in a way
good, too many tests otherwise).
Iustin Pop [Sat, 5 Jun 2021 02:53:43 +0000 (04:53 +0200)]
Skip user symlink test on MacOSX
Apparently MacOS doesn't have the same limitation (feature?) as Linux
of preventing regular users from settings xattrs on symlinks, so let's
skip this test on it (MacOS).
Iustin Pop [Sat, 5 Jun 2021 02:20:15 +0000 (04:20 +0200)]
Stop uploading to coveralls
This allows significant cleanup as we don't need anymore a post-job
and we can drop lcov installation/processing. Codecov is switched back
in gcov mode.
Iustin Pop [Sat, 5 Jun 2021 01:46:48 +0000 (03:46 +0200)]
Remove auto-detection of optimal buffer size
Since we don't pass zero anymore, this code is never called. Replace
it with 'zero means hardcoded initial value', since that hardcoded
value is what we were already passing, and change all the callers to
pass in zero (as 'auto-compute' again) instead, for simplicity.
Iustin Pop [Sun, 6 Dec 2020 14:07:35 +0000 (15:07 +0100)]
Store doc/readme and doc/news in the git repo
… instead of rebuilding them every time. This is in order to fix the
readthedocs "build", since it only builds docs (via sphinx) but
doesn't run the actual build.
Iustin Pop [Sun, 29 Nov 2020 19:50:06 +0000 (20:50 +0100)]
Remove compatibility with old recommonmark versions
It's hard trying to keep compatibility with both very old (<1.8),
old (1.8) and modern (Sphinx), while also supporting old recommonmark;
recommonmark 0.5 was released in January 2019.
So let's drop the old support and just keep support for Sphinx 1.8 and
3.0+, and more modern recommonmark.
Iustin Pop [Tue, 26 Nov 2019 02:24:42 +0000 (03:24 +0100)]
Switch namespace_none test to check all calls
Instead of all input parameter types for one call. This is better
since more calls are checked, and the parameter type checking is not
the goal of this test.
Iustin Pop [Mon, 25 Nov 2019 02:07:51 +0000 (03:07 +0100)]
tests: stop trying to set user attributes on symlinks
According to xattr(7), by design setting/modifying user attributes on
symlinks is not allowed, due to the way access control works, so stop
trying to test it.
Iustin Pop [Sat, 2 Mar 2019 20:14:41 +0000 (21:14 +0100)]
Travis: remove "sudo:false"
Per the deprecation of container-based
builds (https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration),
remove the sudo:false setting.
Iustin Pop [Tue, 24 Jul 2018 21:39:00 +0000 (23:39 +0200)]
Travis: remove python 3.2 from build list
It seems the setuptools libraries that are installed in the travis
environments don't support anymore 3.2, which causes the builds to be
wrongly marked as failed.
Iustin Pop [Tue, 24 Jul 2018 21:20:53 +0000 (23:20 +0200)]
Tests: fix symlink testing
On Linux, non-root users are not allowed to set extended attributes,
so normal testing has hidden this. A fix to the Mac OS support
proposed in #14 uncovered this problem, which led to investigation and
this fix.
Manual testing on Linux with root and namespace=trusted now passes the
tests.
Iustin Pop [Tue, 24 Jul 2018 21:14:37 +0000 (23:14 +0200)]
Tests: introduce an alias for NS_USER
Using NS_USER directly makes it hard to change it for a one-off manual
test, so let's virtualise it, and additionally allow overriding from
the command line.
xwhuang [Fri, 9 Mar 2018 01:56:16 +0000 (09:56 +0800)]
Release GIL when do I/O operations
Release GIL in _list_obj, _get_obj, _set_obj, and _remove_obj. These
functions do I/O operations which take long time. We should release
GIL to allow other threads work.
Iustin Pop [Mon, 14 Nov 2016 21:02:25 +0000 (22:02 +0100)]
Expand the testing of invalid arguments
This is not significant advantage, but it does increase coverage. And
any coverage (even if not testing the logic too much) is better than
no coverage.
Iustin Pop [Tue, 25 Oct 2016 23:27:54 +0000 (01:27 +0200)]
Add a makefile coverage target
And expand a tiny bit the test suite to exercise one more error
path. Current coverage is not bad, ~87% lines coverage. For some
reason, no branch coverage is available :/
Iustin Pop [Tue, 25 Oct 2016 22:34:07 +0000 (00:34 +0200)]
Rework getting and listing attributes
Currently, getting and listing attributes is inconsistent in how it
deals with allocating memory for the data returned by the syscall:
- in most cases, we ask the kernel for the value, allocate memory,
then retrieve the value; if the value changed (increased) in the
meantime, this will lead to what should be preventable failures
- in the single case of getall, there is a loop for getting the
individual values, but not for initially get the list of values
Hence the bug report #12. This rather large change refactors a lot of
the code:
- doing a get/list is abstracted away into a helper function that
always does retries until we can read the value or fail with a
different error than ERANGE; this helper deal with all allocations
and resize operations.
- this means most of the single get/list operations are heavily
simplified
- and also means that we can always start optimistically with an
initial buffer size (currently set to 1K), instead of asking the
kernel first: this saves one out of two syscalls in the case the
value will indeed be smaller, but adds one extra syscall (the failed
initial read) in the case it's not.
The optimisation is a double-edged sword: for small attributes, it
will be a win (e.g. the test suite is ~5% faster now), but for large
attribute/lists, it will be potentially slower (50% more
syscalls). Not sure how to nicely deal with this; it would be good to
have a keyword argument maybe? Or build flag? Left for future
enhancements.