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 8CB8EA0C41; Wed, 1 Dec 2021 19:52:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 564084068C; Wed, 1 Dec 2021 19:52:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2C5EE4067B for ; Wed, 1 Dec 2021 19:52:30 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1061) id 81788205B29E; Wed, 1 Dec 2021 10:52:29 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 81788205B29E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1638384749; bh=0BxAa+yV+Ipd9+KUEK4AVesYl4sNXURb6c48Iqi8wvo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SKfonUnqtITdo5FvZzFLS0lSSRuFJIYC68i+/ADrQNd4hk8CJFZKYPRQnPCQMjE5e iUDR44C1fMCXY846Z4/tiirsXjNsC7OEXfyPb80++iSeuhGOjoAvu1JhH0V4V8vPfE IYKq6aBWuFESYjiGriVu8nrG/ztoupf24LPVD9nE= Date: Wed, 1 Dec 2021 10:52:29 -0800 From: Jie Zhou To: Stephen Hemminger Cc: dev@dpdk.org, dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Subject: Re: [PATCH v9 9/9] app/test: enable subset of unit tests on Windows Message-ID: <20211201185229.GA13477@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1635216361-23641-1-git-send-email-jizh@linux.microsoft.com> <1638381938-6113-1-git-send-email-jizh@linux.microsoft.com> <1638381938-6113-10-git-send-email-jizh@linux.microsoft.com> <20211201104535.207b57c6@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211201104535.207b57c6@hermes.local> User-Agent: Mutt/1.5.21 (2010-09-15) 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, Dec 01, 2021 at 10:45:35AM -0800, Stephen Hemminger wrote: > On Wed, 1 Dec 2021 10:05:38 -0800 > Jie Zhou wrote: > > > diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c > > index b206db27ae..c2ea9090cf 100644 > > --- a/app/test/test_dmadev.c > > +++ b/app/test/test_dmadev.c > > @@ -2,6 +2,17 @@ > > * Copyright(c) 2021 HiSilicon Limited > > * Copyright(c) 2021 Intel Corporation > > */ > > +#include "test.h" > > + > > +#ifdef RTE_EXEC_ENV_WINDOWS > > +static int > > +test_dma(void) > > +{ > > + printf("dma not supported on Windows, skipping test\n"); > > + return TEST_SKIPPED; > > +} > > + > > +#else > > Rather than littering code with ifdefs is it not possible to > just not build these tests on Windows? Originally I took the approach not building on Windows, but then the community reached to a point that instead of maintaining two lists of source files to be build on Windows and on non-Windows, we use the same list, and add test stubs for not-yet-supported-on-windows ones.