Skip to content

Instantly share code, notes, and snippets.

@danielfullmer
Created April 29, 2020 03:37
Show Gist options
  • Save danielfullmer/50dfc5e50bd10cffd540961ed741ce2a to your computer and use it in GitHub Desktop.
Save danielfullmer/50dfc5e50bd10cffd540961ed741ce2a to your computer and use it in GitHub Desktop.
============================= test session starts ==============================
platform linux -- Python 3.7.7, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 -- /nix/store/ihy2vly61ndky6qlv1q4dfdiv28vszkh-python3-3.7.7/bin/python3.7
cachedir: .pytest_cache
rootdir: /build/bcachefs-tools-5d6e237/tests
collected 28 items
test_basic.py::test_help PASSED [ 3%]
test_basic.py::test_format FAILED [ 7%]
test_basic.py::test_fsck FAILED [ 10%]
test_basic.py::test_list FAILED [ 14%]
test_basic.py::test_list_inodes FAILED [ 17%]
test_basic.py::test_list_dirent FAILED [ 21%]
test_fixture.py::test_sparse_file PASSED [ 25%]
test_fixture.py::test_device_1g PASSED [ 28%]
test_fixture.py::test_abort PASSED [ 32%]
test_fixture.py::test_segfault PASSED [ 35%]
test_fixture.py::test_check SKIPPED [ 39%]
test_fixture.py::test_leak SKIPPED [ 42%]
test_fixture.py::test_undefined SKIPPED [ 46%]
test_fixture.py::test_undefined_branch SKIPPED [ 50%]
test_fixture.py::test_read_after_free SKIPPED [ 53%]
test_fixture.py::test_write_after_free SKIPPED [ 57%]
test_fixture.py::test_mountpoint PASSED [ 60%]
test_fixture.py::test_timestamp PASSED [ 64%]
test_fuse.py::test_mount SKIPPED [ 67%]
test_fuse.py::test_remount SKIPPED [ 71%]
test_fuse.py::test_lostfound SKIPPED [ 75%]
test_fuse.py::test_create SKIPPED [ 78%]
test_fuse.py::test_mkdir SKIPPED [ 82%]
test_fuse.py::test_unlink SKIPPED [ 85%]
test_fuse.py::test_rmdir SKIPPED [ 89%]
test_fuse.py::test_rename SKIPPED [ 92%]
test_fuse.py::test_link SKIPPED [ 96%]
test_fuse.py::test_write SKIPPED [100%]
=================================== FAILURES ===================================
_________________________________ test_format __________________________________
tmpdir = local('/build/pytest-of-nixbld/pytest-0/test_format0')
def test_format(tmpdir):
dev = util.device_1g(tmpdir)
ret = util.run_bch('format', dev, valgrind=True)
> assert ret.returncode == 0
E assert 1 == 0
E -1
E +0
test_basic.py:19: AssertionError
----------------------------- Captured stdout call -----------------------------
Running '[PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_format0/dev-1g')]'
__________________________________ test_fsck ___________________________________
tmpdir = local('/build/pytest-of-nixbld/pytest-0/test_fsck0')
def test_fsck(tmpdir):
> dev = util.format_1g(tmpdir)
test_basic.py:24:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
util.py:88: in format_1g
run_bch('format', dev, check=True)
util.py:67: in run_bch
return run(*cmds, **kwargs)
util.py:57: in run
encoding='utf-8', check=check)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = ([PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_fsck0/dev-1g')],)
kwargs = {'encoding': 'utf-8', 'stderr': -1, 'stdout': -1}
process = <subprocess.Popen object at 0x7ffff64f3450>, stdout = ''
stderr = 'insufficient space for superblocks\n', retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
> output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '[PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_fsck0/dev-1g')]' returned non-zero exit status 1.
/nix/store/ihy2vly61ndky6qlv1q4dfdiv28vszkh-python3-3.7.7/lib/python3.7/subprocess.py:512: CalledProcessError
----------------------------- Captured stdout call -----------------------------
Running '[PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_fsck0/dev-1g')]'
__________________________________ test_list ___________________________________
tmpdir = local('/build/pytest-of-nixbld/pytest-0/test_list0')
def test_list(tmpdir):
> dev = util.format_1g(tmpdir)
test_basic.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
util.py:88: in format_1g
run_bch('format', dev, check=True)
util.py:67: in run_bch
return run(*cmds, **kwargs)
util.py:57: in run
encoding='utf-8', check=check)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = ([PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_list0/dev-1g')],)
kwargs = {'encoding': 'utf-8', 'stderr': -1, 'stdout': -1}
process = <subprocess.Popen object at 0x7ffff65625d0>, stdout = ''
stderr = 'insufficient space for superblocks\n', retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
> output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '[PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_list0/dev-1g')]' returned non-zero exit status 1.
/nix/store/ihy2vly61ndky6qlv1q4dfdiv28vszkh-python3-3.7.7/lib/python3.7/subprocess.py:512: CalledProcessError
----------------------------- Captured stdout call -----------------------------
Running '[PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_list0/dev-1g')]'
_______________________________ test_list_inodes _______________________________
tmpdir = local('/build/pytest-of-nixbld/pytest-0/test_list_inodes0')
def test_list_inodes(tmpdir):
> dev = util.format_1g(tmpdir)
test_basic.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
util.py:88: in format_1g
run_bch('format', dev, check=True)
util.py:67: in run_bch
return run(*cmds, **kwargs)
util.py:57: in run
encoding='utf-8', check=check)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = ([PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_list_inodes0/dev-1g')],)
kwargs = {'encoding': 'utf-8', 'stderr': -1, 'stdout': -1}
process = <subprocess.Popen object at 0x7ffff656ad10>, stdout = ''
stderr = 'insufficient space for superblocks\n', retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
> output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '[PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_list_inodes0/dev-1g')]' returned non-zero exit status 1.
/nix/store/ihy2vly61ndky6qlv1q4dfdiv28vszkh-python3-3.7.7/lib/python3.7/subprocess.py:512: CalledProcessError
----------------------------- Captured stdout call -----------------------------
Running '[PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_list_inodes0/dev-1g')]'
_______________________________ test_list_dirent _______________________________
tmpdir = local('/build/pytest-of-nixbld/pytest-0/test_list_dirent0')
def test_list_dirent(tmpdir):
> dev = util.format_1g(tmpdir)
test_basic.py:52:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
util.py:88: in format_1g
run_bch('format', dev, check=True)
util.py:67: in run_bch
return run(*cmds, **kwargs)
util.py:57: in run
encoding='utf-8', check=check)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = ([PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_list_dirent0/dev-1g')],)
kwargs = {'encoding': 'utf-8', 'stderr': -1, 'stdout': -1}
process = <subprocess.Popen object at 0x7ffff64cf150>, stdout = ''
stderr = 'insufficient space for superblocks\n', retcode = 1
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
> output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '[PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_list_dirent0/dev-1g')]' returned non-zero exit status 1.
/nix/store/ihy2vly61ndky6qlv1q4dfdiv28vszkh-python3-3.7.7/lib/python3.7/subprocess.py:512: CalledProcessError
----------------------------- Captured stdout call -----------------------------
Running '[PosixPath('../bcachefs'), 'format', PosixPath('/build/pytest-of-nixbld/pytest-0/test_list_dirent0/dev-1g')]'
=================== 5 failed, 7 passed, 16 skipped in 1.04s ====================
make: *** [Makefile:79: check] Error 1
builder for '/nix/store/bdhg0g7f0nd13zxcq33jcchmzhdxx4m2-bcachefs-tools-2020-04-04.drv' failed with exit code 2
error: build of '/nix/store/bdhg0g7f0nd13zxcq33jcchmzhdxx4m2-bcachefs-tools-2020-04-04.drv' failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment