* [PATCH 0/4] enable passing multiple collections/tests to suboptions @ 2022-04-17 17:27 Sevinj Aghayeva 2022-04-18 10:29 ` Stefano Brivio 0 siblings, 1 reply; 3+ messages in thread From: Sevinj Aghayeva @ 2022-04-17 17:27 UTC (permalink / raw) To: sbrivio; +Cc: outreachy, Sevinj Aghayeva 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. Sevinj Aghayeva (4): mbuto: fix the help error message mbuto: undo commit 6199e368 mbuto: quote variables when calling eval mbuto: enable passing multiple collections and tests to suboptions mbuto | 71 ++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 28 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 0/4] enable passing multiple collections/tests to suboptions 2022-04-17 17:27 [PATCH 0/4] enable passing multiple collections/tests to suboptions Sevinj Aghayeva @ 2022-04-18 10:29 ` Stefano Brivio 2022-04-18 15:57 ` Sevinj Aghayeva 0 siblings, 1 reply; 3+ messages in thread From: Stefano Brivio @ 2022-04-18 10:29 UTC (permalink / raw) To: Sevinj Aghayeva; +Cc: outreachy 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 0/4] enable passing multiple collections/tests to suboptions 2022-04-18 10:29 ` Stefano Brivio @ 2022-04-18 15:57 ` Sevinj Aghayeva 0 siblings, 0 replies; 3+ messages in thread From: Sevinj Aghayeva @ 2022-04-18 15:57 UTC (permalink / raw) To: Stefano Brivio; +Cc: outreachy linux kernel On Mon, Apr 18, 2022 at 6:29 AM Stefano Brivio <sbrivio@redhat.com> wrote: > > 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 Sounds good. Just sent a patch to do this. > > - 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. I'll need to experiment with that to see what works. I'll ping you in IRC. Thanks! > > -- > Stefano > -- Sevinj.Aghayeva ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-18 15:57 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-04-17 17:27 [PATCH 0/4] enable passing multiple collections/tests to suboptions Sevinj Aghayeva 2022-04-18 10:29 ` Stefano Brivio 2022-04-18 15:57 ` Sevinj Aghayeva
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.