visibility.h (7ae9fb1b7ecbb5d85d07857943f677fd1a559b18) | visibility.h (a4311c274e08001b129bd5ffd2a41dcbd3e0a855) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * KUnit API to allow symbols to be conditionally visible during KUnit 4 * testing 5 * 6 * Copyright (C) 2022, Google LLC. 7 * Author: Rae Moar <rmoar@google.com> 8 */ --- 8 unchanged lines hidden (view full) --- 17 * there is no change to the symbol definition. 18 */ 19 #define VISIBLE_IF_KUNIT 20 /** 21 * EXPORT_SYMBOL_IF_KUNIT(symbol) - Exports symbol into 22 * EXPORTED_FOR_KUNIT_TESTING namespace only if CONFIG_KUNIT is 23 * enabled. Must use MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING) 24 * in test file in order to use symbols. | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * KUnit API to allow symbols to be conditionally visible during KUnit 4 * testing 5 * 6 * Copyright (C) 2022, Google LLC. 7 * Author: Rae Moar <rmoar@google.com> 8 */ --- 8 unchanged lines hidden (view full) --- 17 * there is no change to the symbol definition. 18 */ 19 #define VISIBLE_IF_KUNIT 20 /** 21 * EXPORT_SYMBOL_IF_KUNIT(symbol) - Exports symbol into 22 * EXPORTED_FOR_KUNIT_TESTING namespace only if CONFIG_KUNIT is 23 * enabled. Must use MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING) 24 * in test file in order to use symbols. |
25 * @symbol: the symbol identifier to export |
|
25 */ 26 #define EXPORT_SYMBOL_IF_KUNIT(symbol) EXPORT_SYMBOL_NS(symbol, \ 27 EXPORTED_FOR_KUNIT_TESTING) 28#else 29 #define VISIBLE_IF_KUNIT static 30 #define EXPORT_SYMBOL_IF_KUNIT(symbol) 31#endif 32 33#endif /* _KUNIT_VISIBILITY_H */ | 26 */ 27 #define EXPORT_SYMBOL_IF_KUNIT(symbol) EXPORT_SYMBOL_NS(symbol, \ 28 EXPORTED_FOR_KUNIT_TESTING) 29#else 30 #define VISIBLE_IF_KUNIT static 31 #define EXPORT_SYMBOL_IF_KUNIT(symbol) 32#endif 33 34#endif /* _KUNIT_VISIBILITY_H */ |