From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0067.outbound.protection.outlook.com [104.47.32.67]) by dpdk.org (Postfix) with ESMTP id 4FB254CB3 for ; Wed, 14 Mar 2018 10:42:06 +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=0cvsbNEHvoAVGgUQAj2ky7s/F3t+KA9bFkkG+kxqaoA=; b=ortmyrUiM8nduA+K3v7YnrWEw+GuFgQoMFGZB5XnqDLFoUVGYzkFl8SLEfR0lxE7O4VQRk1dd5qbfdUYvQNbIdTUX7uyTwI5btFnLBWQEXfYa+W0iBCOT5goB8jiNNzq12vuZiYuXeXaPqXbD1AhEZcq84f9wMqDTsM3OJgITuc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn.caveonetworks.com (111.93.218.67) by MWHPR07MB3472.namprd07.prod.outlook.com (2603:10b6:301:63::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.14; Wed, 14 Mar 2018 09:42:03 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, thomas@monjalon.net Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 14 Mar 2018 15:11:00 +0530 Message-Id: <20180314094100.12373-2-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180314094100.12373-1-pbhagavatula@caviumnetworks.com> References: <20180314094100.12373-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: DM5PR12CA0056.namprd12.prod.outlook.com (2603:10b6:3:103::18) To MWHPR07MB3472.namprd07.prod.outlook.com (2603:10b6:301:63::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a5546f65-9296-4100-b4dc-08d5898fd89d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:MWHPR07MB3472; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 3:5xo99KSH3O1AZI6bShPRA+/CdwhPOvscZjixNcBLGc0HDtlJ1dNn/xUbxi7DPGnDLP0uIvSRx+2EEWuX/aSOFlpcHAVANcyeqlQHJc2P9v1t4aodn4r9WgmWYnFtkJAGo1Y88l3AJ1y7fEdBlar3O1MBHAqIgXOneFVrp+SN72jeEge6h6MnmGhArm0qgIxdohpH+JrR/K3p3fUFaUY4lbUbZpIJCcZiSqF7kc4lWpgR71d1UlUeNZKG6njkHDL3; 25:1J7+iJvp4BdRKBuw+h+U/ujT+g9kRt955NKyjxUjd+pFRyECHz7Szl1MOdAHEqLGsEOAYhgCFgT/gg9EkqmOfnUT3jIJ5UqvB4mzujVUYbX6j9SdZkXsPlrdiq+7eqtIjTsj7Zj30ElRZnxWatXOTRMibogqcQ9QXagXE2GcttRCFTxZk90dMNR+Y05y77o2mb1YfS/AYq5oX/PUqiJJjqqqjOPp1//mX+fgcbC44N0TTfELMM307Z2qqs3HYgNByEcNMV2Q3h174dRqrgjNdMRLK1lEP5768LpwfJvLXAiALlan4fMLRadE/1h3xDWodXXEmsErkVzAkXOibw7RAA==; 31:oYvoljqARHrG7tX3xtd1GVTcJ3sNzgVyCX12+3rnOYO/P6fZgH4c8eQY2GG4+oZsC7wb1xng7wx4s6GZZYovkAh1Y3Xgj5P5RSmehHJERTVTjYNW1RxBCbnfLCX3e5uJBBSsEso26Q0L6UY79LuOTKto3F8PkVuTbHNE9TgJm5P4KV6GA9eEoCrgT8PM8qR/q0KDmbs+WPZtnf+5EC+xRYpn0W0OEQcuIsqWXwLuZoI= X-MS-TrafficTypeDiagnostic: MWHPR07MB3472: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 20:iHAXLRNOOvFfqp3ZXvEvV3jFi+F4hDv3msooHEiaIVijYWBwLmhgazVWanX2mEdt6rNJoJwi+R/b3sc0lelnW0h6Eh7UpJIoXvWqscgn1PxJQTzoLcBN4k4NCwMudjXdjD6Wm7EtlleIPBYdKHTRr6ygmZGOamgnQAIitktzOBoCjTwuERsIawt3PSoE43QqVgE1KhPZ44OGCqnhrydQLhjazBs10tSkeSB7D1RldDTKpU1Q2jQAcr14d+V7SVp3QMLi93qoO/HEBY1f6sxeOKDyT8rNcJrO1ndn93dZ3gozovdk6AC3wdYgnzHVUpYeYKBo3kLJ2BwCGL4CtsbAFyx9ftk+Nrd//HojNdOP2svTLSdwJlPTUQuPfenEWvzeNuakOaJ1atqNk3KSJh+ZHXHwJ5xoPX6KBvfpLbrwmoKRnoF/ItmZsSftc8Zu8EpLns7dcdziRDSQpoWiv4fonUaA2qn6KIJrtnmx2TxkACeCt6ZKbXXyxyC260qXHhVtj/q0YPY1zr2qMbvlrHwS89EY9N52TUOeDAMAfWtP9pY77COx4FrKzTnLxb/jI7PLg2SlvQqtZNx92WH/JJqS82fWsRjjQPaIAfaouD/SCl4=; 4:QgfhvcYtWh+5Wfa7OeImLYHIMBFMQ6tj4EpgL7b3TNWXuHpSX1Pbx2qiizR7iKqQ8ISSqFnE3maA1swjOaeHLAaXFzsDc4s+daPiMiPwI87l9BrT1BZ8KS89kcr+khE4r2INtFXKf9zHm7Mrao5lYMl47Q7iKTa10QX+zlnlDoJ6OxyZPuZWPWsT8S9aPSkc56oPwEfAXEbIMf01+nJYyJ9gcBwahtIAcwStBcuELck2dZhQONaDNK+ZTUqd06pNM7FXzfyP7esyuqRpxKBykw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501244)(52105095)(3002001)(93006095)(10201501046)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:MWHPR07MB3472; BCL:0; PCL:0; RULEID:; SRVR:MWHPR07MB3472; X-Forefront-PRVS: 0611A21987 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39380400002)(39860400002)(366004)(346002)(396003)(199004)(189003)(53936002)(59450400001)(8936002)(68736007)(66066001)(47776003)(386003)(16526019)(1857600001)(305945005)(15650500001)(7736002)(1076002)(8676002)(81156014)(72206003)(2950100002)(3846002)(6506007)(48376002)(50466002)(26005)(81166006)(16586007)(6116002)(53416004)(105586002)(106356001)(6512007)(42882007)(52116002)(5660300001)(316002)(6486002)(51416003)(107886003)(4326008)(69596002)(36756003)(97736004)(2906002)(478600001)(5009440100003)(76176011)(50226002)(25786009)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3472; H:ltp-pvn.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3472; 23:kHai0GjR3g5ILqQZ423K4CTkR97Y/zXGjX69GWETD?= =?us-ascii?Q?Ma3nZf41wwNIcWIlnTeyfk/P5BmKtZnFtPQfsX2AkO01SE2seIeL/SIKXjGc?= =?us-ascii?Q?3ght1khV6QlvJNZNLlp9WOMe/70f96ZHbTO9YYk8gsO9fOydb/M/UFv90ebs?= =?us-ascii?Q?HukwzPqcSHE5r16szut3abQ5Y4KYFG77CpSEXlUVZnpv42andcHyHfSOugtR?= =?us-ascii?Q?hMH8J3FmTVftTnNDm4/wAJ7sUYx2oNyWpylnWv3WYGyUhCCXVynyhycvfKQu?= =?us-ascii?Q?SL7nqj/oJxt//dV+762mR96YX8aN9eehhNcEgcPdT2Y97Np+k3Szl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ZBHuiiVegoZMAWPwwJo39ux/X0H9MNVzhZPlymC3B4wBO5WjqjHL9MrHnhoM6d0Ofv+pJjN62mEkOTnjocxKPlq0pc1xU7vny0apyyo1dhBCniutpcB998NoZ7Td5oLhi0bAfTLL01PvOUivgtQx6hRP+MUcLjsxcgv2U07hQW1cM1P0uYic8Vjj1WfTookASK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2018 09:42:03.3304 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5546f65-9296-4100-b4dc-08d5898fd89d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3472 Subject: [dpdk-dev] [PATCH 2/2] test: update common auto test 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: Wed, 14 Mar 2018 09:42:07 -0000 Update common auto test to include test for aligning values to multiples of given integer. Signed-off-by: Pavan Nikhilesh --- test/test/test_common.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test/test_common.c b/test/test/test_common.c index d0342430f..e43cba49b 100644 --- a/test/test/test_common.c +++ b/test/test/test_common.c @@ -128,6 +128,18 @@ test_align(void) FAIL("rte_is_aligned"); } } + + for (p = 1; p <= MAX_NUM / 2; p++) { + for (i = 1; i <= MAX_NUM / 2; i++) { + val = RTE_ALIGN_MUL_CEIL(i, p); + if (val % p != 0 || val < i) + FAIL_ALIGN("RTE_ALIGN_MUL_CEIL", i, p); + val = RTE_ALIGN_MUL_FLOOR(i, p); + if (val % p != 0 || val > i) + FAIL_ALIGN("RTE_ALIGN_MUL_FLOOR", i, p); + } + } + return 0; } -- 2.16.2