• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
4  * Copyright (c) Linux Test Project, 2016-2024
5  * Alexey Kodanev <alexey.kodanev@oracle.com>
6  */
7 
8 #ifndef TST_MODULE_H
9 #define TST_MODULE_H
10 
11 #include <stdbool.h>
12 
13 void tst_module_exists_(void (cleanup_fn)(void), const char *mod_name,
14 					 char **mod_path);
15 
tst_module_exists(const char * mod_name,char ** mod_path)16 static inline void tst_module_exists(const char *mod_name, char **mod_path)
17 {
18 	tst_module_exists_(NULL, mod_name, mod_path);
19 }
20 
21 void tst_module_load_(void (cleanup_fn)(void), const char *mod_name,
22 					char *const argv[]);
23 
tst_module_load(const char * mod_name,char * const argv[])24 static inline void tst_module_load(const char *mod_name, char *const argv[])
25 {
26 	tst_module_load_(NULL, mod_name, argv);
27 }
28 
29 void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name);
30 
tst_module_unload(const char * mod_name)31 static inline void tst_module_unload(const char *mod_name)
32 {
33 	tst_module_unload_(NULL, mod_name);
34 }
35 
36 bool tst_module_signature_enforced_(void);
37 
tst_module_signature_enforced(void)38 static inline bool tst_module_signature_enforced(void)
39 {
40 	return tst_module_signature_enforced_();
41 }
42 
43 void tst_requires_module_signature_disabled_(void);
44 
tst_requires_module_signature_disabled(void)45 static inline void tst_requires_module_signature_disabled(void)
46 {
47 	tst_requires_module_signature_disabled_();
48 }
49 
50 #endif /* TST_MODULE_H */
51