[Pkg-utopia-maintainers] Bug#1133443: cockpit: ftbfs with GCC-16
Martin Pitt
mpitt at debian.org
Wed Apr 22 06:55:58 BST 2026
Control: retitle -1 cockpit: test_fsread1_errors unit test fails as root
Control: forwarded -1 https://github.com/cockpit-project/cockpit/pull/23167
Hello Emanuele,
Emanuele Rocca [2026-04-13 15:02 +0200]:
> cockpit fails to build in a test rebuild on at least amd64 and arm64 with
> gcc-16/g++-16, but builds properly with gcc-15/g++-15.
Thanks for doing these checks!
I just built cockpit in current sid with gcc-16, and it works just fine.
> =================================== FAILURES ===================================
> _____________________________ test_fsread1_errors ______________________________
>
> transport = <test.pytest.mocktransport.MockTransport object at 0xff010723cdd0>
> tmp_path = PosixPath('/tmp/pytest-of-sbuild/pytest-0/test_fsread1_errors0')
>
> @pytest.mark.asyncio
> async def test_fsread1_errors(transport: MockTransport, tmp_path: Path) -> None:
> > await transport.check_open('fsread1', path='/etc/shadow', problem='access-denied')
>
> test/pytest/test_bridge.py:422:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> test/pytest/mocktransport.py:66: in check_open
> await self.assert_msg('', command='close', channel=ch, problem=problem, absent_keys=absent_keys,
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> self = <test.pytest.mocktransport.MockTransport object at 0xff010723cdd0>
> expected_channel = '', absent_keys = ()
> kwargs = {'channel': 'channel.1', 'command': 'close', 'problem': 'access-denied'}
> msg = {'channel': 'channel.1', 'command': 'done'}
This is Python code, so totally unrelated to the C compiler. Rather, what this
unit test assumes is that it doesn't run as root, i.e. that it cannot read
/etc/shadow. So either you ran the build as root (most probably) or your build
env has a world-readable /etc/shadow.
I fixed the test in the above PR to skip that bit when running as root.
Pitti
More information about the Pkg-utopia-maintainers
mailing list