Re: [PATCH 03/13] fstests: refactor test boilerplate code

Eric Biggers
2021-06-12T00:08:07Z

On Tue, Jun 08, 2021 at 10:19:38AM -0700, Darrick J. Wong wrote:
> diff --git a/common/preamble b/common/preamble
> new file mode 100644
> index 00000000..63f66957
> --- /dev/null
> +++ b/common/preamble
> @@ -0,0 +1,49 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2021 Oracle. All Rights Reserved.
> +
> +# Boilerplate fstests functionality
> +
> +# Standard cleanup function. Individual tests should override this.
> +_cleanup()
> +{
> + cd /
> + rm -f $tmp.*
> +}

This probably should use "rm -rf" so that tests don't need to override this just
because they created directories rather than files.

- Eric