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 0629143A40; Thu, 1 Feb 2024 18:45:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91779402BF; Thu, 1 Feb 2024 18:45:12 +0100 (CET) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by mails.dpdk.org (Postfix) with ESMTP id 71131402A9; Thu, 1 Feb 2024 18:45:11 +0100 (CET) Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-42a0ba5098bso6656851cf.0; Thu, 01 Feb 2024 09:45:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706809510; x=1707414310; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SRODoazo4ATnzOu39sOtiyw7ViyitnHelavJOihvdak=; b=Kk0UObUyUSOOrLHFJoZF6PXomFU+aH81Z1mmbGSVnzPDuYQ5e54CaVYBegLpqkguNe r05zisPb7ccpXIV3/4eVxNNxsIexwm25+Hyzp318GAl89r/Zdn0KtZwg/MXgVk76Q6Jo 7aKm3mkE46VAq0Azn+mtgnSv4OFUIess6dyTW+jjgFTo1oEqmaaTUopAXhLaxjrkyxYy eHDDBuabUTIuBiNpm2ZGIEyf2nklfrKb9XlYM6Pn9tH+FfSjvqCowsFfjjIRwpYRzujC QrQzH0pL+2mZKDBGW2KMBDzya/9HNcWUnj5OwO7aHzpEfX9MOX+wpGJ7oP+SeantNwfP UrfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706809510; x=1707414310; 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=SRODoazo4ATnzOu39sOtiyw7ViyitnHelavJOihvdak=; b=xFdna6g0DX/MXW/KkL8s7u8uFdeQQjr9NuiaAQjPTH2WityJMCBFY7Pp2bWq5P7+Z0 RYfPFISmhkqUjvYZF6ex8Vxr1BM+u01xUO9aUo26c0EarT4WuiVLIvr71vWlFm671CSd poevhjxravW8uBW4xyXVWwlYU8OR0G2s0xQM1ETPZ6YV0X0Sy41HA9qoYKwygeLNyrfi 4svU1S+B32Df8cStLirkkSbeIjmMU1+b8bvijinNdmF7RbetVRWfc+vgdCL29KksAiWx fdLg0osPUZTQYDfe72dQiQNT+35bxvaMImSRo7qFlamJjU9Q1NLopi5iuVXxjJgnDSJE eqkw== X-Gm-Message-State: AOJu0YxinVTV2Dkqn0x1ej0qr/ZpE/DCT4JgbpwZ9UGg1V+7khIY+S04 wcDtAbjeiacNLcplLWRe7jlzs8D0ASmQXllM0R4MvqiqJg4dfESCcAEBWytZbFsePdY3v6R7Yt6 X9ypnIeB9JBE6pl9UZ3z3bybQOqA= X-Google-Smtp-Source: AGHT+IEXLixh60hxSHh3JNmCHrTZWzG/EvX01OBe6Li8esxEIjR4I+rsHWPxXbGfY3SEutWJDamPFDk7dauikUtPHmE= X-Received: by 2002:a05:622a:552:b0:42b:e033:f6e6 with SMTP id m18-20020a05622a055200b0042be033f6e6mr5793189qtx.39.1706809510539; Thu, 01 Feb 2024 09:45:10 -0800 (PST) MIME-Version: 1.0 References: <20240124123338.551436-1-david.marchand@redhat.com> In-Reply-To: <20240124123338.551436-1-david.marchand@redhat.com> From: Jerin Jacob Date: Thu, 1 Feb 2024 23:14:44 +0530 Message-ID: Subject: Re: [PATCH] test/event: skip test if no driver is present To: David Marchand Cc: dev@dpdk.org, alosadag@redhat.com, stable@dpdk.org, Jerin Jacob , Bruce Richardson 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, Jan 24, 2024 at 6:03=E2=80=AFPM David Marchand wrote: > > Align eventdev with what other device abstraction libraries do: if no > driver is present, skip the tests. > > Fixes: f8f9d233ea0e ("test/eventdev: add unit tests") > Cc: stable@dpdk.org > > Signed-off-by: David Marchand Applied to dpdk-next-eventdev/for-main. Thanks > --- > app/test/test_eventdev.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c > index 71de947ce4..e4e234dc98 100644 > --- a/app/test/test_eventdev.c > +++ b/app/test/test_eventdev.c > @@ -33,9 +33,15 @@ testsuite_setup(void) > uint8_t count; > count =3D rte_event_dev_count(); > if (!count) { > + int ret; > + > printf("Failed to find a valid event device," > - " testing with event_skeleton device\n"); > - return rte_vdev_init("event_skeleton", NULL); > + " trying with event_skeleton device\n"); > + ret =3D rte_vdev_init("event_skeleton", NULL); > + if (ret !=3D 0) { > + printf("No event device, skipping\n"); > + return TEST_SKIPPED; > + } > } > return TEST_SUCCESS; > } > -- > 2.43.0 >