From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] skipfile: allow regular expressions
Date: Wed, 7 Feb 2018 16:32:09 +0100 [thread overview]
Message-ID: <20180207153209.GC31084@rei> (raw)
In-Reply-To: <008001d3999a$1e8a26a0$5b9e73e0$@toshiba.co.jp>
Hi!
> Sorry for the delay. I found that my patch had a flaw while testing it on runltplite.sh.
> For example, "rwtest.*" doesn't work for rwtest:
> rwtest01 export LTPROOT; rwtest -N rwtest01 -c -q -i 60s -f sync ..
>
> The reason is that "rwtest.*" matches too much. If I use "rwtest[a-zA-Z0-9]" as a regex on the skipfile
> then it works as expected
>
> Example:
> $ STRING="rwtest01 export LTPROOT; rwtest -N rwtest01 -c -q -i 60s -f"
> $ sed "s/^\(rwtest.*\)\s.*/\1 exit 32;/" <<< $STRING
> rwtest01 export LTPROOT; rwtest -N rwtest01 -c -q -i 60s -f exit 32 (BAD!!)
> $ sed "s/^\(rwtest[a-zA-Z0-9]*\)\s.*/\1 exit 32;/" <<< $STRING
> rwtest01 exit 32 (GOOD!!)
Ah looks like your first attempt ends up eating the source greadily
so \1 ends up being everything to the last whitespace.
I guess that s/^\(rwtest[\S]*\).*/\1 exit 32;/ should work, since it
will stop at first whitespace.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2018-02-07 15:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 8:01 [LTP] [PATCH v2] skipfile: allow regular expressions Daniel Sangorrin
2018-01-22 15:19 ` Cyril Hrubis
2018-01-30 7:15 ` Daniel Sangorrin
2018-02-07 15:32 ` Cyril Hrubis [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=20180207153209.GC31084@rei \
--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.