brintos

brintos / linux-shallow public Read only

0
0
Text · 549 B · 45793af Raw
31 lines · c
1// SPDX-License-Identifier: MIT2 3/*4 * Copyright © 2019 Intel Corporation5 */6 7#ifndef __SELFTEST_H__8#define __SELFTEST_H__9 10#include <linux/compiler.h>11 12#define selftest(name, func) int func(void);13#include "selftests.h"14#undef selftest15 16struct subtest {17	int (*func)(void *data);18	const char *name;19};20 21int __subtests(const char *caller,22	       const struct subtest *st,23	       int count,24	       void *data);25#define subtests(T, data) \26	__subtests(__func__, T, ARRAY_SIZE(T), data)27 28#define SUBTEST(x) { x, #x }29 30#endif /* __SELFTEST_H__ */31