From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0040.outbound.protection.outlook.com [104.47.37.40]) by dpdk.org (Postfix) with ESMTP id 6428A69A5 for ; Sun, 19 Mar 2017 14:38:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LOKpTbN7ReZml38J2YUHtFow0TOCi/bGx/bLAB7cj7s=; b=PergfER+a+3ZKEQh+Oikka2PKWFvt2LQCHSiU+XON8im+UtoX2YbKW+4r3FmtmCkq2aMkL+J2W+FxhYpj06bCQ11BgPhrV2ZXpoAZ7g7aoc0zOLSY9F1ZyQPwd4YigVrXl4Eu3AFWVEgyfxQAlWa1tdR0Tv31DZGEyPXlNRTHG8= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (106.201.104.48) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Sun, 19 Mar 2017 13:38:11 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, harry.van.haaren@intel.com, Jerin Jacob Date: Sun, 19 Mar 2017 19:07:34 +0530 Message-Id: <1489930654-16827-3-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1489930654-16827-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1489930654-16827-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [106.201.104.48] X-ClientProxiedBy: BM1PR01CA0055.INDPRD01.PROD.OUTLOOK.COM (10.163.199.27) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: 669b413a-a2a5-49fc-49f1-08d46ecd3120 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:6YqcC7d3HodIfMEA1HgvpjHFP90ckkBzBD3UKHZy23ocCtjWZPPp3mRjfssx+yvkeacbu/yYlJoe9EwJKIGETDx7mOkn70g/QqKCM8z+2XGnCK5FKeUu28Xc4bXjJ6ycV0Inu2kw2B7pP4R7FTfxUEZE4tGSg0se6s0Mgf37ktDdh0QyHnAczJq/xzFzKcOx0M+RjHREn1DtepFSKNgPxB7mAP/xPW9AQqLzjon3+UzhJ+1u248ri2n/g922+pBhUzr4lIVdFb84feWXcO9Lvw==; 25:h0g9i4veJ582BozqYKxgbjlHS/nzB5uuVPJMtFwKJm7Htp4Ym7lIE4KBwIOJ80/yzOX2UNqDj6JNATjWM714ikH3LDRvEBQ7pg77zVG09Sadej+a0uqJEko/03RgBH3Ta6TIc7DEGvVHuyKaXV9ftzP83XOck89aRRwQQ578rr2GX3G1AV848kI2o5vs/q8FkddLNIU2FRK4v63AIh/qzJvsswFRnetvxGz6fpxmIE4IFpFp2Tf/W7J1ZUzwWKfqNYZ8Um6UI5NH2Iuk0WsXxMsD4w3Ahl3zDawsYbGExapsUDVwlQkhPHOcU/qIQ3Z36wh6QLdairiAO0jWvV5mima91fxz4Gtaqs6BpI+rjzOzhRtJee0Ma7Z4MbJAckTXJyCGuRS2/iV4QGqHYZXZ3egSh9/7ZoBJYnLRSIkEPexzz/lF/XIc3Qh7exyMz02AoFzF9RIT3tOTtyyBLLM7PQ== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:w/s/RHADpJ+VIvevcZsMf1tUJTXHfnzsscp++uHUGROluWqz0fVJcLzje5CZ053Xs6uOq8oop275p+CAJLI5E/zI8XhZl/BfhS5g+Du++/mvkwsK20jswEtmyYzgOnhCWzKfKbcS9Cnd1gd/qwAARBHevkJaBl5fSCihNZjnd4BJma5IZontQ3ZXWF48W9zE1LyBpeNjudLSo4hJBoY9ZNM+JdT86HN2axsVHl6x4utFtcIglkPM4w5QUr1/eGzg; 20:2j4AK5grBV6e/lldb3KHt9+aL34xYtg3CtnEkC+zbcxO3OqyuShxXxZr66QwxaZCgwyyCdy/S6RWiHTOGOJlF0rtrSERkbV1fCIjIC8UE3aVRKzazBm9Qieikoxj0ub7SR0rYpEDykIxShKYCzmwvvQ1DSGdWyYaofbLDeTjgsTmaU5j/71Iftpe1juadIbzLNXJh7TqOaUYS10j9tlFbfV8qdhuo+x/hSsutIguxxuoXxi9lMQi1PWolP2N4FUj0q4CP30/+8Z6maz49co9Wc2QL667opRKMIanpn01WWeG42r9R10HFvFgMdPQpnKowEV/nLDROyJHH0lmJxnl2Ypu9cwD5WRgx2CZdCpwMjRp5zpg217znUhU8hR5bwpFF+U/4t8GmLcQp78oOxB2QdpMouq2pft48fF86p+WNmQkHrwA4AmfMQrhlYoICYyRVTkFG9E+IAv/y07NsRAR4IFcTdjD8nRi0G2W+eAPbPkRFPx4X+FPp2/7G3R/4l9/sGavHSprEL8RLcouvtbBXpZZug19MXy6W9Wzg4hHtC+Pb6rKW7sFKKdjf+G+6cdMSzpQ/UYzOzkby2Nj6Y17GSsLIoUL/6nM+9PST+S53vo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(20161123558025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:S2CDnCPZodnxCFs1mBV06glNfdamdRQU+kn9pz+Cy9+xB+UjImT1uZ3bAoGR8f88OXNv4YXeqvYCuRMJvvLxKQccYk9nvhNyU4301e98NFIuaTl4m8yZtNSHaP+nwsySKAYLkuOLDlUoRbdwwosb8SER1UlgsWYvXY8TsD7Xk1miYMv1boONw6GSrTEi+6KCqtg5RvLYaJ/0ZUnVYvuPWX7AxLDKLw4WgLmvBjO6OhfLGuEF4OhLJztzhruGqda0t3FtNB5EUBUS1zYRk9zGPi6wkvtl9nLN/hqZRbz4U1f6w7nP64m6Rh66aHfoVMqoIIimWm5KKTkswTYP+OSOj/Ah9fWY6hDPq6pekjKGmnpP2l6t9vdEJhjuuNGPYzs7jKt4HkCjzjgziOzISwTk3Eqme844MiaenS6u8JBLHtgTqj9RFtWN96jGt8Fv9cWCExf7ViTpNuJzP09DIDCAZ+SUXxuA4Zz07A0Kg3t5OE1OFVEIAsucqIob597obM3xufnzVW7JiBq4Bu7NrflJ7TYOx8F/nA+9+jr9RVPOvTikfglu5sw4D2e0lNQhJDTn/9wJ40G8m2+tCOSLMG+jqhHA6MTHiqJq5JOOccCSfVI= X-Forefront-PRVS: 025100C802 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(39410400002)(39830400002)(39450400003)(7736002)(305945005)(6116002)(3846002)(50986999)(76176999)(5009440100003)(42186005)(36756003)(2361001)(33646002)(42882006)(6916009)(6666003)(2950100002)(66066001)(47776003)(2351001)(6506006)(5003940100001)(189998001)(50226002)(4326008)(8676002)(81166006)(53936002)(6512007)(5660300001)(25786008)(6486002)(110136004)(38730400002)(107886003)(2906002)(50466002)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:Bo4B2JvhxIBDL34I6XxF43PQsJgSBfGQGLPqZlT?= =?us-ascii?Q?bBpayLBxXEN9HswmmQsz4ijNjBF5cUwjxG3yUHuQCOgMEs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/76FySuFHbahsZPy1ywIXPKYaMqEk5Z7rm4z8Pfoq6Pg?= =?us-ascii?Q?spUMuY9zkuR79prCRQQsvOTHgckDv3zFQhcbWoTulX2Ltf0GRU4UKkxIwEj7?= =?us-ascii?Q?V3Z8PNC0=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 6:xIWoNb8UYOgv+er1h7TbiIEVByzVDeN2q3kWd9FZpEd+Zo4YH+2Ges7XgQxKPgI2SFs18yt2M2O6vjmEj7rMV+kTv8H+EJWj4jKqsmDlwuLnVA5sekMIkyWpqtUgNYMunWyvoun6RQhFtrdILV4x8J5tbCc9AT+B/l0flSVHWZl+7UhsQXwv6Z0m3uB4zsr3eXc4Svoh/4mJDcpY4pq6QD7vvDKPD5IXclYStpcGMbOK6gSAi/+EkgodiAOsa8aFaeXyQNc3niDoGJirJJksNVzoax/njcybPV/LQJy4H7kPfAn/se81GlsVgiuPSZ+fSkDfU5PvxgglsQkWq8pT9GmOMMJXnu8s92D2Dh7No2mc0O1TJBFtyi6fhHFbttv3zqjMPJ3rhFajMeFBIPjCHQ==; 5:YtQw0mDTScN9uSV+gzhkIEEAY/sCgfoj0zVfBs/6LRrQKg3LR7YOCgGLecibNJCACUZm69Qy/RDihtvpDK93Hen79B3JZKKDZPwOmsINhkTBINMjy4bLxSD4+vnva5tNIftgAL9TvEo27OKG3+OEkA==; 24:NgJVRmeJGGvJnocE15vm1nQ+78v0JvcTScB93lhWQ9rE8HbehKHVeA/iXT2D7sKadZqyR+KRtooATNuP57Q1QYn9SCaU91lMkzI54cyYC+0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:y8/Xbl3YAqCKYgKimnz0LJdfpDCpZsUcY5IRs7gcF4vQpT9kOW3hEUvBzzFkGBl+5ankY/k4FsDVz4uuqDo1tYF2QsCyTYcrrFiFbf3uv6PBILTRHmtlXmJRX3CvLUb7S4gx2fgtPtiLPhFZHsEgRyxuX5if3XSTwfRLYACvwH4r+OvZbOa6eIfCrol/RNnsqCAy3ICoRoIYAPjCq/hUUYGD1vQZAaLH1PQVouoLEdfEOM3Bq07JoMvsoHCqaznUGiKgF82Z5/ed78yEyf0zMd9r8C7poklMZEZdSLU2PGPnZ5SDkcvGcyVoEyPkDqLgyciBJoYF02YChP97ErXYzg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2017 13:38:11.9788 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 2/2] test: add a new unit test case status X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Mar 2017 13:38:17 -0000 Add a new unit test case status called "unsupported". This is useful in marking a test case "unsupported" if testcase returns -ENOTSUP at runtime. Signed-off-by: Jerin Jacob --- test/test/test.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/test/test.c b/test/test/test.c index a86dc86..c561eb5 100644 --- a/test/test/test.c +++ b/test/test/test.c @@ -157,7 +157,8 @@ int unit_test_suite_runner(struct unit_test_suite *suite) { int test_success; - unsigned total = 0, executed = 0, skipped = 0, succeeded = 0, failed = 0; + unsigned int total = 0, executed = 0, skipped = 0; + unsigned int succeeded = 0, failed = 0, unsupported = 0; const char *status; if (suite->suite_name) { @@ -191,8 +192,12 @@ unit_test_suite_runner(struct unit_test_suite *suite) test_success = suite->unit_test_cases[total].testcase(); if (test_success == TEST_SUCCESS) succeeded++; + else if (test_success == -ENOTSUP) + unsupported++; else failed++; + } else if (test_success == -ENOTSUP) { + unsupported++; } else { failed++; } @@ -203,6 +208,8 @@ unit_test_suite_runner(struct unit_test_suite *suite) if (test_success == TEST_SUCCESS) status = "succeeded"; + else if (test_success == -ENOTSUP) + status = "unsupported"; else status = "failed"; @@ -224,6 +231,7 @@ unit_test_suite_runner(struct unit_test_suite *suite) printf(" + Tests Total : %2d\n", total); printf(" + Tests Skipped : %2d\n", skipped); printf(" + Tests Executed : %2d\n", executed); + printf(" + Tests Unsupported: %2d\n", unsupported); printf(" + Tests Passed : %2d\n", succeeded); printf(" + Tests Failed : %2d\n", failed); printf(" + ------------------------------------------------------- +\n"); -- 2.5.5