From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] execltp: add rstrip to runtest_file
Date: Thu, 4 Jan 2018 16:45:27 +0100 [thread overview]
Message-ID: <20180104154527.GC25335@rei> (raw)
In-Reply-To: <1514181786-6677-3-git-send-email-daniel.sangorrin@toshiba.co.jp>
Hi!
> Without an rstrip I was getting errors saying that the
> runtest file syscalls didn't exist.
>
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> ---
> execltp.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/execltp.in b/execltp.in
> index 6d13ad1..2dcdf10 100755
> --- a/execltp.in
> +++ b/execltp.in
> @@ -361,7 +361,7 @@ def main():
>
> failed_subset = {}
>
> - runtest_file = os.path.join(opts.ltp_dir, 'runtest', testsuite)
> + runtest_file = os.path.join(opts.ltp_dir, 'runtest', testsuite).rstrip()
I suppose that the problem here is that the fd.readlines() does include
newlines at the end of the lines. But stripping it at the point we
construct the paths seems to be a bit confusing to me.
What about something as:
diff --git a/execltp.in b/execltp.in
index 6d13ad1d7..10b1f53f3 100755
--- a/execltp.in
+++ b/execltp.in
@@ -309,7 +309,7 @@ def main():
# Default to scenarios also used by runltp.
fd = open(os.path.join(ltpdir, 'scenario_groups/default'), 'r')
try:
- args = fd.readlines()
+ args = [l.strip() for l in fd.readlines()]
finally:
fd.close()
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2018-01-04 15:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-25 6:03 [LTP] execltp: fix two minor issues Daniel Sangorrin
2017-12-25 6:03 ` [LTP] [PATCH 1/2] execltp: fix scenario_group naming Daniel Sangorrin
2018-01-04 15:39 ` Cyril Hrubis
2017-12-25 6:03 ` [LTP] [PATCH 2/2] execltp: add rstrip to runtest_file Daniel Sangorrin
2018-01-04 15:45 ` Cyril Hrubis [this message]
2018-01-15 1:49 ` Daniel Sangorrin
2018-01-15 13:27 ` 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=20180104154527.GC25335@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox