]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
utils: add struct test_suite
authorChristian Brauner <brauner@kernel.org>
Thu, 12 May 2022 16:52:46 +0000 (18:52 +0200)
committerZorro Lang <zlang@kernel.org>
Sun, 15 May 2022 01:03:01 +0000 (09:03 +0800)
commit0a26b226d83827f8f20368661760a7cb7fe487dc
treef8596192bb6ec4455c05fded4cfb64cddb050451
parentc688623db6b518fa3b75a7342aa516d52936e53c
utils: add struct test_suite

Provide a convenient wrapper struct which provides the tests and the
number of tests. The struct can be kept local to each source file so we
are sure that the tests and number of tests is correct.

In vfstest.c we provide a run_suite() function which expects a struct
test_suite and runs the tests provided by that suite.

Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
src/vfs/utils.h
src/vfs/vfstest.c