cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

selftest.h (549B)


      1// SPDX-License-Identifier: MIT
      2
      3/*
      4 * Copyright © 2019 Intel Corporation
      5 */
      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 selftest
     15
     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__ */