(resend, gmail decided to switch to html email :\) David would know best. As you probably saw, this was added in 021ed9f551da ("kunit: Run all KUnit tests through allyesconfig"). This was specifically for running on UML, _not_ QEMU. I vaguely remember it being along the lines of #1, but not what the details were. On Fri, Nov 8, 2024 at 2:49 AM Brendan Jackman <jackmanb@xxxxxxxxxx> wrote: > > Hi all, > > Does anyone know what the 'stty sane' invocation in kunit.py is about? > > The other day I ran into an issue when running it via watchexec[1]. At > the time I believed that it was there to clean up after the firmware > that QEMU runs potentially messed up the terminal. > > However, I just realised I'm not sure if that makes sense - stty is > about setting terminal settings via ioctl. I don't think QEMU or its > guests are messing up the terminal with ioctls, they're just writing > funny control characters. > > What's going on here? I guess one of: > > 1. Terminal is messed up with ctrl chars but ioctls are the > easiest/only way to reliably clean it up. > > 2. Nobody thought about this unimportant detail so hard before and > there's no particular rationale in place here. > > 3. I made bad assumptions about why the `stty sane` is there. > > If it's 1 or 2 I wonder if there's an alternative way to clean up > without getting the SIGTTOU issue. > > Or, maybe it doesn't matter and the fact that this was ever a problem > is just a bug in watchexec (maybe you can tell I haven't actually > taken the time to research the SIGTTOU thing properly). But thought > I'd raise it in case this points to issues people might have using > kunit.py in CI. > > [1] https://github.com/watchexec/watchexec/issues/874 > [2] https://gist.github.com/bjackman/27fd9980d87c5556c20e67a6ed891500