Hi!

On Sun, 2026-12-06 at 14:17 +0300, Michael Tokarev wrote:
> Package: golang-github-go-debos-fakemachine-dev
> Version: 0.0.13-3
> Severity: important
> 
> For example,
>  
> https://ci.debian.net/packages/g/golang-github-go-debos-fakemachine/testing/amd64/78784687/
>  --
> 
>  119s autopkgtest [12:16:00]: test run-command: [-----------------------
>  120s # using qemu backend
>  120s 1..3
>  120s Running env LC_ALL=C hello using qemu backend
>  197s [cHello, world!
>  199s [c[cok 1 - fakemachine hello exited successfully
>  199s Running env LC_ALL=C hello using qemu backend
>  199s ok 2 - fakemachine tried to run hello
>  199s not ok 3 - did not receive a friendly greeting
>  199s autopkgtest [12:17:20]: test run-command: -----------------------]
> 
> As it can be seen, the expected output is actually produced,
> but it has some unfiltered remnants of escape sequences, --
> note the [c prefixes.
> 
> Here's the actual output from fakemachine:
> 
> Running env LC_ALL=C hello using kvm backend
> ^[P+q6E616D65^[\^[[cHello, world!^M
> ^[P+q6E616D65^[\^[[c^[P+q6E616D65^[\^[[c
> 
> or, in hexdump -C output:
> 
> 00000000  52 75 6e 6e 69 6e 67 20  65 6e 76 20 4c 43 5f 41  |Running env LC_A|
> 00000010  4c 4c 3d 43 20 68 65 6c  6c 6f 20 75 73 69 6e 67  |LL=C hello using|
> 00000020  20 6b 76 6d 20 62 61 63  6b 65 6e 64 0a 1b 50 2b  | kvm backend..P+|
> 00000030  71 36 45 36 31 36 44 36  35 1b 5c 1b 5b 63 48 65  |q6E616D65.\.[cHe|
> 00000040  6c 6c 6f 2c 20 77 6f 72  6c 64 21 0d 0a 1b 50 2b  |llo, world!...P+|
> 00000050  71 36 45 36 31 36 44 36  35 1b 5c 1b 5b 63 1b 50  |q6E616D65.\.[c.P|
> 00000060  2b 71 36 45 36 31 36 44  36 35 1b 5c 1b 5b 63     |+q6E616D65.\.[c|
> 0000006f
> 
> On the terminal, this looks normal:
> 
> Running env LC_ALL=C hello using kvm backend
> Hello, world!
> 
> but when filtered in d/tests/run-command, it goes like this:
> 
>  ... | sed -u -e 's/\x1bP[^\x1b]*\x1b\\//g' | stdbuf -oL tr -d '\033\015'
> Running env LC_ALL=C hello using kvm backend
> [cHello, world!
> [c[c
> 
> and sure enough, the expected output is not found using anchored
> '^Hello, world!$' pattern.
> 
> Now, it's interesting why the thing started producing such escape
> sequences.  I dunno where they're coming from.  There should be
> nothing in the recent qemu uploads to affect this.
> 
> But it feels like the whole thing with filtering in the test is
> not correct.
> 
> This test currently prevents qemu from migrating to testing, and
> the affected version contains multiple security fixes.
> 
> I suggest to remove at least the beginning-of-line anchor in the
> test pattern.  Or get the escape sequences filtering correctly.

Actually, I did create
https://salsa.debian.org/go-team/packages/golang-github-go-debos-fakemachine/-/merge_requests/4
to improve the autopkgtest output filtering and recently reworked it. I
still think it needs more work, but I think it will do in the short term
to unblock things and allow the package to migrate.


Cheers!

Chris

Reply via email to