From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 01B934564F; Fri, 19 Jul 2024 12:17:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D742E42E8C; Fri, 19 Jul 2024 12:17:55 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by mails.dpdk.org (Postfix) with ESMTP id D2A8142E7B for ; Fri, 19 Jul 2024 12:17:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721384275; x=1752920275; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=+4gjurFoXFcPrgy3vtYYjEtYv8rcyX7HrY0FZsE6waY=; b=PZyBLo/kbRmhuEx+k85RGTzbR6Pmd5/mIjJN2Bt2+623+EqYuYYzVqFj dx6KjxsNLdUVW6LrZUf7BcR0hwNayhysliLywN9HjmMuOlmo2t5XULj1A 3Zy86ZGnDX6W8s49ufwcBfRf4sCwrYJQmHcgQ1Gh4PFEBLW1gBtGIHK6/ MGgxosR5fwKqrZubo6l43WDUa6094kOL0vKGIMsvk9gvwoDQKfBonCDez 0UOCUbC/m2ulvzx6wAhr2goNtV43SZZhb/wKdIJlGWXP/3QF2opyan9x3 LvC5aa9wSk+lNYbdeZILtzIXfBqrlTJoaR+sI3t4Jqc5bCu2oFGNPoS// w==; X-CSE-ConnectionGUID: j3657A2NTyS3DQu1lTPVmA== X-CSE-MsgGUID: h+la4JjJRRa5KCBrSwYFEQ== X-IronPort-AV: E=McAfee;i="6700,10204,11137"; a="19124256" X-IronPort-AV: E=Sophos;i="6.09,220,1716274800"; d="scan'208";a="19124256" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2024 03:17:52 -0700 X-CSE-ConnectionGUID: i0DUFiiZTBCpeA+0hJnqtA== X-CSE-MsgGUID: 7eW1vY+cS9OzB+RPrAoL/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,220,1716274800"; d="scan'208";a="50957931" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 19 Jul 2024 03:17:52 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 19 Jul 2024 03:17:51 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 19 Jul 2024 03:17:51 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.44) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 19 Jul 2024 03:17:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Nmc7a3vrDuwY9QDUAMT+YhjA962ryZW8be2L9XvneSVq0amldnwprdu0A+A4FoysA65JEaElJueIulImI2QZ5hpxOX44cHEMAfunCqrNRFUHnab/xhXNs9PqB7ZFrIQeEtcqXheaJbpqe9u0tczcSy/pv8pAuJPg9mc56b++elmbV1do6vl/lkuWiiJMHTpDEinr85ZnLO/nvu6J79pnYfLvNyJ+INriJhhprJxVha1ol2LSsUQZu/f2XV+4ER7bIoG+iVlyFJCfDPeqfpmqYLOrkSzPV4S1YagE/k47IDDn+949PyvWJPrZvrjW/csHHUcu4ZDa8anGJWzKZVQmMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RVYtn3zLx3DiRAr/v38VsVM9gKHRdxKDmQ6chijPDbk=; b=UsDZTLWWAtlWJfBaMtFornCgjqL1CoEqyD/eYM8O1gTR9kIDZRO7ryuhEUacYKeRf0E8OrMH44Tr6MTeqhNryvosT5e2I6w63pv2bkjZ5jrMgLzvdzd87Vl3CzLOAE3FwwrVN3K8akC9NN20+HZoRJtytk8a8QukL41TmVzdwanZ+RhteY+W45owEPfiIyNacCO8I7NSkI3tUYYTsDyJo13U8E9lhj9robBzzVikgUiHAJ7ChE4iZE5elGlTStIflxfpEDCVTYQgNMb4fyMZQ9afqqO4lhqYV1LM7jw6Rkg54mCJFCQXkWBgqtUmNJum1oLdwsDNsLYuuOahb8QQQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH7PR11MB7432.namprd11.prod.outlook.com (2603:10b6:510:272::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.17; Fri, 19 Jul 2024 10:17:49 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%7]) with mapi id 15.20.7784.016; Fri, 19 Jul 2024 10:17:49 +0000 Date: Fri, 19 Jul 2024 11:17:43 +0100 From: Bruce Richardson To: Stephen Hemminger CC: , Tyler Retzlaff Subject: Re: [PATCH 1/4] test: update alarm test Message-ID: References: <20240718191049.84865-1-stephen@networkplumber.org> <20240718191049.84865-2-stephen@networkplumber.org> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240718191049.84865-2-stephen@networkplumber.org> X-ClientProxiedBy: DB8PR09CA0017.eurprd09.prod.outlook.com (2603:10a6:10:a0::30) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH7PR11MB7432:EE_ X-MS-Office365-Filtering-Correlation-Id: fa11d1e5-486a-4714-7673-08dca7dc0a4c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?lNWRCV0Rzj4Z9icp+I/jz6dlBSXjI5P34PN2p5pYt/uRJqBKlqo8Jnu2g8a3?= =?us-ascii?Q?leJJtPdbtPA97yH/vvP9HtxSo4QPCPV+H3jVUPu8EjcPivojiSvcT0CQOXLj?= =?us-ascii?Q?IZBqI90nK52aKvjRvMJUtigwPw6oRQCcL7TpYktCyWSc2Xc2mpGJf653reVO?= =?us-ascii?Q?aQLxcyJ0BvEaQVLzU2gqtvz50vYs7gkuM3G64w/fx+ynuWyD8CJ3AQssMs+g?= =?us-ascii?Q?RbB418Ttu2aRkLneIJOHjoLb3AC6MDAH7+imcw9Rd2iO5BAN58Rhl/wKBMl1?= =?us-ascii?Q?J+4SPuDkgE8FIIJ1745bqMF7ONwo6hne6ilKsSHnVk9aDo1hYlR17vToKk7y?= =?us-ascii?Q?nlmRRC8fzMnIaWQ27i5UfyQz1vuZZKrnLdEX5ixj00f8E+3gTJSt1ppoJjwP?= =?us-ascii?Q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q/2tN4ErKbnuwfNnvg?= =?us-ascii?Q?lhJFXuZtO9vp9gaxuTxDPRqkM4y7NCo/Sg0O/QLsa9KXOg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?1/ygoXtngTeHo7ZVeg+mm7j3EwOXKN6BSChHJvAVDJO+WF9IiGOPigYcEG0r?= =?us-ascii?Q?FE+FFjzPORdegNEmN+Y04rmw7UpRRLGCNK0n2QyVfurLZge2UKkrBRW4StiD?= =?us-ascii?Q?RKMGtD0FFASGYHPvhhyetN7F2Dwd4M0bpQMK/4G8DN6rjsDoBWGR9W8j45dp?= =?us-ascii?Q?Na02CdiB2mMFiWl0GtqURTCO9ET5+TBlTSxT9JzOp2GbjyE7R0qDn0T7z0H9?= =?us-ascii?Q?ev0wN/AmXsZtYJ/RX9KEYEOWHbfZlTpT3U3l7S0QSOv4g3XhicGpsoTungoV?= =?us-ascii?Q?l/4rxZ51pPb6oSa03COYMtZEsyHarC0MQ7xWy44sNFU8zG5u8nZNQyYEZabC?= =?us-ascii?Q?vtTRXaCnJ8RYIdvOpWwI01Ar/Z51UJsbqiAqpYptkbsnjnfNHkfg0F/ed+o2?= =?us-ascii?Q?XfHfYd/5qlcXk5wJtKIejeOScQkzhh3yerp0+4hkJXWVYtTiW8E+gDZgEo/s?= =?us-ascii?Q?zj0TfMuKPI5kNWj3erJ6Q1F3EUsbFwpueTDCgVd5JLTl+ULtTD32L4+LFzJo?= =?us-ascii?Q?qAACqmisISLVt5ZC3dGhM45Xn7uZ0NQs3RBkj59+ehAYm5mDd2Cf/vnqBB4L?= =?us-ascii?Q?o2sJ4OLWxgfJonCn7m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=?us-ascii?Q?mcp/+fCLmt0nIAjZHhS4mEUHuEGzEfqcCG37fb4sqW+J81phISzvZpZ+I/lR?= =?us-ascii?Q?NFBNi6gIjL+OBAK0eo9HnvLfvO39KDTE5gS6XAsc0adFP7rQat1aMnPGbTnV?= =?us-ascii?Q?lA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: fa11d1e5-486a-4714-7673-08dca7dc0a4c X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2024 10:17:48.9039 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: u1bmMU8hEgQBBPdVCWpr+AKsNmPvCheezYnryfdFeEDbH36lYe1Hv0QKqXus9uuabiVPFD0n4Ttu8TeEPIvxzqOFgYsDj6Lw4uK4BWTEans= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7432 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Jul 18, 2024 at 12:07:12PM -0700, Stephen Hemminger wrote: > This test should be using the TEST_ASSERT macros, and can be > run as part of the fast test suite now. > > Signed-off-by: Stephen Hemminger > --- > app/test/test_alarm.c | 53 ++++++++++++++++--------------------------- > 1 file changed, 20 insertions(+), 33 deletions(-) > > diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c > index 70e97a3109..4ba8aa1af2 100644 > --- a/app/test/test_alarm.c > +++ b/app/test/test_alarm.c > @@ -10,7 +10,8 @@ > > #include "test.h" > > -#ifndef RTE_EXEC_ENV_WINDOWS > +#define US_PER_SEC 1000000 > + > static volatile int flag; > > static void > @@ -19,46 +20,32 @@ test_alarm_callback(void *cb_arg) > flag = 1; > printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg); > } > -#endif > > static int > test_alarm(void) > { > -#ifdef RTE_EXEC_ENV_FREEBSD > - printf("The alarm API is not supported on FreeBSD\n"); > - return 0; > -#endif > + int ret; > + > + ret = rte_eal_alarm_set(0, test_alarm_callback, NULL); > + TEST_ASSERT_FAIL(ret, "should not be succeed with 0 us value"); > + > + ret = rte_eal_alarm_set(UINT64_MAX - 1, test_alarm_callback, NULL); > + TEST_ASSERT_FAIL(ret, "should not be succeed with (UINT64_MAX-1) us value"); > + > + ret = rte_eal_alarm_set(10, NULL, NULL); > + TEST_ASSERT_FAIL(ret, "should not succeed with null callback parameter"); > +1 to use of TEST_ASSERT_FAIL, the test is a lot cleaner now. However, I think we still need the #ifdefs in it if some of it doesn't work on Windows/BSD. /Bruce