Subject: bug#79056: tab-bar-tests-quit-restore-window sometimes fails in *compilation* buffer

From: Juri Linkov <[email-masked]>
Date: Sun, 20 Jul 2025 09:56:41 +0300

> This is a timing related bug. To try to reproduce it on Ubuntu 25.04
> x86-64, I start up Emacs, then build Emacs from master (commit
> 291cd2d3419c7be20200db3f0ee5936661ab79f2), then cd to the test
> subdirectory, then run:
>
> M-x compile RET make check LOGFILES=lisp/tab-bar-tests.log RET
>
> Sometimes it works, although it outputs a stray
> "^[[H^[[J^[[H^[[J^[[H^[[J^[[H^[[J" string (sans trailing newline) to
> stdout, where "^[" stands for ESC. This string is a minor bug in the test:
> it shouldn't output junk to stdout.
>
> Sometimes it fails, resulting in the following *compilation* buffer, where
> "^[" again represents an ESC character.
>
> The test always seems to work if I run it in a *shell* window, so
> apparently it has something with whether Emacs has a controlling tty, or
> something like that.

Maybe tuning frame parameters would help here:

  (let* ((frame-params (when noninteractive
                         '((window-system . nil)
                           (tty-type . "linux"))))

I tried different tty-type values such as "ansi", "dumb", "vt100", "xterm"
with different effects.