From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 131F71B1BC for ; Wed, 24 Jan 2018 16:41:19 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BB6FC22708; Wed, 24 Jan 2018 10:41:18 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:41:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=U82HS0zXEnMPEZohM gEOCLfdRydBzL1w6ntmoYKVaO0=; b=g4HOXbweFEVsdp1f09AzkWhbsJdf46+IL pzgDfYR0Arl5jH2BnEEbHmmyJUBfWjkdaDofh3Z06IVTIftiZpNgswa3PfAz4sOC LVWEccLWqmBLs4rE2BHA13H1PveE4kXvRVLqb8NZoJsTSL7/qDyNoXLuffRn+lbT VcUwkgcZNChapKhUkOXjY6wS/LDeFzqdYzN2t5mi4qm0KDklx50wR9p1ZlTlvmGE qQNFkrIG4DWgvTou+6POa15JJDChnuq0fhFyTwUrQUiT5RClTd1uyCxv67lW1Z5Y D7V37H4MewmQ/KvUCGiuMvJ0VqzuS+hlj5glqN398S3Ovg+h3m/Rw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=U82HS0zXEnMPEZohMgEOCLfdRydBzL1w6ntmoYKVaO0=; b=lxUFN9xt 6Mcq4bcr1PwJX1FbNUzCF6uVX3nyEJLXq8Dzqgf6phhck0IxnjBorXEzjSk63SCR lBEQHhoRWufbVkC4GyDjmoVXnyzFCdijKQFieCDc7hP5jFxu+akxv81iBMHJIB3n TkiC0YwLe3cH1XZ4gOXdPGnONgvxbhERI9dlL6nJXtxEBSAifqLIx9gbGexRmK7d cIq+uoQwvgmOVOD4SWRnVLYGyGcNmELF4fDVxPlIai1LbITYSXsHu6ox2RSMMD2h yNYSZKpanISw1VB7JUTArLb3jfZaiwkI/hG4f3bX6p8y74Mswx5P+nDyOcmOAu9g 2ww50jKJyWTNNw== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 9C68A7E69D; Wed, 24 Jan 2018 10:41:16 -0500 (EST) From: Yuanhan Liu To: Anatoly Burakov Cc: Declan Doherty , dpdk stable Date: Wed, 24 Jan 2018 23:33:09 +0800 Message-Id: <1516808026-25523-121-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'test: register test as failed if setup failed' has been queued to LTS release 17.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 15:41:19 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From b8dd6a1e2f3fcb59195a570461fc90013e752285 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Fri, 22 Dec 2017 10:21:51 +0000 Subject: [PATCH] test: register test as failed if setup failed [ upstream commit 69a95070111f37fb1c7d7ee11956aff2865f6c11 ] If test set up couldn't be completed, the test was previously shown as succeeding, even though setup failed. Fix this to report test as failed, and count all tests that should've been executed, as failed as well. Fixes: ffac67b1f71b ("app/test: new assert macros and test suite runner") Signed-off-by: Anatoly Burakov Acked-by: Declan Doherty --- test/test/test.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/test/test.c b/test/test/test.c index 0e6ff7c..fe41d40 100644 --- a/test/test/test.c +++ b/test/test/test.c @@ -162,8 +162,20 @@ unit_test_suite_runner(struct unit_test_suite *suite) } if (suite->setup) - if (suite->setup() != 0) + if (suite->setup() != 0) { + /* + * setup failed, so count all enabled tests and mark + * them as failed + */ + while (suite->unit_test_cases[total].testcase) { + if (!suite->unit_test_cases[total].enabled) + skipped++; + else + failed++; + total++; + } goto suite_summary; + } printf(" + ------------------------------------------------------- +\n"); -- 2.7.4