diff options
| author | Tom Yu <tlyu@mit.edu> | 2009-11-30 23:09:36 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2009-11-30 23:09:36 +0000 |
| commit | b6a2bb106c67280824362a64b1b04e62aabf3646 (patch) | |
| tree | 768c0ace37786a9613245c98633181a37e145c4d /src/tests/threads/prof1.c | |
| parent | bbb952ae5f5b7b8803de125b35dda3395155ddbb (diff) | |
| download | krb5-b6a2bb106c67280824362a64b1b04e62aabf3646.tar.gz krb5-b6a2bb106c67280824362a64b1b04e62aabf3646.tar.xz krb5-b6a2bb106c67280824362a64b1b04e62aabf3646.zip | |
Mark and reindent tests, with some exclusions
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23394 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests/threads/prof1.c')
| -rw-r--r-- | src/tests/threads/prof1.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/tests/threads/prof1.c b/src/tests/threads/prof1.c index 766bfa3d04..fba54e90a9 100644 --- a/src/tests/threads/prof1.c +++ b/src/tests/threads/prof1.c @@ -1,3 +1,4 @@ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -26,24 +27,24 @@ static void *worker(void *arg) long err; int i; const char *const names[] = { - "one", "two", "three", 0 + "one", "two", "three", 0 }; char **values; const char *mypath = (random() & 1) ? path : filename; while (!done) { - err = profile_init_path(mypath, &p); - if (err) { - com_err(prog, err, "calling profile_init(\"%s\")", mypath); - exit(1); - } - for (i = 0; i < 10; i++) { - values = 0; - err = profile_get_values(p, names, &values); - if (err == 0 && values != 0) - profile_free_list(values); - } - profile_release(p); + err = profile_init_path(mypath, &p); + if (err) { + com_err(prog, err, "calling profile_init(\"%s\")", mypath); + exit(1); + } + for (i = 0; i < 10; i++) { + values = 0; + err = profile_get_values(p, names, &values); + if (err == 0 && values != 0) + profile_free_list(values); + } + profile_release(p); } return 0; } @@ -52,11 +53,11 @@ static void *modifier(void *arg) { struct timespec req; while (!done) { - req.tv_sec = 0; - req.tv_nsec = random() & 499999999; - nanosleep(&req, 0); - utime(filename, 0); -/* printf("."), fflush(stdout); */ + req.tv_sec = 0; + req.tv_nsec = random() & 499999999; + nanosleep(&req, 0); + utime(filename, 0); +/* printf("."), fflush(stdout); */ } return 0; } @@ -68,7 +69,7 @@ int main(int argc, char *argv[]) prog = argv[0]; for (i = 0; i < nthreads; i++) { - assert(0 == pthread_create(&thr, 0, worker, 0)); + assert(0 == pthread_create(&thr, 0, worker, 0)); } sleep(1); pthread_create(&thr, 0, modifier, 0); |
