aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/timers/posix_timers.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/timers/posix_timers.c')
-rw-r--r--tools/testing/selftests/timers/posix_timers.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c
index f87d970a485c..5a246a02dff3 100644
--- a/tools/testing/selftests/timers/posix_timers.c
+++ b/tools/testing/selftests/timers/posix_timers.c
@@ -35,10 +35,11 @@ static void user_loop(void)
35static void kernel_loop(void) 35static void kernel_loop(void)
36{ 36{
37 void *addr = sbrk(0); 37 void *addr = sbrk(0);
38 int err = 0;
38 39
39 while (!done) { 40 while (!done && !err) {
40 brk(addr + 4096); 41 err = brk(addr + 4096);
41 brk(addr); 42 err |= brk(addr);
42 } 43 }
43} 44}
44 45
@@ -190,8 +191,6 @@ static int check_timer_create(int which)
190 191
191int main(int argc, char **argv) 192int main(int argc, char **argv)
192{ 193{
193 int err;
194
195 printf("Testing posix timers. False negative may happen on CPU execution \n"); 194 printf("Testing posix timers. False negative may happen on CPU execution \n");
196 printf("based timers if other threads run on the CPU...\n"); 195 printf("based timers if other threads run on the CPU...\n");
197 196