tests/ivi: rename test_section
authorPekka Paalanen <pekka.paalanen@collabora.com>
Mon, 11 Nov 2019 13:18:51 +0000 (15:18 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.com>
Fri, 22 Nov 2019 14:09:20 +0000 (16:09 +0200)
Use a different section name to make sure that if this plugin is loaded into
the same process as where weston-test-runner.h is used, the two different
sections cannot get mixed up. This is just a precaution, but it removes a bit
of reader confusion as well.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
tests/ivi-layout-test-plugin.c

index 561f5e5..9e7bb3d 100644 (file)
@@ -53,22 +53,23 @@ struct runner_test {
        static void runner_func_##name(struct test_context *);  \
                                                                \
        const struct runner_test runner_test_##name             \
-               __attribute__ ((section ("test_section"))) =    \
+               __attribute__ ((section ("plugin_test_section"))) =     \
        {                                                       \
                #name, runner_func_##name                       \
        };                                                      \
                                                                \
        static void runner_func_##name(struct test_context *ctx)
 
-extern const struct runner_test __start_test_section;
-extern const struct runner_test __stop_test_section;
+extern const struct runner_test __start_plugin_test_section;
+extern const struct runner_test __stop_plugin_test_section;
 
 static const struct runner_test *
 find_runner_test(const char *name)
 {
        const struct runner_test *t;
 
-       for (t = &__start_test_section; t < &__stop_test_section; t++) {
+       for (t = &__start_plugin_test_section;
+            t < &__stop_plugin_test_section; t++) {
                if (strcmp(t->name, name) == 0)
                        return t;
        }