fix tls_align_dlopen
[libc-test] / src / functional / tls_align_dlopen.c
index 64517e1..3f7ae34 100644 (file)
@@ -12,19 +12,18 @@ int main()
                unsigned long addr;
        } *t;
 
-       h = dlopen("./tls_align_dso.so", RTLD_LAZY);
+       h = dlopen("src/functional/tls_align_dso.so", RTLD_LAZY);
        if (!h)
-               error("dlopen failed\n");
+               t_error("dlopen failed\n");
        t = dlsym(h, "t");
        if (!t)
-               error("dlsym failed\n");
-
-       for (i = 0; i < 4; i++) {
+               t_error("dlsym failed\n");
+       else for (i = 0; i < 4; i++) {
                if (!t[i].name)
-                       error("name is not set for t[%d]\n", i);
+                       t_error("name is not set for t[%d]\n", i);
                if (t[i].addr & (t[i].align-1))
-                       error("bad alignment: %s, size: %u, align: %u, addr: 0x%lx\n",
+                       t_error("bad alignment: %s, size: %u, align: %u, addr: 0x%lx\n",
                                t[i].name, t[i].size, t[i].align, t[i].addr);
        }
-       return test_status;
+       return t_status;
 }