[PATCH 0/6] increase wildmatch test coverage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This increases the test coverage we have for wildmatch, and hopefully
doesn't break anything, but see the fantastic hack that is 6/6 and
form your own opinion.

The backstory of this is that back in June I posted an RFC series here
to the list to refactor wildmatch() itself to no-op support
precompiling patterns:
https://public-inbox.org/git/20170622213810.14785-1-avarab@xxxxxxxxx/

The intent was to swap out wildmatch() to use PCRE as an engine, my
performance tests reveal that that was probably a dumb idea.

We may still want something like those patches I submitted back in
June, in particular we could rewrite wildmatch.c itself to precompile
a pattern. if this makes it in I'll see about rebasing those on top,
but I'm not in any rush with those.

But in writing up those initial patches (and some "use PCRE for this")
that hasn't made it on the list, I discovered that I didn't have any
faith in our wildmatch tests, it was easy to find case I could break
and all tests would still pass.

This series fixes that, whatever we do with wildmatch in the future
it'll be really nice to have this, since we now have exhaustive test
coverage of wildmatch, both through the raw function as before (but as
5/6 there were holes in that), and more importantly by doing the same
tests through ls-files, which is the interface users actually use, and
as 6/6 reveals sometimes behaves differently than the underlying
matching function.

Ævar Arnfjörð Bjarmason (6):
  wildmatch test: indent with tabs, not spaces
  wildmatch test: use more standard shell style
  wildmatch test: use a paranoia pattern from nul_match()
  wildmatch test: remove dead fnmatch() test code
  wildmatch test: perform all tests under all wildmatch() modes
  wildmatch test: create & test files on disk in addition to in-memory

 a[]b                      |   0
 t/helper/test-wildmatch.c |   2 +
 t/t3070-wildmatch.sh      | 802 ++++++++++++++++++++++++++++++++--------------
 3 files changed, 558 insertions(+), 246 deletions(-)
 create mode 100644 a[]b

-- 
2.15.1.424.g9478a66081




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux