linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <linux@treblig.org>
To: Kees Cook <kees@kernel.org>
Cc: Sabyrzhan Tasbolatov <snovitoll@gmail.com>,
	Sasha Levin <sashal@kernel.org>,
	workflows@vger.kernel.org, linux-doc@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	rostedt@goodmis.org, konstantin@linuxfoundation.org,
	corbet@lwn.net, josh@joshtriplett.org
Subject: Re: [RFC 0/2] Add AI coding assistant configuration to Linux kernel
Date: Sun, 27 Jul 2025 15:45:42 +0000	[thread overview]
Message-ID: <aIZJppabYBCDBhYJ@gallifrey> (raw)
In-Reply-To: <053939E0-5BAB-483A-9FE4-92BF35201A4C@kernel.org>

* Kees Cook (kees@kernel.org) wrote:
> 
> 
...

> I'm hoping to add runtime testing, but the hurdles for getting it to sanely interact with a qemu instance is tricky.

When doing qemu dev, I frequently run it in a tmux, and start it with
'-nographic' which gets you a single stream with both serial and monitor in it;
alternatively you can get one pane with the serial output and one with the
monitor, that takes a little more setup;

anyway, then I can do :

tmux -L $SESS send-keys -t srcqemu "cd /mnt" enter

and have a wait function that waits until a string is displayed:
# pane string command
function waitstr {
  PANE=$1
  STR=$2
  CMD="$3"
  until [ -n "$(tmux -L $SESS capture-pane -p -t $PANE | grep "$STR" )" ]; do
    $CMD
    sleep 1
  done;
}

so do:
waitstr srcqemu "root@localhost" "sleep 1"

it feels like it should be fairly easy to wrap some of those for tests.
(Beware the 'send-keys' command is a bit touchy about what strings it takes,
but it has some flags to help).

Dave


> -- 
> Kees Cook
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

  reply	other threads:[~2025-07-27 15:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-27  9:37 [RFC 0/2] Add AI coding assistant configuration to Linux kernel Sabyrzhan Tasbolatov
2025-07-27 15:23 ` Kees Cook
2025-07-27 15:45   ` Dr. David Alan Gilbert [this message]
2025-07-28  6:40     ` Kees Cook
2025-07-28 16:43       ` Sabyrzhan Tasbolatov
  -- strict thread matches above, loose matches on Subject: below --
2025-07-25 17:53 Sasha Levin
2025-07-25 18:41 ` Jakub Kicinski
2025-07-25 19:00   ` Steven Rostedt
2025-07-25 19:59     ` Jakub Kicinski
2025-07-25 20:32       ` Dr. David Alan Gilbert
2025-07-25 20:34       ` dan.j.williams
2025-07-25 22:28         ` Sasha Levin
2025-07-28 17:46         ` Steven Rostedt
2025-07-28 18:20           ` dan.j.williams
2025-07-28 22:12           ` Mauro Carvalho Chehab
2025-07-29  0:18             ` Mauro Carvalho Chehab
2025-07-25 21:03     ` Kees Cook
2025-07-28 15:57       ` dan.j.williams
2025-07-28 16:41         ` Kees Cook
2025-07-26  9:07 ` Mario Limonciello
2025-07-26 11:53   ` Sasha Levin
2025-07-26 16:36   ` Kees Cook
2025-07-28 16:49 ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aIZJppabYBCDBhYJ@gallifrey \
    --to=linux@treblig.org \
    --cc=corbet@lwn.net \
    --cc=josh@joshtriplett.org \
    --cc=kees@kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sashal@kernel.org \
    --cc=snovitoll@gmail.com \
    --cc=workflows@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).