Re: [PATCH 13/20] t: refactor tests depending on Perl for textconv scripts

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

 



On Thu, Mar 20, 2025 at 03:37:08PM -0400, Eric Sunshine wrote:
> On Thu, Mar 20, 2025 at 5:37 AM Patrick Steinhardt <ps@xxxxxx> wrote:
> > We have a couple of tests that depend on Perl for textconv scripts.
> > Refactor these tests to instead be implemented via shell utilities so
> > that we can drop a couple of PERL_TEST_HELPERS prerequisites.
> >
> > Note that not all of the conversions are a one-to-one equivalent to the
> > previous textconv scripts. But that's not really needed in the first
> > place: we only care that the textconv script does something, and that
> > can be verified trivially without having a full-blown invocation of
> > hexdump. So at times, the implementation of the textconv scripts is
> > reduced to their bare minimum.
> >
> > Signed-off-by: Patrick Steinhardt <ps@xxxxxx>
> > ---
> > -test_expect_success PERL_TEST_HELPERS 'rewrite diff respects textconv' '
> > +test_expect_success 'rewrite diff respects textconv' '
> >         git diff -B >diff &&
> > -       grep "dissimilarity index" diff &&
> > -       grep "^-61" diff &&
> > -       grep "^-0" diff
> > +       test_grep "dissimilarity index" diff &&
> > +       test_grep "^-3d 0a 00" diff &&
> > +       test_grep "^+3d 0a 01" diff
> >  '
> 
> This change seems unrelated to the stated purpose (`textconv`) of this patch(?).

Not quite. The test previously didn't run because it depends on the
Perl-based textconv script. Now that this textconv script was adapted
to use shell scripting instead it can run, but as explained in the
commit message the output of the textconv script changed. We don't
really care for the exact output at all, we only care that textconv did
its thing. But we do have to adapt the test accordingly.

Patrick




[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