execltp: fix two minor issues
Hi,
Please consider the following 2 patches that fix two issues that I found when I tried to run execltp.
[PATCH 1/2] execltp: fix scenario_group naming
[PATCH 2/2] execltp: add rstrip to runtest_file
Thanks,
Daniel
PATCH 1/2 execltp: fix scenario_group naming
Commit 9d5dac6 modified the folder name "scenario-groups" to "scenario_groups" but it seems it missed changing it on the execltp script as well.
--- execltp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
execltp.in +1 -1
@@ -307,7 +307,7 @@ def main(): if len(args) == 0: # Default to scenarios also used by runltp. - fd = open(os.path.join(ltpdir, 'scenario-groups/default'), 'r') + fd = open(os.path.join(ltpdir, 'scenario_groups/default'), 'r') try: args = fd.readlines() finally:
Signature · 1 line
2.1.4
PATCH 1/2 execltp: fix scenario_group naming
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 2/2 execltp: add rstrip to runtest_file
In reply to Daniel SangorrinWithout an rstrip I was getting errors saying that the runtest file syscalls didn't exist.
--- execltp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
execltp.in +1 -1
@@ -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() if not opts.postprocess_only:
Signature · 1 line
2.1.4
PATCH 2/2 execltp: add rstrip to runtest_file
Hi!
Quoted 13 lines
Without an rstrip I was getting errors saying that the runtest file syscalls didn't exist.
Signed-off-by Daniel Sangorrin <[email protected]>--- execltp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)execltp.in +0
-0
execltp.in def main(): · line 364
Quoted 5 lines
execltp.in +1
-1@@ -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:
execltp.in +1 -1
@@ -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()
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 2/2 execltp: add rstrip to runtest_file
Hi Cyril,
Quoted 38 lines
-----Original Message-----
From: Cyril Hrubis [mailto:[email protected]]
Sent: Friday, January 05, 2018 12:45 AM
To: Daniel Sangorrin
Cc: [email protected]
Subject: Re: [LTP] [PATCH 2/2] execltp: add rstrip toruntest_fileHi!
Quoted 13 lines
Without an rstrip I was getting errors saying that the runtest file syscalls didn't exist.
Signed-off-by Daniel Sangorrin <[email protected]>--- execltp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)execltp.in +0
-0execltp.in def main(): · line 364
Quoted 5 lines
execltp.in +1
-1@@ -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:
execltp.in +0
-0
execltp.in def main(): · line 315
Quoted 8 lines
execltp.in +1
-1@@ -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()
Sorry for the late reply.
I tested your suggestion and it worked great.
Thanks,
Daniel
PATCH 2/2 execltp: add rstrip to runtest_file
Hi!
Quoted 2 lines
Sorry for the late reply.
I tested your suggestion and it worked great.
Pushed, thanks for the report and testing.
Signature · 2 lines
Cyril Hrubis [email protected]