Xen Test Framework
weak-defaults.c
Go to the documentation of this file.
1 /*
2  * @file common/weak-defaults.c
3  *
4  * Default implementations of functions called by common code, which may need
5  * arch or environment specific implementations.
6  */
7 #include <xtf/framework.h>
8 #include <xtf/types.h>
9 
10 const char __weak environment_description[] = "Unknown";
11 
12 void __weak arch_setup(void)
13 {
14 }
15 
16 void __weak test_setup(void)
17 {
18 }
19 
21  char **str, char *end, const char **fmt_ptr, const void *arg,
22  int width, int precision, unsigned int flags)
23 {
24  return false;
25 }
26 
28 {
29  /* panic() has failed. Sit in a tight loop. */
30  for ( ;; )
31  ;
32  unreachable();
33 }
34 
35 /*
36  * Local variables:
37  * mode: C
38  * c-file-style: "BSD"
39  * c-basic-offset: 4
40  * tab-width: 4
41  * indent-tabs-mode: nil
42  * End:
43  */
Common declarations for all tests.
#define __noreturn
Definition: compiler.h:10
bool arch_fmt_pointer(char **str, char *end, const char **fmt_ptr, const void *arg, int width, int precision, unsigned int flags)
Definition: weak-defaults.c:20
Interfaces used by common code, needing to be implemented by arch/environment specific code...
void arch_crash_hard(void)
Definition: weak-defaults.c:27
static unsigned int str(void)
Definition: lib.h:366
void test_setup(void)
Definition: weak-defaults.c:16
#define unreachable()
Definition: compiler.h:29
void arch_setup(void)
Definition: weak-defaults.c:12
const char environment_description[]
Definition: weak-defaults.c:10
#define __weak
Definition: compiler.h:15