mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Satoru Takeuchi <satoru.takeuchi@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ktest: restore tty settings after closing console
Date: Wed, 28 Jan 2015 09:15:06 -0600	[thread overview]
Message-ID: <20150128151506.GB26843@treble.redhat.com> (raw)
In-Reply-To: <20150128100831.18cdad60@gandalf.local.home>

On Wed, Jan 28, 2015 at 10:08:31AM -0500, Steven Rostedt wrote:
> On Wed, 28 Jan 2015 08:59:23 -0600
> Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> 
> > On Tue, Jan 27, 2015 at 05:01:29PM -0500, Steven Rostedt wrote:
> > > On Tue, 27 Jan 2015 12:10:04 -0600
> > > Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> > > 
> > > > When ktest runs the console program as a child process, the parent and
> > > > child share the same tty for stdin and stderr.  This is problematic when
> > > > using a libvirt target.  The "virsh console" program makes a lot of
> > > > changes to the tty settings, making ktest's output hard to read
> > > > (carriage returns don't work).  After ktest exits, the terminal is
> > > > unusable (CRs broken, stdin isn't echoed).
> > > > 
> > > > I think the best way to fix this issue would be to create a
> > > > pseudoterminal (pty pair) so the child process would have a dedicated
> > > > tty, and then use pipes to connect the two ttys.  I'm not sure if that's
> > > > overkill, but it's far beyond my current Perl abilities.
> > > 
> > > And beyond mine too. I tried to get that right a few times, and it
> > > never worked out. Maybe someone with more oyster skilz can fix this.
> > 
> > I decided to level up my oyster skilz.  I came up with this (to be
> > applied instead of the original patch).  It's working well for me.
> 
> I already applied your other patch. If there's any other work, please
> apply it on top. I in the process of testing other changes on top of
> this too. I'll be pushing it soon to my for-next linux-ktest.git tree,
> after I'm finished testing.
> 
> 
> > Right now, stdin isn't hooked up, so the user can't mess with the
> > console.  Is stdin needed?
> 
> Actually, I do. I found it's nice to move things along when the console
> shows grub or syslinux options, and I can hit enter and it continues.
> 
> It's not critical, but it's a freebee for me.

Ok, I'll add stdin for v2.

-- 
Josh

      reply	other threads:[~2015-01-28 20:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 18:10 Josh Poimboeuf
2015-01-27 22:01 ` Steven Rostedt
2015-01-28 14:59   ` Josh Poimboeuf
2015-01-28 15:08     ` Steven Rostedt
2015-01-28 15:15       ` Josh Poimboeuf [this message]

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=20150128151506.GB26843@treble.redhat.com \
    --to=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=satoru.takeuchi@gmail.com \
    /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

all inboxes | Powered by JetHome®