fstests: refactor test boilerplate code
authorDarrick J. Wong <djwong@kernel.org>
Mon, 21 Jun 2021 15:54:54 +0000 (08:54 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 27 Jun 2021 14:49:40 +0000 (22:49 +0800)
commitf37ede78703e0447cd8f8938412c58e70b58cd26
tree78b9b5cf1245914c011c6b94385450915883c1ef
parentf390798cebf3a59134998863416285815f1f3962
fstests: refactor test boilerplate code

Create two new helper functions to deal with boilerplate test code:

A helper function to set the seq and seqnum variables.  We will expand
on this in the next patch so that fstests can autogenerate group files
from now on.

A helper function to register cleanup code that will run if the test
exits or trips over a standard range of signals.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/preamble [new file with mode: 0644]
new