Re: [PATCH v1] xfs: test reproducible builds

Christoph Hellwig
2025-12-12T05:28:03Z

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 :)

> +. ./common/preamble
> +_begin_fstest auto quick parent

Same for the parent here. Instead of parent mkfs is a good group here.

> +
> +# get standard environment, filters and checks

This is kinda redundand.

> +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.

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

overly long line.

> +# 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.