Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

st_mtime_ns test fail on netbsd #204

Closed
ThomasWaldmann opened this issue Sep 15, 2015 · 1 comment
Closed

st_mtime_ns test fail on netbsd #204

ThomasWaldmann opened this issue Sep 15, 2015 · 1 comment

Comments

@ThomasWaldmann
Copy link
Member

self = <borg.testsuite.archiver.ArchiverTestCase testMethod=test_overwrite>

    def test_overwrite(self):
        self.create_regular_file('file1', size=1024 * 80)
        self.create_regular_file('dir2/file2', size=1024 * 80)
        self.cmd('init', self.repository_location)
        self.cmd('create', self.repository_location + '::test', 'input')
        # Overwriting regular files and directories should be supported
        os.mkdir('output/input')
        os.mkdir('output/input/file1')
        os.mkdir('output/input/dir2')
        with changedir('output'):
            self.cmd('extract', self.repository_location + '::test')
>       self.assert_dirs_equal('input', 'output/input')

py34/lib/python3.4/site-packages/borg/testsuite/archiver.py:405: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
py34/lib/python3.4/site-packages/borg/testsuite/__init__.py:53: in assert_dirs_equal
    self._assert_dirs_equal_cmp(diff)
py34/lib/python3.4/site-packages/borg/testsuite/__init__.py:84: in _assert_dirs_equal_cmp
    self.assert_equal(d1, d2)
E   AssertionError: Lists differ: ['dir2', 16832, 1000, 0, 1132527, 0, 2, 1442345591007673321, {}] != ['dir2', 16832, 1000, 0, 1135623, 0, 2, 1442345591007673000, {}]
E   
E   First differing element 4:
E   1132527
E   1135623
E   
E   - ['dir2', 16832, 1000, 0, 1132527, 0, 2, 1442345591007673321, {}]
E   ?                              ^^^                        ^^^
E   
E   + ['dir2', 16832, 1000, 0, 1135623, 0, 2, 1442345591007673000, {}]
E   ?                             ++ ^                        ^^^

The order of items in that list is: filename, st_mode, st_uid, st_gid, st_rdev, st_nlink, st_mtime_ns, xattr_dict.

The st_rdev difference is maybe similar cause as on openbsd, see issue #203.

So, st_mtime_ns seems to have less resolution here somehow.
This difference only happens on netbsd - not on linux, freebsd, darwin.

Reproducing:

vagrant up netbsd
vagrant ssh netbsd

Then:

cd /vagrant/borg
. borg-env/bin/activate
cd borg
tox

@ThomasWaldmann
Copy link
Member Author

jborg/attic#304 somehow similar granularity / rounding issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant