* [dpdk-dev] [PATCH] app/test: disable filtering with stripped binary
@ 2016-07-19 16:53 Thomas Monjalon
2016-07-21 9:07 ` Olivier Matz
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2016-07-19 16:53 UTC (permalink / raw)
To: dev
The unavailable tests are filtered out by autotest by looking for
the symbols in the binary:
PCI autotest: Skipped [Not Available] [00m 00s]
Malloc autotest: Success [00m 00s]
It results to skip everything if the binary has no symbol (stripped):
PCI autotest: Skipped [Not Available] [00m 00s]
Malloc autotest: Skipped [Not Available] [00m 00s]
This case is handled by getting back to the old behaviour if the binary
has no symbol information:
PCI autotest: Fail [Not found] [00m 00s]
Malloc autotest: Success [00m 00s]
Fixes: d553c8f2b1a2 ("app/test: filter out unavailable tests")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
app/test/autotest_runner.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py
index bd99e19..21d3be2 100644
--- a/app/test/autotest_runner.py
+++ b/app/test/autotest_runner.py
@@ -107,8 +107,10 @@ def run_test_group(cmdline, test_group):
# parse the binary for available test commands
binary = cmdline.split()[0]
- symbols = subprocess.check_output(['nm', binary]).decode('utf-8')
- avail_cmds = re.findall('test_register_(\w+)', symbols)
+ stripped = 'not stripped' not in subprocess.check_output(['file', binary])
+ if not stripped:
+ symbols = subprocess.check_output(['nm', binary]).decode('utf-8')
+ avail_cmds = re.findall('test_register_(\w+)', symbols)
# run all tests in test group
for test in test_group["Tests"]:
@@ -129,7 +131,7 @@ def run_test_group(cmdline, test_group):
print >>logfile, "\n%s %s\n" % ("-"*20, test["Name"])
# run test function associated with the test
- if test["Command"] in avail_cmds:
+ if stripped or test["Command"] in avail_cmds:
result = test["Func"](child, test["Command"])
else:
result = (0, "Skipped [Not Available]")
--
2.7.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] app/test: disable filtering with stripped binary
2016-07-19 16:53 [dpdk-dev] [PATCH] app/test: disable filtering with stripped binary Thomas Monjalon
@ 2016-07-21 9:07 ` Olivier Matz
2016-07-21 21:59 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Olivier Matz @ 2016-07-21 9:07 UTC (permalink / raw)
To: Thomas Monjalon, dev
On 07/19/2016 06:53 PM, Thomas Monjalon wrote:
> The unavailable tests are filtered out by autotest by looking for
> the symbols in the binary:
>
> PCI autotest: Skipped [Not Available] [00m 00s]
> Malloc autotest: Success [00m 00s]
>
> It results to skip everything if the binary has no symbol (stripped):
>
> PCI autotest: Skipped [Not Available] [00m 00s]
> Malloc autotest: Skipped [Not Available] [00m 00s]
>
> This case is handled by getting back to the old behaviour if the binary
> has no symbol information:
>
> PCI autotest: Fail [Not found] [00m 00s]
> Malloc autotest: Success [00m 00s]
>
> Fixes: d553c8f2b1a2 ("app/test: filter out unavailable tests")
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] app/test: disable filtering with stripped binary
2016-07-21 9:07 ` Olivier Matz
@ 2016-07-21 21:59 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-07-21 21:59 UTC (permalink / raw)
To: Olivier Matz; +Cc: dev
2016-07-21 11:07, Olivier Matz:
> On 07/19/2016 06:53 PM, Thomas Monjalon wrote:
> > The unavailable tests are filtered out by autotest by looking for
> > the symbols in the binary:
> >
> > PCI autotest: Skipped [Not Available] [00m 00s]
> > Malloc autotest: Success [00m 00s]
> >
> > It results to skip everything if the binary has no symbol (stripped):
> >
> > PCI autotest: Skipped [Not Available] [00m 00s]
> > Malloc autotest: Skipped [Not Available] [00m 00s]
> >
> > This case is handled by getting back to the old behaviour if the binary
> > has no symbol information:
> >
> > PCI autotest: Fail [Not found] [00m 00s]
> > Malloc autotest: Success [00m 00s]
> >
> > Fixes: d553c8f2b1a2 ("app/test: filter out unavailable tests")
> >
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
>
> Tested-by: Olivier Matz <olivier.matz@6wind.com>
Applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-21 21:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19 16:53 [dpdk-dev] [PATCH] app/test: disable filtering with stripped binary Thomas Monjalon
2016-07-21 9:07 ` Olivier Matz
2016-07-21 21:59 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).