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 C5783A04AE; Tue, 8 Feb 2022 12:39:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD742410FD; Tue, 8 Feb 2022 12:39:58 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id CF80A410FC for ; Tue, 8 Feb 2022 12:39:56 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 79B115C014E; Tue, 8 Feb 2022 06:39:56 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 08 Feb 2022 06:39:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=L29wid30addDTU 1yICy9PDty0HtToMSu58i5mpVcsTQ=; b=mmrW/x/IeSVCjwBzj6icQMFLnnicei 4ifMHhet3hqnvx/5DJmyQrKJBECFMkL13DPUz0BxALBOCURse4Mh9U8XaxzFAL+v 3kO7nozKA5tukTs5R3NloBZqHrYzw+ZwLG/G78tfq0eMMUxne3aKAMeQw5TyAfHB DemgbcNxYWqmC4VFY6/f1dyrsuXNeAIcLFxmjtUrSYieL6ctn8UpDBcsumwuYE/6 0DDMb7mIVdazWv/uRviDnll/MfiSyE/oOYsJBX7CQWdwTqqjsq81nGHt53eOUvE5 tuMWxZqW94KU8T3wXVc1DRFA+P5gnNXusGksSyikCj+1VEQhP10cIAow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=L29wid30addDTU1yICy9PDty0HtToMSu58i5mpVcs TQ=; b=ANRiXkMAy2iw5cPfOvXSTElvnq8DP8AIwuUWoTfweDWaY8bhNOgbczxDC lyRF0Bns9fyYkDqL4xy0VHmVJKhse4693iVl820OVPqi0Y9YGsKbibPjNnUlB9MJ IihMajpFQvS+nF6TN25IpCRhavETV1W/lvDFZqqnWTIjc1agmDLY7QzPZJy6LFUo Oq4xO5H2IM77caO0DdkRRX+vewzVNjQyj6I8swibEmaua12+i1iziUTfOfULf49F ULQzXKABRpivr5imHKnvDIz5oBZhV1o+OGCDBhZHfnZkQdTe2fuq/4xWaoWeGeeF EP8RME9Wsh9bt7eefaB3mUeoDDLng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheejgddvjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Feb 2022 06:39:55 -0500 (EST) From: Thomas Monjalon To: Jie Zhou Cc: dev@dpdk.org, dmitry.kozliuk@gmail.com, bruce.richardson@intel.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, aconole@redhat.com Subject: Re: [PATCH v15 09/11] app/test: skip tests that are not supported yet Date: Tue, 08 Feb 2022 12:39:54 +0100 Message-ID: <3158137.44csPzL39Z@thomas> In-Reply-To: <1643173844-27341-10-git-send-email-jizh@linux.microsoft.com> References: <1638990000-3228-1-git-send-email-jizh@linux.microsoft.com> <1643173844-27341-1-git-send-email-jizh@linux.microsoft.com> <1643173844-27341-10-git-send-email-jizh@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 The changes below are not for skipping test. I guess I can squash it in the name collision patch. 26/01/2022 06:10, Jie Zhou: > --- a/app/test/test_lcores.c > +++ b/app/test/test_lcores.c > @@ -12,7 +12,7 @@ > #include "test.h" > > struct thread_context { > - enum { INIT, ERROR, DONE } state; > + enum { Thread_INIT, Thread_ERROR, Thread_DONE } state; > bool lcore_id_any; > pthread_t id; > unsigned int *registered_count; > @@ -26,7 +26,7 @@ static void *thread_loop(void *arg) > lcore_id = rte_lcore_id(); > if (lcore_id != LCORE_ID_ANY) { > printf("Error: incorrect lcore id for new thread %u\n", lcore_id); > - t->state = ERROR; > + t->state = Thread_ERROR; > } > if (rte_thread_register() < 0) > printf("Warning: could not register new thread (this might be expected during this test), reason %s\n", > @@ -36,7 +36,7 @@ static void *thread_loop(void *arg) > (!t->lcore_id_any && lcore_id == LCORE_ID_ANY)) { > printf("Error: could not register new thread, got %u while %sexpecting %u\n", > lcore_id, t->lcore_id_any ? "" : "not ", LCORE_ID_ANY); > - t->state = ERROR; > + t->state = Thread_ERROR; > } > /* Report register happened to the control thread. */ > __atomic_add_fetch(t->registered_count, 1, __ATOMIC_RELEASE); > @@ -49,11 +49,11 @@ static void *thread_loop(void *arg) > if (lcore_id != LCORE_ID_ANY) { > printf("Error: could not unregister new thread, %u still assigned\n", > lcore_id); > - t->state = ERROR; > + t->state = Thread_ERROR; > } > > - if (t->state != ERROR) > - t->state = DONE; > + if (t->state != Thread_ERROR) > + t->state = Thread_DONE; > > return NULL; > } > @@ -74,7 +74,7 @@ test_non_eal_lcores(unsigned int eal_threads_count) > /* Try to create as many threads as possible. */ > for (i = 0; i < RTE_MAX_LCORE - eal_threads_count; i++) { > t = &thread_contexts[i]; > - t->state = INIT; > + t->state = Thread_INIT; > t->registered_count = ®istered_count; > t->lcore_id_any = false; > if (pthread_create(&t->id, NULL, thread_loop, t) != 0) > @@ -93,7 +93,7 @@ test_non_eal_lcores(unsigned int eal_threads_count) > if (eal_threads_count + non_eal_threads_count < RTE_MAX_LCORE) > goto skip_lcore_any; > t = &thread_contexts[non_eal_threads_count]; > - t->state = INIT; > + t->state = Thread_INIT; > t->registered_count = ®istered_count; > t->lcore_id_any = true; > if (pthread_create(&t->id, NULL, thread_loop, t) == 0) { > @@ -111,7 +111,7 @@ test_non_eal_lcores(unsigned int eal_threads_count) > for (i = 0; i < non_eal_threads_count; i++) { > t = &thread_contexts[i]; > pthread_join(t->id, NULL); > - if (t->state != DONE) > + if (t->state != Thread_DONE) > ret = -1; > } > > @@ -259,7 +259,7 @@ test_non_eal_lcores_callback(unsigned int eal_threads_count) > } > /* First thread that expects a valid lcore id. */ > t = &thread_contexts[0]; > - t->state = INIT; > + t->state = Thread_INIT; > t->registered_count = ®istered_count; > t->lcore_id_any = false; > if (pthread_create(&t->id, NULL, thread_loop, t) != 0) > @@ -282,7 +282,7 @@ test_non_eal_lcores_callback(unsigned int eal_threads_count) > } > /* Second thread, that expects LCORE_ID_ANY because of init refusal. */ > t = &thread_contexts[1]; > - t->state = INIT; > + t->state = Thread_INIT; > t->registered_count = ®istered_count; > t->lcore_id_any = true; > if (pthread_create(&t->id, NULL, thread_loop, t) != 0) > @@ -310,7 +310,7 @@ test_non_eal_lcores_callback(unsigned int eal_threads_count) > for (i = 0; i < non_eal_threads_count; i++) { > t = &thread_contexts[i]; > pthread_join(t->id, NULL); > - if (t->state != DONE) > + if (t->state != Thread_DONE) > ret = -1; > } > if (ret < 0) > @@ -347,7 +347,7 @@ static void *ctrl_thread_loop(void *arg) > printf("Control thread running successfully\n"); > > /* Set the thread state to DONE */ > - t->state = DONE; > + t->state = Thread_DONE; > > return NULL; > } > @@ -360,7 +360,7 @@ test_ctrl_thread(void) > > /* Create one control thread */ > t = &ctrl_thread_context; > - t->state = INIT; > + t->state = Thread_INIT; > if (rte_ctrl_thread_create(&t->id, "test_ctrl_threads", > NULL, ctrl_thread_loop, t) != 0) > return -1; > @@ -372,7 +372,7 @@ test_ctrl_thread(void) > pthread_join(t->id, NULL); > > /* Check if the control thread set the correct state */ > - if (t->state != DONE) > + if (t->state != Thread_DONE) > return -1; > > return 0;