diff options
author | Thomas Haller <thaller@redhat.com> | 2020-04-16 12:37:19 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-04-16 14:40:18 (GMT) |
commit | bae11ec1a2e1e0421dc10cfc5cbc2aeb80791aab (patch) | |
tree | 71e6aa1b2fcba6034fa6074029e2f2a5fb17d202 /tests | |
parent | 2d50b04d33fc719faa0b7998fb1339df672aa849 (diff) | |
download | libnl-bae11ec1a2e1e0421dc10cfc5cbc2aeb80791aab.zip libnl-bae11ec1a2e1e0421dc10cfc5cbc2aeb80791aab.tar.gz libnl-bae11ec1a2e1e0421dc10cfc5cbc2aeb80791aab.tar.bz2 |
tests: add "check-direct" test
We already have check-all unit test, which links dynamically to the libraries.
That means, certain symbols won't be accessible, because they are hidden
by the linker symbol versioning file. Add "check-direct", which links statically
against the libraries.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check-direct.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/check-direct.c b/tests/check-direct.c new file mode 100644 index 0000000..18600d0 --- /dev/null +++ b/tests/check-direct.c @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#include <check.h> + +START_TEST(static_checks) +{ +} +END_TEST + +static Suite *make_suite(void) +{ + Suite *suite = suite_create("Direct"); + + TCase *nl_attr = tcase_create("Core"); + tcase_add_test(nl_attr, static_checks); + suite_add_tcase(suite, nl_attr); + return suite; +} + +int main(int argc, char *argv[]) +{ + SRunner *runner; + int nfailed; + + runner = srunner_create(suite_create("main")); + + srunner_add_suite(runner, make_suite()); + + srunner_run_all(runner, CK_ENV); + + nfailed = srunner_ntests_failed(runner); + srunner_free(runner); + return nfailed != 0; +} |