public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 4/5] tst_test.sh: Cleanup getopts usage
Date: Tue, 10 May 2022 07:23:29 +0200	[thread overview]
Message-ID: <Ynn20aeavm2pvA3M@pevik> (raw)
In-Reply-To: <Ynkftw55rbyVFXb0@yuki>

> Hi!
> > >> +. netns_helper.sh
> > >> +
> > >> +PROG=$1
> > >> +IP_VER=$2
> > >> +COM_TYPE=$3

> > > Can't we just keep these at the top along with the rest of the
> > > variables? I do not see them redefined anywhere but maybe I miss
> > > something.

> > tst_test.sh has to process command line arguments before these variables
> > can be set. Otherwise you'd have to put all command line switches
> > *AFTER* the positional arguments.

> I did sleep on this and I guess that the cleanest solution for this is
> to pass the positional arguments to the test setup function instead.
> What do you think?

Sure. That's what I already did in "[v2,3/3] netns: Rewrite to use tst_net.sh"
[1]. That's why I didn't care in this patchset. I plan to send rebased "shell:
Fixes for disabled IPv6" patchset today or tomorrow.

Kind regards,
Petr

[1] https://patchwork.ozlabs.org/project/ltp/patch/20220204194648.32165-4-pvorel@suse.cz/

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-05-10  5:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 12:49 [LTP] [PATCH v3 0/5] shell: Cleanup getopts usage Petr Vorel
2022-04-27 12:49 ` [LTP] [PATCH v3 1/5] busy_poll_lib.sh: Mention setup/cleanup defined in tests Petr Vorel
2022-04-27 14:00   ` Martin Doucha
2022-04-28  6:45     ` Petr Vorel
2022-04-28  7:31     ` Petr Vorel
2022-04-27 12:50 ` [LTP] [PATCH v3 2/5] shell: Use conditional expansion for library setup/cleanup Petr Vorel
2022-05-06 11:55   ` Cyril Hrubis
2022-04-27 12:50 ` [LTP] [PATCH v3 3/5] doc: Update library API doc Petr Vorel
2022-05-06 11:57   ` Cyril Hrubis
2022-05-06 15:01     ` Petr Vorel
2022-04-27 12:50 ` [LTP] [PATCH v3 4/5] tst_test.sh: Cleanup getopts usage Petr Vorel
2022-05-06 14:44   ` Cyril Hrubis
2022-05-06 14:55     ` Martin Doucha
2022-05-06 15:01       ` Cyril Hrubis
2022-05-06 16:59         ` Petr Vorel
2022-05-09 14:05       ` Cyril Hrubis
2022-05-10  5:23         ` Petr Vorel [this message]
2022-05-06 16:30     ` Petr Vorel
2022-04-27 12:50 ` [LTP] [PATCH v3 5/5] doc: Update shell API examples Petr Vorel
2022-05-06 14:55   ` Cyril Hrubis

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=Ynn20aeavm2pvA3M@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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