summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile3
-rw-r--r--test/Test.mak2
-rw-r--r--test/crypt/md5c-test.c2
-rw-r--r--test/malloc/malloc.c2
-rw-r--r--test/malloc/testmalloc.c16
-rw-r--r--test/malloc/time_malloc.c2
-rw-r--r--test/math/libm-test.inc12
-rw-r--r--test/math/rint.c2
-rw-r--r--test/misc/bug-glob2.c4
-rw-r--r--test/pthread/ex7.c6
-rw-r--r--test/regex/testregex.c2
-rw-r--r--test/setjmp/bug269-setjmp.c2
-rw-r--r--test/stdlib/teststrtol.c2
-rw-r--r--test/string/tester.c2
-rw-r--r--test/time/time.c2
15 files changed, 32 insertions, 29 deletions
diff --git a/test/Makefile b/test/Makefile
index 420bc05b4..dfc42ed75 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -38,6 +38,9 @@ endif
ifeq ($(UCLIBC_HAS_CRYPT_STUB),y)
DIRS := $(filter-out crypt,$(DIRS))
endif
+ifeq ($(HAS_NO_THREADS),y)
+ DIRS := $(filter-out pthread,$(DIRS))
+endif
DIRS := $(filter-out math,$(DIRS))
diff --git a/test/Test.mak b/test/Test.mak
index 189e3368b..015c3bcb9 100644
--- a/test/Test.mak
+++ b/test/Test.mak
@@ -30,6 +30,7 @@ endif
ifeq ($(UCLIBC_ONLY),)
TARGETS += $(G_TARGETS)
endif
+
CLEAN_TARGETS := $(U_TARGETS) $(G_TARGETS)
COMPILE_TARGETS := $(TARGETS)
RUN_TARGETS := $(patsubst %,%.exe,$(TARGETS))
@@ -64,7 +65,6 @@ define exec_test
test -z "$$expected_ret" && export expected_ret=0 ; \
if ! test $$ret -eq $$expected_ret ; then \
echo "ret == $$ret ; expected_ret == $$expected_ret" ; \
- cat "$(binary_name).out" ; \
exit 1 ; \
fi
$(SCAT) "$(binary_name).out"
diff --git a/test/crypt/md5c-test.c b/test/crypt/md5c-test.c
index e2896b5b1..3c6154021 100644
--- a/test/crypt/md5c-test.c
+++ b/test/crypt/md5c-test.c
@@ -10,7 +10,7 @@ main (int argc, char *argv[])
char *cp;
cp = crypt ("Hello world!", salt);
- if (strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp)) {
+ if (strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp)) {
fprintf(stderr, "Failed md5 crypt test!\n");
return EXIT_FAILURE;
}
diff --git a/test/malloc/malloc.c b/test/malloc/malloc.c
index d63856845..ca7c5f927 100644
--- a/test/malloc/malloc.c
+++ b/test/malloc/malloc.c
@@ -67,7 +67,7 @@ int test2(void)
} else {
free(ptr);
}
-
+
ptr = malloc(100);
ptr = realloc(ptr, 0);
if (ptr) {
diff --git a/test/malloc/testmalloc.c b/test/malloc/testmalloc.c
index caf08a9e1..42707d231 100644
--- a/test/malloc/testmalloc.c
+++ b/test/malloc/testmalloc.c
@@ -27,7 +27,7 @@ int main(void)
free(y);
printf("about to free(0)\n");
free(0);
-
+
x=malloc(13);
printf("x = %p\n", x);
memcpy(x, "Small string", 13);
@@ -37,8 +37,8 @@ int main(void)
memcpy(y, "********** Larger string **********", 36);
printf("0x%p test string2: %s\n", y, (char *)y);
free(y);
-
-
+
+
printf("Allocate 100 nodes 500 bytes each\n");
save = 0;
for (i=0; i<100; i++) {
@@ -50,14 +50,14 @@ int main(void)
lp->next = save;
save = lp;
}
-
+
printf("freeing 100 nodes\n");
while (save) {
lp = save;
save = save->next;
free(lp);
}
-
+
printf("try realloc 100 times \n");
lp = 0;
for (i=1; i<=100; i++) {
@@ -71,7 +71,7 @@ int main(void)
void *unused_ret = realloc(lp, 0);
(void) unused_ret;
}
-
+
printf("Allocate another 100 nodes 600 bytes each\n");
save = 0;
for (i=0; i<100; i++) {
@@ -83,14 +83,14 @@ int main(void)
lp->next = save;
save = lp;
}
-
+
printf("freeing 100 nodes\n");
while (save) {
lp = save;
save = save->next;
free(lp);
}
-
+
printf("alloc test PASSED\n");
exit(0);
diff --git a/test/malloc/time_malloc.c b/test/malloc/time_malloc.c
index 64195107d..0b626654f 100644
--- a/test/malloc/time_malloc.c
+++ b/test/malloc/time_malloc.c
@@ -1,6 +1,6 @@
#include <stdlib.h>
#define REPS (100000)
-int sizes[] = {
+int sizes[] = {
100000, 1024, 42000, 350, 100, 80, 3 ,3,3,3,3,3,3,3,3,3,3,3,3,50,
100000, 1024, 42000, 350, 100, 80, 3 ,3,3,3,3,3,3,3,3,3,3,3,3,50,
100000, 1024, 42000, 350, 100, 80, 3 ,3,3,3,3,3,3,3,3,3,3,3,3,50,
diff --git a/test/math/libm-test.inc b/test/math/libm-test.inc
index be6312930..c9c2c8b41 100644
--- a/test/math/libm-test.inc
+++ b/test/math/libm-test.inc
@@ -4182,14 +4182,14 @@ round_test (void)
/* The result can only be represented in long double. */
TEST_f_f (round, 4503599627370495.5L, 4503599627370496.0L);
TEST_f_f (round, 4503599627370496.25L, 4503599627370496.0L);
- TEST_f_f (round, 4503599627370496.5L, 4503599627370497.0L);
+ TEST_f_f (round, 4503599627370496.5L, 4503599627370497.0L);
TEST_f_f (round, 4503599627370496.75L, 4503599627370497.0L);
- TEST_f_f (round, 4503599627370497.5L, 4503599627370498.0L);
+ TEST_f_f (round, 4503599627370497.5L, 4503599627370498.0L);
- TEST_f_f (round, -4503599627370495.5L, -4503599627370496.0L);
- TEST_f_f (round, -4503599627370496.25L, -4503599627370496.0L);
+ TEST_f_f (round, -4503599627370495.5L, -4503599627370496.0L);
+ TEST_f_f (round, -4503599627370496.25L, -4503599627370496.0L);
TEST_f_f (round, -4503599627370496.5L, -4503599627370497.0L);
- TEST_f_f (round, -4503599627370496.75L, -4503599627370497.0L);
+ TEST_f_f (round, -4503599627370496.75L, -4503599627370497.0L);
TEST_f_f (round, -4503599627370497.5L, -4503599627370498.0L);
TEST_f_f (round, 9007199254740991.5L, 9007199254740992.0L);
@@ -4640,7 +4640,7 @@ trunc_test (void)
TEST_f_f (trunc, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L);
TEST_f_f (trunc, 10141204801825835211973625643008.5L, 10141204801825835211973625643008.0L);
TEST_f_f (trunc, 10141204801825835211973625643008.75L, 10141204801825835211973625643008.0L);
- TEST_f_f (trunc, 10141204801825835211973625643009.5L, 10141204801825835211973625643009.0L);
+ TEST_f_f (trunc, 10141204801825835211973625643009.5L, 10141204801825835211973625643009.0L);
#endif
END (trunc);
diff --git a/test/math/rint.c b/test/math/rint.c
index 399fb90e3..04c195385 100644
--- a/test/math/rint.c
+++ b/test/math/rint.c
@@ -6,6 +6,6 @@ int main(void) {
double d1, d2;
d1 = 0.6; d2 = rint(d1);
printf("d1 = %f, d2 = %f\n", d1, d2);
- return 0;
+ return 0;
}
diff --git a/test/misc/bug-glob2.c b/test/misc/bug-glob2.c
index 9e8be983b..f8b030e2c 100644
--- a/test/misc/bug-glob2.c
+++ b/test/misc/bug-glob2.c
@@ -275,7 +275,7 @@ do_test (void)
!= GLOB_ABORTED)
{
puts ("glob did not fail with GLOB_ABORTED");
- exit (EXIT_FAILURE);
+ exit (EXIT_FAILURE);
}
globfree (&gl);
@@ -287,7 +287,7 @@ do_test (void)
if (glob ("dir2/*", GLOB_DOOFFS, NULL, &gl) != GLOB_NOMATCH)
{
puts ("glob did not fail with GLOB_NOMATCH");
- exit (EXIT_FAILURE);
+ exit (EXIT_FAILURE);
}
globfree (&gl);
diff --git a/test/pthread/ex7.c b/test/pthread/ex7.c
index 9cf30aa19..49af18d96 100644
--- a/test/pthread/ex7.c
+++ b/test/pthread/ex7.c
@@ -48,13 +48,13 @@ test_thread (void *ms_param)
status = pthread_cond_timedwait(&foo.cond, &foo.mutex, &timeout);
}
pthread_mutex_unlock(&foo.mutex);
-
+
/* post the main event */
pthread_mutex_lock(&main_event.mutex);
main_event.flag = 1;
pthread_cond_signal(&main_event.cond);
pthread_mutex_unlock(&main_event.mutex);
-
+
/* that's it, bye */
return (void*) status;
}
@@ -95,7 +95,7 @@ main (void)
printf ("count = %lu\n", count);
}
-
+
usleep (10);
}
diff --git a/test/regex/testregex.c b/test/regex/testregex.c
index 3be8680db..3992c2647 100644
--- a/test/regex/testregex.c
+++ b/test/regex/testregex.c
@@ -1950,7 +1950,7 @@ main(int argc, char** argv)
else
#endif
fun = "regexec";
-
+
for (i = 0; i < elementsof(match); i++)
match[i] = state.NOMATCH;
diff --git a/test/setjmp/bug269-setjmp.c b/test/setjmp/bug269-setjmp.c
index 33431fa19..b11ac7b24 100644
--- a/test/setjmp/bug269-setjmp.c
+++ b/test/setjmp/bug269-setjmp.c
@@ -30,7 +30,7 @@ int n_x = 6;
static int g_counter = 0;
static int
-f (void)
+f (void)
{
static int counter = 0;
static int way_point1 = 3;
diff --git a/test/stdlib/teststrtol.c b/test/stdlib/teststrtol.c
index e959b4990..5b43a9b0c 100644
--- a/test/stdlib/teststrtol.c
+++ b/test/stdlib/teststrtol.c
@@ -10,7 +10,7 @@ const char *strings[]={
"10000000", "100000000", "1000000000",
/* negative */
- "-0", "-1", "-10",
+ "-0", "-1", "-10",
"-100", "-1000", "-10000", "-100000", "-1000000",
"-10000000", "-100000000", "-1000000000",
diff --git a/test/string/tester.c b/test/string/tester.c
index 647b8c174..ac1b90118 100644
--- a/test/string/tester.c
+++ b/test/string/tester.c
@@ -1089,7 +1089,7 @@ test_memcmp (void)
{
int i, cnt = 1;
char one[21], two[21];
-
+
it = "memcmp";
check(memcmp("a", "a", 1) == 0, cnt++); /* Identity. */
check(memcmp("abc", "abc", 3) == 0, cnt++); /* Multicharacter. */
diff --git a/test/time/time.c b/test/time/time.c
index c97c4f5ef..a4d68d50f 100644
--- a/test/time/time.c
+++ b/test/time/time.c
@@ -4,7 +4,7 @@
/* We use this instead of memcmp because some broken C libraries
* add additional nonstandard fields to struct tm... */
-
+
int tm_cmp(struct tm tm1, struct tm tm2)
{
return tm1.tm_sec != tm2.tm_sec ||