From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0052.outbound.protection.outlook.com [104.47.0.52]) by dpdk.org (Postfix) with ESMTP id 66A8C4CAB for ; Mon, 27 Aug 2018 16:41:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AESWzwrfrOxCkEs+TjfgtQf7s/r0QFGaQj30/eTnFaM=; b=Xbcb8vp4R93Z0KoQsJIeRGcNWrzSbFOk8nIri/xh0Lp4nP36UayE5QI67m5elnELI+m3Qw1Rb8kT2g3cUoV/ldoVsgdI5yNm5eBjxvDd2iRzW4e4u9gm2HD301HmD+3H55oFZ+rc3hhfsn7ugsX18plFIaWcy8dKZpl2w2KSrBE= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB3262.eurprd08.prod.outlook.com (52.134.30.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.15; Mon, 27 Aug 2018 14:41:11 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::184d:ac38:254f:3a45]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::184d:ac38:254f:3a45%2]) with mapi id 15.20.1080.015; Mon, 27 Aug 2018 14:41:11 +0000 From: Gavin Hu To: Dharmik Thakkar , Bruce Richardson , Pablo de Lara CC: "dev@dpdk.org" , Honnappa Nagarahalli , Dharmik Thakkar Thread-Topic: [dpdk-dev] [PATCH] test/hash: solve unit test hash compilation error Thread-Index: AQHUPhII+PW02vbr+Eyq/JWe6Vk5fKTTqsDg Date: Mon, 27 Aug 2018 14:41:10 +0000 Message-ID: References: <1535379969-19642-1-git-send-email-dharmik.thakkar@arm.com> In-Reply-To: <1535379969-19642-1-git-send-email-dharmik.thakkar@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [218.83.110.136] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR08MB3262; 6:6HuZGsaJas/atvun9vyuSYL/61Pt8WYu5hdUL0v52inztnNw9Li7rZ311OJyZjpI6JAsZUf6FitLtlOIkTaE4jTJP05oa62UMownbqvJEb658XgSzICwnSJ6tjBRrwQgkiLgNYyqrQb334B2/Kb55uKPp5UiccPCKwo7GdKXg3GWkqvaa83k02Ce31qcG4of26Bm159gU04K7/OHsJ1+U9AVhV2zJUWH3WH4opsnDSlX7OOQYUAYwF06okiQvUL9MK8e8VTFcdhwaUcADP20mbeCyqNWCPO+o07CwuJKkQH5Sze06NQ9TFeFj+hF7WOy9Suy5q45vD16DFzUwUs0IZxkKtzcl/a+cjW7r1KGc0Fxjy6Vyoo+qvADF1EOf20HGotiXXJxDJ6FhFvzxmlUsrZU380ORaen03ECejdyIE2lwuBT57sOJrRHVzBxnDFXHVvdjJvuy4RSvxavTDhTcA==; 5:1OZI8ap4ex2koq41i5CaTIc1z1vs6pFS3X/GWbepViCIUnybxN5MRg0fPfR26gsfpEJ02jrg8AFSIm6o5XR7mhqqeFsaqkaAP4VexubTfm8bLGc0ojD3ti8DgY+dCj3jOW3K9UX4DCP5jAoGdSF5OBIYAdnD18zn3FAKoQLl+Dk=; 7:VV9w+5qLuPy2DS4EcBawPbpX4VlZ8SuCjHVoJ9/eKwO7Dljc3N96HG40nzT/EuO+c+GhYdUX1nral2T/5dgofx+2Kndw38AqGFH40+aKY7lC41Zw8p5abL0qCihSrFU0dtYDqolcEqL0R2tR06k9uldnNCPST+9Tpf/P75nI74f4n4Yi+1+Xz16gS/ZyFcgyyXupNrSLYd9nsrKjd5T+Zz5OQSGB3hilB2Emz7yzz3BH3EGpFNOWB28BKRaDtmpc x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-correlation-id: 14a4a9fe-c394-41d1-c81c-08d60c2b21dd x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR08MB3262; x-ms-traffictypediagnostic: VI1PR08MB3262: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(3231311)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:VI1PR08MB3262; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB3262; x-forefront-prvs: 07778E4001 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(39860400002)(366004)(136003)(13464003)(199004)(189003)(40434004)(8676002)(72206003)(14454004)(86362001)(8936002)(478600001)(105586002)(14444005)(256004)(5024004)(6506007)(53546011)(6436002)(102836004)(25786009)(316002)(11346002)(486006)(66066001)(446003)(476003)(2900100001)(26005)(106356001)(53936002)(81156014)(97736004)(4326008)(99286004)(81166006)(33656002)(5660300001)(6116002)(7696005)(9686003)(54906003)(76176011)(5250100002)(110136005)(2906002)(6246003)(68736007)(305945005)(7736002)(3846002)(229853002)(55016002)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3262; H:VI1PR08MB3167.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: GsZ4u0h1Noovn/aLFx5IaaMekDA1B/dLr8jQeuVyx+HYsgizX/1Y/rAPFPr5mGdgFzZvb9JE2Hdf3m7HYtie+lri8mXszN33S/CZZqKdb7tIcfQ1KxFwjtNXRJvRh0lBz43QfcMNkESSQCd0PmFk+7k2+fJctv2uh6HpVXo48qaSZsEPOhi2cQ2Tlv9U1ciN7PitpKePcAbpAh2KNYeQ6meXpKuBrioX1vHFYxgc3lIctY61jikYiQd11aIRcapC4hXR44ss+I2Ij4U8iQdmFFhlTqfnhW3tmHV7KtiGnQFWGIzLbkrEjVF1cVLgzxYLOjrvpJkh8V0HoFcdJvYWaXTk0AS+5oHD54009bCsoPU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14a4a9fe-c394-41d1-c81c-08d60c2b21dd X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Aug 2018 14:41:11.0032 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3262 Subject: Re: [dpdk-dev] [PATCH] test/hash: solve unit test hash compilation error 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, 27 Aug 2018 14:41:12 -0000 > -----Original Message----- > From: dev On Behalf Of Dharmik Thakkar > Sent: Monday, August 27, 2018 10:26 PM > To: Bruce Richardson ; Pablo de Lara > > Cc: dev@dpdk.org; Honnappa Nagarahalli > ; Dharmik Thakkar > > Subject: [dpdk-dev] [PATCH] test/hash: solve unit test hash compilation e= rror > > Enable print_key_info() function compilation always. > > Signed-off-by: Dharmik Thakkar > Reviewed-by: Honnappa Nagarahalli > Reviewed-by: Gavin Hu > Suggested-by: Honnappa Nagarahalli Acked-by: Gavin Hu > --- > test/test/test_hash.c | 24 +++++++++--------------- > 1 file changed, 9 insertions(+), 15 deletions(-) > > diff --git a/test/test/test_hash.c b/test/test/test_hash.c index > b3db9fd..13239e1 100644 > --- a/test/test/test_hash.c > +++ b/test/test/test_hash.c > @@ -80,29 +80,23 @@ static uint32_t pseudo_hash(__attribute__((unused)) > const void *keys, > return 3; > } > > +#define UNIT_TEST_HASH_VERBOSE0 > /* > * Print out result of unit test hash operation. > */ > -#if defined(UNIT_TEST_HASH_VERBOSE) > static void print_key_info(const char *msg, const struct flow_key *key, > int32_t pos) > { > -uint8_t *p =3D (uint8_t *)key; > -unsigned i; > - > -printf("%s key:0x", msg); > -for (i =3D 0; i < sizeof(struct flow_key); i++) { > -printf("%02X", p[i]); > +if (UNIT_TEST_HASH_VERBOSE) { > +const uint8_t *p =3D (const uint8_t *)key; > +unsigned i; > + > +printf("%s key:0x", msg); > +for (i =3D 0; i < sizeof(struct flow_key); i++) > +printf("%02X", p[i]); > +printf(" @ pos %d\n", pos); > } > -printf(" @ pos %d\n", pos); > -} > -#else > -static void print_key_info(__attribute__((unused)) const char *msg, > -__attribute__((unused)) const struct flow_key *key, > -__attribute__((unused)) int32_t pos) > -{ > } > -#endif > > /* Keys used by unit test functions */ > static struct flow_key keys[5] =3D { { > -- > 2.7.4 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.