1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
4 * Alexey Kodanev <alexey.kodanev@oracle.com>
5 */
6
7 #ifndef TST_MODULE_H
8 #define TST_MODULE_H
9
10 void tst_module_exists_(void (cleanup_fn)(void), const char *mod_name,
11 char **mod_path);
12
tst_module_exists(const char * mod_name,char ** mod_path)13 static inline void tst_module_exists(const char *mod_name, char **mod_path)
14 {
15 tst_module_exists_(NULL, mod_name, mod_path);
16 }
17
18 void tst_module_load_(void (cleanup_fn)(void), const char *mod_name,
19 char *const argv[]);
20
tst_module_load(const char * mod_name,char * const argv[])21 static inline void tst_module_load(const char *mod_name, char *const argv[])
22 {
23 tst_module_load_(NULL, mod_name, argv);
24 }
25
26 void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name);
27
tst_module_unload(const char * mod_name)28 static inline void tst_module_unload(const char *mod_name)
29 {
30 tst_module_unload_(NULL, mod_name);
31 }
32
33 #endif /* TST_MODULE_H */
34