Skip to content

Instantly share code, notes, and snippets.

@PlasmaPower
Created July 31, 2016 20:23
Show Gist options
  • Save PlasmaPower/db80e2fce8e4926b53c7695cdc17afd7 to your computer and use it in GitHub Desktop.
Save PlasmaPower/db80e2fce8e4926b53c7695cdc17afd7 to your computer and use it in GitHub Desktop.

First, this failure occurs:

==> trusty64: =================================== FAILURES ===================================
==> trusty64: __________________ ArchiverTestCase.test_basic_functionality ___________________
==> trusty64: 
==> trusty64: self = <borg.testsuite.archiver.ArchiverTestCase testMethod=test_basic_functionality>
==> trusty64: 
==> trusty64:     def test_basic_functionality(self):
==> trusty64:         have_root = self.create_test_files()
==> trusty64:         # fork required to test show-rc output
==> trusty64:         output = self.cmd('init', '--show-version', '--show-rc', self.repository_location, fork=True)
==> trusty64:         self.assert_in('borgbackup version', output)
==> trusty64:         self.assert_in('terminating with success status, rc 0', output)
==> trusty64:         self.cmd('create', self.repository_location + '::test', 'input')
==> trusty64:         output = self.cmd('create', '--stats', self.repository_location + '::test.2', 'input')
==> trusty64:         self.assert_in('Archive name: test.2', output)
==> trusty64:         self.assert_in('This archive: ', output)
==> trusty64:         with changedir('output'):
==> trusty64:             self.cmd('extract', self.repository_location + '::test')
==> trusty64:         list_output = self.cmd('list', '--short', self.repository_location)
==> trusty64:         self.assert_in('test', list_output)
==> trusty64:         self.assert_in('test.2', list_output)
==> trusty64:         expected = [
==> trusty64:             'input',
==> trusty64:             'input/bdev',
==> trusty64:             'input/cdev',
==> trusty64:             'input/dir2',
==> trusty64:             'input/dir2/file2',
==> trusty64:             'input/empty',
==> trusty64:             'input/file1',
==> trusty64:             'input/flagfile',
==> trusty64:         ]
==> trusty64:         if are_fifos_supported():
==> trusty64:             expected.append('input/fifo1')
==> trusty64:         if are_symlinks_supported():
==> trusty64:             expected.append('input/link1')
==> trusty64:         if are_hardlinks_supported():
==> trusty64:             expected.append('input/hardlink')
==> trusty64:         if not have_root:
==> trusty64:             # we could not create these device files without (fake)root
==> trusty64:             expected.remove('input/bdev')
==> trusty64:             expected.remove('input/cdev')
==> trusty64:         if has_lchflags:
==> trusty64:             # remove the file we did not backup, so input and output become equal
==> trusty64:             expected.remove('input/flagfile')  # this file is UF_NODUMP
==> trusty64:             os.remove(os.path.join('input', 'flagfile'))
==> trusty64:         list_output = self.cmd('list', '--short', self.repository_location + '::test')
==> trusty64:         for name in expected:
==> trusty64:             self.assert_in(name, list_output)
==> trusty64: >       self.assert_dirs_equal('input', 'output/input')
==> trusty64: 
==> trusty64: .tox/py34/lib/python3.4/site-packages/borg/testsuite/archiver.py:359: 
==> trusty64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
==> trusty64: .tox/py34/lib/python3.4/site-packages/borg/testsuite/__init__.py:142: in assert_dirs_equal
==> trusty64:     self._assert_dirs_equal_cmp(diff)
==> trusty64: .tox/py34/lib/python3.4/site-packages/borg/testsuite/__init__.py:181: in _assert_dirs_equal_cmp
==> trusty64:     self.assert_equal(d1, d2)
==> trusty64: E   AssertionError: Lists differ: ['link1', 41471, 65534, 65534, None, 1, 0, 1469995900946967600, None] != ['link1', 41471, 65534, 65534, None, 1, 0, 1469995902154967600, None]
==> trusty64: E   
==> trusty64: E   First differing element 7:
==> trusty64: E   1469995900946967600
==> trusty64: E   1469995902154967600
==> trusty64: E   
==> trusty64: E   - ['link1', 41471, 65534, 65534, None, 1, 0, 1469995900946967600, None]
==> trusty64: E   ?                                                     ^^ -
==> trusty64: E   
==> trusty64: E   + ['link1', 41471, 65534, 65534, None, 1, 0, 1469995902154967600, None]
==> trusty64: E   ?                                                     ^^^
==> trusty64: === 1 failed, 39 passed, 1 skipped, 6 xfailed, 1349 error in 213.09 seconds ====

Then, this error occurs for each future test:

==> trusty64: self = <FDCapture 1 oldfd=6>
==> trusty64: 
==> trusty64:     def snap(self):
==> trusty64:         f = self.tmpfile
==> trusty64:         f.seek(0)
==> trusty64:         res = f.read()
==> trusty64:         if res:
==> trusty64:             enc = getattr(f, "encoding", None)
==> trusty64:             if enc and isinstance(res, bytes):
==> trusty64:                 res = py.builtin._totext(res, enc, "replace")
==> trusty64: >           f.truncate(0)
==> trusty64: E           FileNotFoundError: [Errno 2] No such file or directory
==> trusty64: 
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/capture.py:355: FileNotFoundError
==> trusty64: ___________________ ERROR at teardown of XattrTestCase.test ____________________
==> trusty64: 
==> trusty64: self = <CallInfo when='teardown' exception: [Errno 2] No such file or directory>
==> trusty64: func = <function call_runtest_hook.<locals>.<lambda> at 0x7f387069da60>
==> trusty64: when = 'teardown'
==> trusty64: 
==> trusty64:     def __init__(self, func, when):
==> trusty64:         #: context of invocation: one of "setup", "call",
==> trusty64:         #: "teardown", "memocollect"
==> trusty64:         self.when = when
==> trusty64:         self.start = time()
==> trusty64:         try:
==> trusty64: >           self.result = func()
==> trusty64: 
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/runner.py:150: 
==> trusty64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/runner.py:138: in <lambda>
==> trusty64:     return CallInfo(lambda: ihook(item=item, **kwds), when=when)
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py:724: in __call__
==> trusty64:     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py:338: in _hookexec
==> trusty64:     return self._inner_hookexec(hook, methods, kwargs)
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py:333: in <lambda>
==> trusty64:     _MultiCall(methods, kwargs, hook.spec_opts).execute()
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py:595: in execute
==> trusty64:     return _wrapped_call(hook_impl.function(*args), self.execute)
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py:249: in _wrapped_call
==> trusty64:     wrap_controller.send(call_outcome)
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/capture.py:139: in pytest_runtest_teardown
==> trusty64:     self.suspendcapture_item(item, "teardown")
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/capture.py:150: in suspendcapture_item
==> trusty64:     out, err = self.suspendcapture()
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/capture.py:91: in suspendcapture
==> trusty64:     outerr = cap.readouterr()
==> trusty64: .tox/py34/lib/python3.4/site-packages/_pytest/capture.py:302: in readouterr
==> trusty64:     return (self.out.snap() if self.out is not None else "",
==> trusty64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

Here's the tree of the TMPDIR used (captured a bit before the end of the tests):

/mnt/borg-tests/cifs
├── pytest-of-root
│   ├── pytest-0
│   │   ├── test_acquire_break_reacquire0
│   │   ├── test_break0
│   │   ├── test_checks0
│   │   ├── test_convert_all_False_0
│   │   │   ├── config
│   │   │   ├── data
│   │   │   │   └── 0
│   │   │   │       └── 0
│   │   │   ├── hints.0
│   │   │   ├── index.0
│   │   │   ├── keys
│   │   │   │   └── mnt_borg_tests_cifs_pytest_of_root_pytest_0_test_convert_all_False_0_keys
│   │   │   └── README
│   │   ├── test_convert_all_True_0
│   │   │   ├── config
│   │   │   ├── data
│   │   │   │   └── 0
│   │   │   │       └── 0
│   │   │   ├── hints.0
│   │   │   ├── index.0
│   │   │   ├── keys
│   │   │   │   └── mnt_borg_tests_cifs_pytest_of_root_pytest_0_test_convert_all_True_0_keys
│   │   │   └── README
│   │   ├── test_convert_segments_False_0
│   │   │   ├── config
│   │   │   ├── data
│   │   │   │   └── 0
│   │   │   │       └── 0
│   │   │   ├── hints.0
│   │   │   ├── index.0
│   │   │   └── README
│   │   ├── test_convert_segments_True_0
│   │   │   ├── config
│   │   │   ├── data
│   │   │   │   └── 0
│   │   │   │       └── 0
│   │   │   ├── hints.0
│   │   │   ├── index.0
│   │   │   └── README
│   │   ├── test_decrypt_integrity0
│   │   ├── test_downgrade0
│   │   ├── test_empty0
│   │   ├── test_exclusive0
│   │   ├── test_hardlink_False_0
│   │   ├── test_hardlink_True_0
│   │   ├── test_keyfile0
│   │   ├── test_keyfile20
│   │   ├── test_keyfile2_kfenv0
│   │   ├── test_keyfile_kfenv0
│   │   ├── test_keys0
│   │   │   ├── config
│   │   │   ├── data
│   │   │   │   └── 0
│   │   │   │       └── 0
│   │   │   ├── hints.0
│   │   │   ├── index.0
│   │   │   ├── keys
│   │   │   │   └── mnt_borg_tests_cifs_pytest_of_root_pytest_0_test_keys0_keys
│   │   │   └── README
│   │   ├── test_modify_get0
│   │   ├── test_passphrase0
│   │   ├── test_patterns_from_file_lines00
│   │   ├── test_patterns_from_file_lines10
│   │   ├── test_patterns_from_file_lines11
│   │   ├── test_patterns_from_file_lines12
│   │   ├── test_patterns_from_file_lines13
│   │   ├── test_patterns_from_file_lines14
│   │   ├── test_patterns_from_file_lines20
│   │   ├── test_patterns_from_file_lines30
│   │   ├── test_patterns_from_file_lines40
│   │   ├── test_patterns_from_file_lines50
│   │   ├── test_patterns_from_file_lines60
│   │   ├── test_patterns_from_file_lines70
│   │   ├── test_patterns_from_file_lines80
│   │   ├── test_patterns_from_file_lines90
│   │   ├── test_return_codes_python_0
│   │   │   ├── input
│   │   │   │   └── test_file
│   │   │   ├── output
│   │   │   │   └── mnt
│   │   │   │       └── borg-tests
│   │   │   │           └── cifs
│   │   │   │               └── pytest-of-root
│   │   │   │                   └── pytest-0
│   │   │   │                       └── test_return_codes_python_0
│   │   │   │                           └── input
│   │   │   │                               └── test_file
│   │   │   └── repo
│   │   │       ├── config
│   │   │       ├── data
│   │   │       │   └── 0
│   │   │       │       ├── 1
│   │   │       │       ├── 3
│   │   │       │       ├── 4
│   │   │       │       └── 5
│   │   │       ├── hints.5
│   │   │       ├── index.5
│   │   │       ├── lock.roster
│   │   │       └── README
│   │   ├── test_shared0
│   │   ├── test_timeout0
│   │   ├── test_timeout1
│   │   └── test_upgrade0
│   └── pytest-root -> /mnt/borg-tests/cifs/pytest-of-root/pytest-0/test_hardlink_False_0
└── tmp83b3ebda

67 directories, 40 files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment