From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1F80A3B5 for ; Mon, 20 Mar 2017 10:58:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490003929; x=1521539929; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=HQaCpJwDMMFM5WugWZIafWdjgGaYyCHv3ffIZW1ZRuc=; b=w6FvyNs2o8tisiemeH/w2ipDWH7MBTXTNa+jIxEM3U+svHTBUZFVCI85 X5x4mu19ZgPz6csBYcOKhDEArwSaug==; Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2017 02:58:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,193,1486454400"; d="scan'208";a="77281064" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga005.jf.intel.com with ESMTP; 20 Mar 2017 02:58:46 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.230]) by irsmsx110.ger.corp.intel.com ([169.254.15.101]) with mapi id 14.03.0248.002; Mon, 20 Mar 2017 09:58:46 +0000 From: "Van Haaren, Harry" To: Jerin Jacob , "dev@dpdk.org" CC: "thomas.monjalon@6wind.com" Thread-Topic: [dpdk-dev] [PATCH 2/2] test: add a new unit test case status Thread-Index: AQHSoLYbGAOgKDjQUEOjq2RTiBKbwaGdf4QQ Date: Mon, 20 Mar 2017 09:58:45 +0000 Message-ID: References: <1489930654-16827-1-git-send-email-jerin.jacob@caviumnetworks.com> <1489930654-16827-3-git-send-email-jerin.jacob@caviumnetworks.com> In-Reply-To: <1489930654-16827-3-git-send-email-jerin.jacob@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmRmMjMxZGUtNjQyOS00NjQxLWJiNDItMjAxZmJkNjFkOGFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InZiNzllUGYxOXo0S0FIcDlwck5Ld0VjT0RRbVRYblVGN0xaXC85Ulk4cHFrPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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: Mon, 20 Mar 2017 09:58:49 -0000 > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Sunday, March 19, 2017 1:38 PM > To: dev@dpdk.org > Cc: thomas.monjalon@6wind.com; Van Haaren, Harry ; Jerin > Jacob > Subject: [dpdk-dev] [PATCH 2/2] test: add a new unit test case status >=20 > Add a new unit test case status called "unsupported". > This is useful in marking a test case "unsupported" if testcase > returns -ENOTSUP at runtime. >=20 > Signed-off-by: Jerin Jacob Same test/test/test.c instead of app/test/test.c issue as patch 1/2,= but apart from that Acked-by: Harry van Haaren > --- > test/test/test.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) >=20 > 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 =3D 0, executed =3D 0, skipped =3D 0, succeeded =3D 0, f= ailed =3D 0; > + unsigned int total =3D 0, executed =3D 0, skipped =3D 0; > + unsigned int succeeded =3D 0, failed =3D 0, unsupported =3D 0; > const char *status; >=20 > if (suite->suite_name) { > @@ -191,8 +192,12 @@ unit_test_suite_runner(struct unit_test_suite *suite= ) > test_success =3D suite->unit_test_cases[total].testcase(); > if (test_success =3D=3D TEST_SUCCESS) > succeeded++; > + else if (test_success =3D=3D -ENOTSUP) > + unsupported++; > else > failed++; > + } else if (test_success =3D=3D -ENOTSUP) { > + unsupported++; > } else { > failed++; > } > @@ -203,6 +208,8 @@ unit_test_suite_runner(struct unit_test_suite *suite) >=20 > if (test_success =3D=3D TEST_SUCCESS) > status =3D "succeeded"; > + else if (test_success =3D=3D -ENOTSUP) > + status =3D "unsupported"; > else > status =3D "failed"; >=20 > @@ -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