mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 08:57:58 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (c) 2013 Google, Inc.
|
|
*/
|
|
|
|
#ifndef __TEST_TEST_H
|
|
#define __TEST_TEST_H
|
|
|
|
#include <malloc.h>
|
|
|
|
/*
|
|
* struct unit_test_state - Entire state of test system
|
|
*
|
|
* @fail_count: Number of tests that failed
|
|
* @start: Store the starting mallinfo when doing leak test
|
|
* @priv: A pointer to some other info some suites want to track
|
|
* @of_root: Record of the livetree root node (used for setting up tests)
|
|
*/
|
|
struct unit_test_state {
|
|
int fail_count;
|
|
struct mallinfo start;
|
|
void *priv;
|
|
struct device_node *of_root;
|
|
};
|
|
|
|
/**
|
|
* struct unit_test - Information about a unit test
|
|
*
|
|
* @name: Name of test
|
|
* @func: Function to call to perform test
|
|
* @flags: Flags indicated pre-conditions for test
|
|
*/
|
|
struct unit_test {
|
|
const char *file;
|
|
const char *name;
|
|
int (*func)(struct unit_test_state *state);
|
|
int flags;
|
|
};
|
|
|
|
/* Declare a new unit test */
|
|
#define UNIT_TEST(_name, _flags, _suite) \
|
|
ll_entry_declare(struct unit_test, _name, _suite) = { \
|
|
.file = __FILE__, \
|
|
.name = #_name, \
|
|
.flags = _flags, \
|
|
.func = _name, \
|
|
}
|
|
|
|
|
|
#endif /* __TEST_TEST_H */
|