Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
b980b856
Commit
b980b856
authored
Sep 10, 2012
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
failtest, tools: update for new timespec-using ccan/time module.
parent
2012d45e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
ccan/failtest/failtest.c
ccan/failtest/failtest.c
+3
-3
tools/Makefile
tools/Makefile
+1
-1
tools/ccanlint/async.c
tools/ccanlint/async.c
+1
-1
tools/tools.c
tools/tools.c
+2
-2
No files found.
ccan/failtest/failtest.c
View file @
b980b856
...
...
@@ -91,7 +91,7 @@ static int control_fd = -1;
/* If we're a child, this is the first call we did ourselves. */
static
struct
failtest_call
*
our_history_start
=
NULL
;
/* For printing runtime with --trace. */
static
struct
time
val
start
;
static
struct
time
spec
start
;
/* Set when failtest_hook returns FAIL_PROBE */
static
bool
probing
=
false
;
/* Table to track duplicates. */
...
...
@@ -761,7 +761,7 @@ static bool should_fail(struct failtest_call *call)
if
(
child
==
0
)
{
traceindent
++
;
if
(
tracef
)
{
struct
time
val
diff
;
struct
time
spec
diff
;
const
char
*
p
;
char
*
failpath
;
struct
failtest_call
*
c
;
...
...
@@ -776,7 +776,7 @@ static bool should_fail(struct failtest_call *call)
p
=
c
->
file
;
trace
(
"%u->%u (%u.%02u): %s (%s:%u)
\n
"
,
getppid
(),
getpid
(),
(
int
)
diff
.
tv_sec
,
(
int
)
diff
.
tv_
usec
/
1
0000
,
(
int
)
diff
.
tv_sec
,
(
int
)
diff
.
tv_
nsec
/
1000
0000
,
failpath
,
p
,
c
->
line
);
free
(
failpath
);
}
...
...
tools/Makefile
View file @
b980b856
ALL_TOOLS
=
tools/configurator/configurator tools/ccan_depends tools/doc_extract tools/namespacize tools/ccanlint/ccanlint
LDLIBS
=
-lrt
DEP_OBJS
=
ccan/grab_file/grab_file.o
\
ccan/noerr/noerr.o
\
ccan/read_write_all/read_write_all.o
\
...
...
tools/ccanlint/async.c
View file @
b980b856
...
...
@@ -70,7 +70,7 @@ static void run_more(void)
signal
(
SIGALRM
,
killme
);
itim
.
it_interval
.
tv_sec
=
itim
.
it_interval
.
tv_usec
=
0
;
itim
.
it_value
=
time
_from_msec
(
c
->
time_ms
);
itim
.
it_value
=
time
spec_to_timeval
(
time_from_msec
(
c
->
time_ms
)
);
setitimer
(
ITIMER_REAL
,
&
itim
,
NULL
);
c
->
status
=
system
(
c
->
command
);
...
...
tools/tools.c
View file @
b980b856
...
...
@@ -73,7 +73,7 @@ char *run_with_timeout(const void *ctx, const char *cmd,
int
p
[
2
];
char
*
ret
;
int
status
,
ms
;
struct
time
val
start
;
struct
time
spec
start
;
*
ok
=
false
;
if
(
pipe
(
p
)
!=
0
)
...
...
@@ -106,7 +106,7 @@ char *run_with_timeout(const void *ctx, const char *cmd,
signal
(
SIGALRM
,
killme
);
itim
.
it_interval
.
tv_sec
=
itim
.
it_interval
.
tv_usec
=
0
;
itim
.
it_value
=
time
_from_msec
(
*
timeout_ms
);
itim
.
it_value
=
time
spec_to_timeval
(
time_from_msec
(
*
timeout_ms
)
);
setitimer
(
ITIMER_REAL
,
&
itim
,
NULL
);
status
=
system
(
cmd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment