user/bash-completion (aarch64): FTTFS: TestXhost.test_hosts / AssertionError: assert <CompletionRe...['localhost']> == ['-localhost']
Found on aarch64; not inherently a package bug but documenting here for completeness:
...
=================================== FAILURES ===================================
___________________________ TestXhost.test_hosts[+] ____________________________
self = <test_xhost.TestXhost object at 0xffff9c74dd90>
bash = <pexpect.pty_spawn.spawn object at 0xffff9c754110>, hosts = ['localhost']
prefix = '+'
@pytest.mark.parametrize("prefix", ["+", "-", ""])
def test_hosts(self, bash, hosts, prefix):
completion = assert_complete(bash, "xhost %s" % prefix)
> assert completion == ["%s%s" % (prefix, x) for x in hosts]
E AssertionError: assert <CompletionRe...['localhost']> == ['+localhost']
E Use -v to get the full diff
/usr/src/packages/user/bash-completion/src/bash-completion-2.11/test/t/test_xhost.py:11: AssertionError
___________________________ TestXhost.test_hosts[-] ____________________________
self = <test_xhost.TestXhost object at 0xffff9c765350>
bash = <pexpect.pty_spawn.spawn object at 0xffff9c754110>, hosts = ['localhost']
prefix = '-'
@pytest.mark.parametrize("prefix", ["+", "-", ""])
def test_hosts(self, bash, hosts, prefix):
completion = assert_complete(bash, "xhost %s" % prefix)
> assert completion == ["%s%s" % (prefix, x) for x in hosts]
E AssertionError: assert <CompletionRe...['localhost']> == ['-localhost']
E Use -v to get the full diff
/usr/src/packages/user/bash-completion/src/bash-completion-2.11/test/t/test_xhost.py:11: AssertionError
=========================== short test summary info ============================
FAILED test_xhost.py::TestXhost::test_hosts[+] - AssertionError: assert <Comp...
FAILED test_xhost.py::TestXhost::test_hosts[-] - AssertionError: assert <Comp...
= 2 failed, 1125 passed, 414 skipped, 18 xfailed, 3 xpassed in 786.35s (0:13:06) =
make[4]: *** [Makefile:1257: check-local] Error 1
make[4]: Leaving directory '/usr/src/packages/user/bash-completion/src/bash-completion-2.11/test/t'
make[3]: *** [Makefile:1135: check-am] Error 2
make[3]: Leaving directory '/usr/src/packages/user/bash-completion/src/bash-completion-2.11/test/t'
make[2]: *** [Makefile:984: check-recursive] Error 1
make[2]: Leaving directory '/usr/src/packages/user/bash-completion/src/bash-completion-2.11/test/t'
make[1]: *** [Makefile:304: check-recursive] Error 1
make[1]: Leaving directory '/usr/src/packages/user/bash-completion/src/bash-completion-2.11/test'
make: *** [Makefile:481: check-recursive] Error 1
>>> ERROR: bash-completion: check failed
The root cause is that ::1 localhost
is missing from /etc/hosts
. Are the tests broken, if they fail on a system with that file containing only 127.0.0.1 localhost
?