Source: ydiff
Version: 1.5-1
Severity: important
Justification: fails autopkgtest on Debian CI infrastructure
Tags: forky sid
User: [email protected]
Usertags: lxc

Hi,

Debian CI is switching away from lxc containers in favor of incus Containers.
This is motivated by security concerns from us; incus is based on lxc, but
orchestrates containers substantially different: containers are not privileged
(so root in the container is not uid 0 outside of it), and incus imposes a
stricter isolation from the host system).

ydiff passes its tests under lxc, but fails under incus.
The relevant part of the failure is (hopefully):

> ======================================================================
> ERROR: test_read_diff_neg (__main__.MainTest.test_read_diff_neg)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/autopkgtest.IctHOY/build.H40/src/tests/./test_ydiff.py", line 
> 889, in test_read_diff_neg
>     ret = ydiff._main()
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 699, in _entry_wrapper
>     return entry_fn()
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 793, in _main
>     stream = _get_patch_stream(args, opts.log)
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 763, in 
> _get_patch_stream
>     mode = os.fstat(sys.stdin.fileno()).st_mode
>                     ~~~~~~~~~~~~~~~~^^
> ValueError: I/O operation on closed file
> 
> ======================================================================
> ERROR: test_read_log (__main__.MainTest.test_read_log)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/autopkgtest.IctHOY/build.H40/src/tests/./test_ydiff.py", line 
> 882, in test_read_log
>     ret = ydiff._main()
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 699, in _entry_wrapper
>     return entry_fn()
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 793, in _main
>     stream = _get_patch_stream(args, opts.log)
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 763, in 
> _get_patch_stream
>     mode = os.fstat(sys.stdin.fileno()).st_mode
>                     ~~~~~~~~~~~~~~~~^^
> ValueError: I/O operation on closed file
> 
> ======================================================================
> ERROR: test_read_log_neg (__main__.MainTest.test_read_log_neg)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/autopkgtest.IctHOY/build.H40/src/tests/./test_ydiff.py", line 
> 896, in test_read_log_neg
>     ret = ydiff._main()
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 699, in _entry_wrapper
>     return entry_fn()
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 793, in _main
>     stream = _get_patch_stream(args, opts.log)
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 763, in 
> _get_patch_stream
>     mode = os.fstat(sys.stdin.fileno()).st_mode
>                     ~~~~~~~~~~~~~~~~^^
> ValueError: I/O operation on closed file
> 
> ======================================================================
> ERROR: test_get_patch_stream_no_log_support 
> (__main__.MainUnitTests.test_get_patch_stream_no_log_support)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/python3.14/unittest/mock.py", line 1439, in patched
>     return func(*newargs, **newkeywargs)
>   File "/tmp/autopkgtest.IctHOY/build.H40/src/tests/./test_ydiff.py", line 
> 812, in test_get_patch_stream_no_log_support
>     self.assertIsNone(ydiff._get_patch_stream([], True))
>                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 763, in 
> _get_patch_stream
>     mode = os.fstat(sys.stdin.fileno()).st_mode
>                     ~~~~~~~~~~~~~~~~^^
> ValueError: I/O operation on closed file
> 
> ======================================================================
> ERROR: test_get_patch_stream_stdin_file 
> (__main__.MainUnitTests.test_get_patch_stream_stdin_file)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/autopkgtest.IctHOY/build.H40/src/tests/./test_ydiff.py", line 
> 805, in test_get_patch_stream_stdin_file
>     self.assertEqual(ydiff._get_patch_stream(
>                      ~~~~~~~~~~~~~~~~~~~~~~~^
>         [], False), sys.stdin.buffer)
>         ^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/ydiff.py", line 763, in 
> _get_patch_stream
>     mode = os.fstat(sys.stdin.fileno()).st_mode
>                     ~~~~~~~~~~~~~~~~^^
> ValueError: I/O operation on closed file
> 
> ----------------------------------------------------------------------
> Ran 55 tests in 0.048s
> 
> FAILED (errors=5)

The full autokpgtest logs are available at:
https://ci.debian.net/experiments/8/regressions/
(please beware of pagination)

Common types of failure and suggested fixes are being documented at:
https://wiki.debian.org/ContinuousIntegration/LxcToIncus

Note that for the time being, ydiff is still being tested under lxc to
avoid disturbing its testing migration test results.

If you decide to add the `isolation-machine` restriction to get this package
tested under qemu, please mention that explicitly when closing this bug (it's
fine to do that only in the package changelog entry that closes the bug) so
that we can configure your package for qemu on ci.debian.net.

Attachment: signature.asc
Description: PGP signature

Reply via email to