DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>
Cc: Thomas Monjalon <thomas.monjalon@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RFC 17.05] test: move tests to separate folder
Date: Tue, 14 Feb 2017 17:30:14 +0000	[thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B035B9815F@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <8e969f23-6a65-553e-25ca-593c01c9fe8b@intel.com>



> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, February 14, 2017 5:07 PM
> To: Richardson, Bruce <bruce.richardson@intel.com>
> Cc: Thomas Monjalon <thomas.monjalon@6wind.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [RFC 17.05] test: move tests to separate folder
> 
> On 2/14/2017 3:41 PM, Bruce Richardson wrote:
> > On Tue, Feb 14, 2017 at 03:13:26PM +0000, Ferruh Yigit wrote:
> >> Tests are part of app folder and compiled with library every time.
> >> Moving tests into a "test" folder which won't be compiled by default.
> >> To compile tests, need to give explicit "make test" command.
> >>
> >> "make test" was previously used to run tests, which renamed to "make
> >> test_run" with this patch.
> >>
> >> This makes default compilation ~30% faster,
> >> [clang, make -j8, old]: real    1m04.355s
> >> [clang, make -j8, new]: real    0m41.740s
> >>
> >> For new case, test needs to built separately, which takes,
> >> [clang, make -j8 test]: real    0m24.293s
> >>
> >> The point is tests are not required always and by every one.
> >>
> >> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >> ---
> >
> > Hi Ferruh,
> >
> > I'm not sure I'm convinced by this, as I think there are advantages to
> > having the test code always compiled. Anything that is not compiled in
> > DPDK by default is more likely to be broken by patch submissions. The
> > speed boost to build is nice, but I'm not sure it's worth it.
> > However, I'm open to being convinced otherwise on this...
> 
> Perhaps I should send this as two patches, first separate the unit tests
> and second disable tests in default compilation.
> 
> Your concern is about disabling test compilation by default.
> 
> - If nobody interested in running test, why force them to compile. If
> people interested in unit tests, test will be compiled and issues will be
> resolved.
> Unit tests are for developers more than end users, and if developers are
> not using unit tests we may have another thing to focus.
> 
> - This should be automated somehow, unit test should be build and run
> regularly and automatically. So we can see when it is broken.
> 
Ok, makes sense.

Just to be awkward :-), one last question: Why separate building and running
the tests? My suggestion would be to have "make test" both build and run the
tests. If there is no work to do in building them, then the time cost of the
extra empty build is negligible compared to the time taken to actually run
the tests. If we really want to build the tests without running them I'd
suggest "build_test" target instead. This keeps "make test" pretty much as
it was before.

/Bruce

  reply	other threads:[~2017-02-14 17:30 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 15:13 Ferruh Yigit
2017-02-14 15:41 ` Bruce Richardson
2017-02-14 15:51   ` Wiles, Keith
2017-02-14 16:12   ` Mcnamara, John
2017-02-15  9:03     ` Thomas Monjalon
2017-02-14 17:07   ` Ferruh Yigit
2017-02-14 17:30     ` Richardson, Bruce [this message]
2017-02-15  2:11       ` Yuanhan Liu
2017-02-15 10:06         ` Ferruh Yigit
2017-02-15 11:16           ` Thomas Monjalon
2017-02-15 11:28             ` Ferruh Yigit
2017-02-14 16:15 ` Mcnamara, John
2017-02-15 15:26 ` [dpdk-dev] [PATCH 1/4] " Ferruh Yigit
2017-02-15 15:26   ` [dpdk-dev] [PATCH 2/4] mk: do not build tests by default Ferruh Yigit
2017-02-15 16:58     ` Thomas Monjalon
2017-02-15 17:30       ` Ferruh Yigit
2017-02-16  8:53         ` Thomas Monjalon
2017-02-16 10:07           ` Ferruh Yigit
2017-02-15 15:26   ` [dpdk-dev] [PATCH 3/4] mk: add new test-run make rule Ferruh Yigit
2017-02-15 17:07     ` Bruce Richardson
2017-02-15 17:41       ` Ferruh Yigit
2017-02-16  9:08         ` Bruce Richardson
2017-02-16  9:26     ` Thomas Monjalon
2017-02-16 10:21       ` Ferruh Yigit
2017-02-16 10:44         ` Thomas Monjalon
2017-02-15 15:26   ` [dpdk-dev] [PATCH 4/4] mk: rename test related make rules Ferruh Yigit
2017-02-16  9:10   ` [dpdk-dev] [PATCH 1/4] test: move tests to separate folder Bruce Richardson
2017-02-16 14:57   ` [dpdk-dev] [PATCH v2 1/5] " Ferruh Yigit
2017-02-16 14:57     ` [dpdk-dev] [PATCH v2 2/5] mk: do not build tests by default Ferruh Yigit
2017-02-16 14:57     ` [dpdk-dev] [PATCH v2 3/5] mk: add new test-basic make rule Ferruh Yigit
2017-02-16 14:57     ` [dpdk-dev] [PATCH v2 4/5] mk: rename test related make rules Ferruh Yigit
2017-02-16 14:57     ` [dpdk-dev] [PATCH v2 5/5] doc: document test related make rules in make help Ferruh Yigit
2017-02-20 15:23       ` Mcnamara, John
2017-02-28 15:19     ` [dpdk-dev] [PATCH v2 1/5] test: move tests to separate folder Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59AF69C657FD0841A61C55336867B5B035B9815F@IRSMSX103.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).