Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
8eb1d662
Commit
8eb1d662
authored
Jul 01, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zdtm: Factor out getting pid of test
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
693bf79f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
zdtm.sh
test/zdtm.sh
+7
-8
No files found.
test/zdtm.sh
View file @
8eb1d662
...
...
@@ -353,7 +353,6 @@ start_test()
local
tdir
=
$1
local
tname
=
$2
export
ZDTM_ROOT
TPID
=
`
readlink
-f
$tdir
`
/
$tname
.init.pid
killall
-9
$tname
>
/dev/null 2>&1
make
-C
$tdir
$tname
.cleanout
...
...
@@ -368,9 +367,10 @@ start_test()
fi
if
[
-z
"
$PIDNS
"
]
;
then
TPID
=
"
$test
.pid"
make
-C
$tdir
$tname
.pid
||
return
1
PID
=
`
cat
$test
.pid
`
||
return
1
else
TPID
=
$(
readlink
-f
$tdir
)
/
$tname
.init.pid
if
[
-z
"
$ZDTM_ROOT
"
]
;
then
mkdir
-p
dump
ZDTM_ROOT
=
`
mktemp
-d
/tmp/criu-root.XXXXXX
`
...
...
@@ -388,9 +388,12 @@ start_test()
return
1
fi
)
fi
PID
=
`
cat
"
$TPID
"
`
ps
-p
$PID
||
return
1
PID
=
`
cat
"
$TPID
"
`
||
return
1
if
!
ps
-p
$PID
;
then
echo
"Test failed to start"
return
1
fi
}
...
...
@@ -468,10 +471,6 @@ run_test()
fi
local
ddump
if
!
kill
-s
0
"
$PID
"
;
then
echo
"Got a wrong pid '
$PID
'"
return
1
fi
if
[
-f
"
${
test
}
.opts"
]
;
then
gen_args
=
"
$gen_args
$(
cat
"
${
test
}
.opts"
)
"
...
...
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