Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: tests/clock/clock_get_test.c

Issue 23464007: Update glibc revision (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Correct error checking Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <time.h> 9 #include <time.h>
10 #include <sys/time.h>
10 11
11 #define DEFERRED_STRINGIFY(symbol) #symbol 12 #define DEFERRED_STRINGIFY(symbol) #symbol
12 #define SHOW(symbol) \ 13 #define SHOW(symbol) \
13 do { \ 14 do { \
14 printf("Current definition for %s is \"%s\".\n", \ 15 printf("Current definition for %s is \"%s\".\n", \
15 #symbol, DEFERRED_STRINGIFY(symbol)); \ 16 #symbol, DEFERRED_STRINGIFY(symbol)); \
16 } while (0) 17 } while (0)
17 18
18 void ShowCurrentDefinitions(void) { 19 void ShowCurrentDefinitions(void) {
19 SHOW(CLOCK_REALTIME); 20 SHOW(CLOCK_REALTIME);
(...skipping 26 matching lines...) Expand all
46 int errs = 0; 47 int errs = 0;
47 48
48 ShowCurrentDefinitions(); 49 ShowCurrentDefinitions();
49 50
50 errs += TimeTest(clock_getres, CLOCK_REALTIME, 51 errs += TimeTest(clock_getres, CLOCK_REALTIME,
51 "clock_getres on realtime clock failed", 52 "clock_getres on realtime clock failed",
52 "Realtime clock resolution"); 53 "Realtime clock resolution");
53 errs += TimeTest(clock_getres, CLOCK_MONOTONIC, 54 errs += TimeTest(clock_getres, CLOCK_MONOTONIC,
54 "clock_getres on monotonic clock failed", 55 "clock_getres on monotonic clock failed",
55 "Monotonic clock resolution"); 56 "Monotonic clock resolution");
57 errs += TimeTest(clock_getres, CLOCK_PROCESS_CPUTIME_ID,
58 "clock_getres on process CPU-time clock failed",
59 "Process CPU-time clock resolution");
60 errs += TimeTest(clock_getres, CLOCK_THREAD_CPUTIME_ID,
61 "clock_getres on thread CPU-time clock failed",
62 "Thread CPU-time clock resolution");
56 errs += TimeTest(clock_gettime, CLOCK_REALTIME, 63 errs += TimeTest(clock_gettime, CLOCK_REALTIME,
57 "clock_gettime on realtime clock failed", 64 "clock_gettime on realtime clock failed",
58 "Realtime clock value"); 65 "Realtime clock value");
59 errs += TimeTest(clock_gettime, CLOCK_MONOTONIC, 66 errs += TimeTest(clock_gettime, CLOCK_MONOTONIC,
60 "clock_gettime on monotonic clock failed", 67 "clock_gettime on monotonic clock failed",
61 "Monotonic clock value"); 68 "Monotonic clock value");
69 errs += TimeTest(clock_gettime, CLOCK_PROCESS_CPUTIME_ID,
70 "clock_gettime on process CPU-time clock failed",
71 "Process CPU-time clock value");
72 errs += TimeTest(clock_gettime, CLOCK_THREAD_CPUTIME_ID,
73 "clock_gettime on thread CPU-time clock failed",
74 "Thread CPU-time clock value");
62 return errs; 75 return errs;
63 } 76 }
OLDNEW
« no previous file with comments | « TOOL_REVISIONS ('k') | tests/clock/clock_irt_test.c » ('j') | tests/clock/clock_test.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698