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 8C9EA4235C; Wed, 11 Oct 2023 09:26:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77A15402F1; Wed, 11 Oct 2023 09:26:18 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5ECDF402A2 for ; Wed, 11 Oct 2023 09:26:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697009175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kQCjpwvVEgGez776RoLnWV39VBNjN9WVeibyr7OfvcY=; b=gjk42S4McuprhSFbWsoMPU0QQzzBhk7gGsDFT5O9f00zfqH63BBGh5fLZx27igpiu4rilX rERa28aHpHltHS0IcEUvT4I5VY4OlB7DLFcvJgRd4VBSGeJnJhiap4t7JIOWf0yurusdgZ 2tghrRKay6ZaF4UJI0zD869IMeztQHY= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-593-bhQBaDu7PR2iYDamHBkMwg-1; Wed, 11 Oct 2023 03:26:14 -0400 X-MC-Unique: bhQBaDu7PR2iYDamHBkMwg-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-50338ca1663so6287622e87.0 for ; Wed, 11 Oct 2023 00:26:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697009173; x=1697613973; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kQCjpwvVEgGez776RoLnWV39VBNjN9WVeibyr7OfvcY=; b=GpBn0xlEFum7S2NN7s4I/fv82YETcGswEOxbR36EIpvdNkRimxBtuFiCbNy2qBLkBJ rasL+caDg1i6ONkdz8fWMEHpTPauNLMKLod2KgPM2I506+Xouds/IuaOHeRljOvkmcVy hLG8bUZduN5Xjr1Ka1W1bBO7NDABnOa8EB2/7Cm2y/RlWrTUyT810kCe31qQ6YKvIWLt icnfBcocHp/7w6Xm+CyC19b7V6RJaYuzNFis+xBMdAE5ZQB8FHTrVGXKQJBJS5q8PJIs ZOlLenvEp/4BJqO0ojU8ccYJGAFcSl5T8EZLf94MmAIko6uFrO74G+ajMrYj96h21+3/ Thpw== X-Gm-Message-State: AOJu0YzURnYIfGdZpessglyYPQsB/Fs7JwIL0eOw3//nzl2xkxJ7z0N+ Uzo1TL0tPjfcMcAB9sODBk1y53JmLaQ231bQyZNIJPBk83BRS7CkR4Zup9VkdZXFYhNvaq2A5iT KtQdpXUJNkDFiEhehf7E= X-Received: by 2002:a19:791c:0:b0:503:314f:affe with SMTP id u28-20020a19791c000000b00503314faffemr14795152lfc.17.1697009173402; Wed, 11 Oct 2023 00:26:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEu0A8BqDWO9GQmAg59/piwzADiOoXIhAnBrA7qiwihE1vcYmAjf12Np+Ksl+BKw1XqVRSYSyBSBg2JY7B3k/Y= X-Received: by 2002:a19:791c:0:b0:503:314f:affe with SMTP id u28-20020a19791c000000b00503314faffemr14795142lfc.17.1697009173045; Wed, 11 Oct 2023 00:26:13 -0700 (PDT) MIME-Version: 1.0 References: <20230928073056.359356-2-mattias.ronnblom@ericsson.com> <20231009181711.440865-1-mattias.ronnblom@ericsson.com> <20231009181711.440865-3-mattias.ronnblom@ericsson.com> <27230ad2-2aca-4ce3-b564-8ea848b6f581@lysator.liu.se> In-Reply-To: <27230ad2-2aca-4ce3-b564-8ea848b6f581@lysator.liu.se> From: David Marchand Date: Wed, 11 Oct 2023 09:26:01 +0200 Message-ID: Subject: Re: [PATCH v6 2/3] test: add dispatcher test suite To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , dev@dpdk.org, Jerin Jacob , techboard@dpdk.org, harry.van.haaren@intel.com, Peter Nilsson , Heng Wang , Naga Harish K S V , Pavan Nikhilesh , Gujjar Abhinandan S , Erik Gabriel Carrillo , Shijith Thotton , Hemant Agrawal , Sachin Saxena , Liang Ma , Peter Mccarthy , Zhirun Yan X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Wed, Oct 11, 2023 at 8:28=E2=80=AFAM Mattias R=C3=B6nnblom wrote: > > On 2023-10-10 13:56, David Marchand wrote: > > On Mon, Oct 9, 2023 at 8:22=E2=80=AFPM Mattias R=C3=B6nnblom > > wrote: > >> +static int > >> +test_dispatcher(void) > >> +{ > >> + return unit_test_suite_runner(&test_suite); > >> +} > >> + > >> +REGISTER_FAST_TEST(dispatcher_autotest, false, true, test_dispatcher)= ; > > > > Since this test expects some lcores, wdyt of adding: > > > > @@ -1044,6 +1044,12 @@ static struct unit_test_suite test_suite =3D { > > static int > > test_dispatcher(void) > > { > > + if (rte_lcore_count() < NUM_SERVICE_CORES + 1) { > > + printf("Not enough cores for dispatcher_autotest, > > expecting at least %u\n", > > + NUM_SERVICE_CORES + 1); > > + return TEST_SKIPPED; > > + } > > + > > return unit_test_suite_runner(&test_suite); > > } > > > > This should avoid the failures we get with some CI env. > > (additionnally, I tested this on my laptop and the test runs fine) > > > > > > Indeed, this is a much better way than to fail the test case. > > I'm thinking this is best done in test_setup(), since it's related to > the setup. In case other test cases are added that required a different > setup, there may be no minimum lcore requirement. This is what I had tried as a first attempt but as I hit some crashes in the teardown step, I went with the easiest fix. > > You will get multiple (four, for the moment) print-outs though, in case > you run with fewer than 4 lcores. > > I'll also make sure I skip (and not fail) the tests in case the DSW > event device is not included in the build. > Yep, it is better like this. Thanks for v7, I'll have a look today. --=20 David Marchand