Re: [PATCH v1] xfs: test reproducible builds

Luca Di Maio
2025-12-12T08:10:01Z

On Thu, Dec 11, 2025 at 09:28:01PM -0800, Christoph Hellwig wrote:
> On Thu, Dec 11, 2025 at 06:25:31PM +0100, Luca Di Maio wrote:
> > With the addition of the `-p` populate option, SOURCE_DATE_EPOCH and
> > DETERMINISTIC_SEED support, it is possible to create fully reproducible
> > pre-populated filesystems. We should test them here.
>
> Cool, thanks a lot!
>
> > +#
> > +# parent pointer inject test
> > +#
>
> I don't think that is correct :)
>

Copied over from 640 :) Will fix this

> > +. ./common/preamble
> > +_begin_fstest auto quick parent
>
> Same for the parent here. Instead of parent mkfs is a good group here.

Ack

> > +
> > +# get standard environment, filters and checks
>
> This is kinda redundand.

Ack

> > +IMG_SIZE="512M"
> > +IMG_FILE="$TEST_DIR/xfs_reproducible_test.img"
> > +PROTO_DIR="$(dirname "$0")"
>
> So this is basically packing up tests/generic/ in xfstests
> directory. Is that the best choice? It won't really have non-regular
> files, so the exercise might be a bit limited vs creating a directory
> in $TEST_DIR and adding all file types there.

Ack

> > + # - DETERMINISTIC_SEED: uses fixed seed (0x53454544) instead of getrandom()
>
> overly long line.

Ack

> > +# Compute hash of the image file
> > +_hash_image()
> > +{
> > + md5sum "$1" | awk '{print $1}'
>
> md5sum is pretty outdated. But we're using it in all kinds of other
> places in xfstests, so I think for now this is the right thing to use
> here. Eventually we should switch everything over to a more modern
> checksum.

Will move to sha256sum

Thanks for the review
L.