All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
Cc: outreachy@lists.linux.dev
Subject: Re: [PATCH 0/4] enable passing multiple collections/tests to suboptions
Date: Mon, 18 Apr 2022 12:29:17 +0200	[thread overview]
Message-ID: <20220418122917.27fa1955@elisabeth> (raw)
In-Reply-To: <cover.1650215918.git.sevinj.aghayeva@gmail.com>

On Sun, 17 Apr 2022 13:27:17 -0400
Sevinj Aghayeva <sevinj.aghayeva@gmail.com> wrote:

> Enable mbuto's -C and -T options accept multiple collection names and test
> names, similar to the -c and -t options of run_kselftest.sh.

Thanks, this looks rather complete now. I just started reviewing the
series and I plan to finish reviewing/testing later today or early
tomorrow as I'm adding this kind of usage to demos and documentation
(also in progress).

Two smaller things I think we're missing:

- your patch 2/4 reverts the fix for "mbuto -h" with no fakeroot
  available (sorry, commit message of 6199e368 wasn't exceedingly
  clear). If fakeroot is not there, you don't even get a help message.

  Perhaps we could handle that as special case (in a second revision of
  patch 2, or as another patch), something on the lines of:

	if ! FAKEROOT="$(command -v fakeroot)"; then
		__missing_fakeroot=1
	fi

	...

	# after parsing options, and displaying usage if needed
	if [ ${__missing_fakeroot} -eq 1 ]; then
		err "Not root and no fakeroot available, exiting"
	fi

- with the 'kvm/qemu-kvm ... -initrd $(mbuto) ...' usage, we leave the
  image we built around. It could be deleted as soon as qemu is done
  reading it. I have two ideas (more welcome of course):

  1. use inotifywait(1) if available, use it (in a subshell) to watch
     for the IN_CLOSE_NOWRITE event on the file, then delete it after
     the event and close the subshell. If it's not available,
     'sleep 60' (perhaps with a warning) looks reasonable

  2. or check the parent PID from mbuto, once it terminates, delete the
     file and exit the subshell. I think it's more portable, but it
     might require some tricks (I haven't tried at all) to keep the
     subshell alive as long as it's needed

  ...in both cases, deletion should be configurable, I guess enabled by
  default if and only if we're running from a non-interactive
  context, that is, '$(mbuto)' as opposed to 'mbuto' on a command line.
  Check with [ ! -t 0 ]: if stdin (file descriptor 0) is not open, the
  user didn't start mbuto directly.

-- 
Stefano


  reply	other threads:[~2022-04-18 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-17 17:27 [PATCH 0/4] enable passing multiple collections/tests to suboptions Sevinj Aghayeva
2022-04-18 10:29 ` Stefano Brivio [this message]
2022-04-18 15:57   ` Sevinj Aghayeva

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=20220418122917.27fa1955@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=outreachy@lists.linux.dev \
    --cc=sevinj.aghayeva@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.