[Top] [All Lists]

Re: [PATCH 2/2] xfstests: unify apostrophes in output files

To: Tomas Racek <tracek@xxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfstests: unify apostrophes in output files
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 13 May 2013 10:25:01 +1000
Cc: xfs@xxxxxxxxxxx, lczerner@xxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1368349273-23968-2-git-send-email-tracek@xxxxxxxxxx>
References: <1368349273-23968-1-git-send-email-tracek@xxxxxxxxxx> <1368349273-23968-2-git-send-email-tracek@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sun, May 12, 2013 at 11:01:13AM +0200, Tomas Racek wrote:
> With coreutils v8.16 the style of apostrophes changed from `word' to
> 'word'. This is breaking some tests which use the older form.
> This commit introduces function _filter_apostrophes and changes the
> affected tests.

I'm not sure this is the best approach as it means we have to
remember in future to do this filtering in the places that need it.

I suspect that we'd do better to filter the entire output file from
check before we diff the golden output and the test output. An
inplace sed modification would be all that is needed like:

        # coreutils 2.20+ changed quote formats in error messages.
        # filter the damage out so that golden images match both old
        # and new versions of coreutils.
        sed -i 's/`/'\''/g' <test output file>


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>