From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id BDF782B86 for ; Tue, 19 Jul 2016 18:53:58 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id i5so33940843wmg.0 for ; Tue, 19 Jul 2016 09:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=ObaVPfYLrITbDhnaFYqnulrBDsNL+lU1L3dU+F9lVE8=; b=1tDrXuKy/Mr8z9Un75x0ZurYyFopAflbOf9xpDs3DpSlLynNhgcyyOO99MdIVhAtxu Q3l3QFgN7YzaQKfECLhiWen1lFlmLp8kDdEss7qSH2655ubId4oQPgcvQlWs+9yb1Sfu hSl2KzKOFAbgVdktkTlZHQjxW3e93vSHy3UZ0d1mGM9l3aJtdv1NL/reEyP+ZzJHgh5P VPBYVTQY8eMdlR1ZmZVVDhfeeC3ECcXBnn978M3gIzd/PBUFEfQNXbPxrdXQ9C+01mph I/pRlMNnsl1o5FZyGHAANXWKm+SHhh0Qpns3kG6Zvl/DAcUdTpazdN3Ji/Vmj5vSuuLq K+6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=ObaVPfYLrITbDhnaFYqnulrBDsNL+lU1L3dU+F9lVE8=; b=O4j/r204N8INRCuYf2UaAatELUzA/dVB6sUnN1h7zocvGNsxuy5RVEqnQI9yoIVPe9 LM5J0gGM3eOs8lFzm48L8XGNrNKP+uOD6NI5aA/nv4J/qFqW9YyCs2sgWOSNlJWVGc0O qm1bCuv8wV3Y1fY7bgxq/zAlM6P9m+2ranfUyxM+lV3frVrgxbDWDkA2ZaRxskK/mAQu ykTIm2awa5a+iz4cEfLq5aFpbRkP/xWWoSYuiSCwH2z/eX2LQmnpVEjR12x+98LWwKHl hzut06uJIchh7+V5vKdArdf1nl98lE5LGnIytmAJQeR0utvwHUuTiAFqC7RImQy3SIiv SnPA== X-Gm-Message-State: ALyK8tKyJZ8Qy3W+2oPJF4u/JaDF6FMF2XwjmjXvB+SCSZ2EoeD30/WZ8HJ2+iw7GAXOu5ER X-Received: by 10.28.58.7 with SMTP id h7mr5415297wma.35.1468947238137; Tue, 19 Jul 2016 09:53:58 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id b130sm24337097wmg.3.2016.07.19.09.53.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jul 2016 09:53:57 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Tue, 19 Jul 2016 18:53:50 +0200 Message-Id: <1468947230-22874-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] app/test: disable filtering with stripped binary X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2016 16:53:58 -0000 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 --- 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