All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] read_all_sys: skip debugfs
Date: Mon, 4 Nov 2019 17:09:52 +0100	[thread overview]
Message-ID: <20191104160951.GB5683@rei.lan> (raw)
In-Reply-To: <20191104155900.GA5683@rei.lan>

Hi!
> >  read_all_dev read_all -d /dev -p -q -r 10
> >  read_all_proc read_all -d /proc -q -r 10
> > -read_all_sys read_all -d /sys -q -r 10 -e /sys/power/wakeup_count
> > +read_all_sys read_all -d /sys -q -r 10 -e /sys/power/wakeup_count -e '/sys/kernel/debug/*'
> 
> Do we even support multiple parameters for the same option?
> 
> I looked that the library code and I would say that we will replace the
> value with each iteration which means that we will effectively use the
> last one.

Maybe we should even catch the case where user passed one option twice with:

diff --git a/lib/tst_test.c b/lib/tst_test.c
index c7b46d0d5..e1c841585 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -468,6 +468,9 @@ static void parse_topt(unsigned int topts_len, int opt, char *optarg)
        if (i >= topts_len)
                tst_brk(TBROK, "Invalid option '%c' (should not happen)", opt);
 
+       if (*(toptions[i].arg))
+               tst_brk(TBROK, "Option already set!");
+
        *(toptions[i].arg) = optarg ? optarg : "";
 }


-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2019-11-04 16:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 15:36 [LTP] [PATCH] read_all_sys: skip debugfs Jan Stancek
2019-11-04 15:59 ` Cyril Hrubis
2019-11-04 16:06   ` Jan Stancek
2019-11-04 16:10     ` Cyril Hrubis
2019-11-04 16:09   ` Cyril Hrubis [this message]
2019-11-04 17:13     ` Jan Stancek

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=20191104160951.GB5683@rei.lan \
    --to=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 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.