Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
79e6ab31
Commit
79e6ab31
authored
Oct 18, 2020
by
Yossi Gottlieb
Committed by
Oran Agra
Oct 27, 2020
Browse files
Fix tests failure on busybox systems. (#7916)
(cherry picked from commit
ef92f507
)
parent
b20af834
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/support/server.tcl
View file @
79e6ab31
...
@@ -94,7 +94,7 @@ proc kill_server config {
...
@@ -94,7 +94,7 @@ proc kill_server config {
proc is_alive config
{
proc is_alive config
{
set pid
[
dict get $config pid
]
set pid
[
dict get $config pid
]
if
{[
catch
{
exec
ps
-
p
$pid
}
err
]}
{
if
{[
catch
{
exec
kill
-
0
$pid
}
err
]}
{
return 0
return 0
}
else
{
}
else
{
return 1
return 1
...
...
tests/support/util.tcl
View file @
79e6ab31
...
@@ -508,7 +508,7 @@ proc populate {num prefix size} {
...
@@ -508,7 +508,7 @@ proc populate {num prefix size} {
proc get_child_pid
{
idx
}
{
proc get_child_pid
{
idx
}
{
set pid
[
srv $idx pid
]
set pid
[
srv $idx pid
]
if
{[
string match
{
*Darwin*
}
[
exec uname -a
]
]}
{
if
{[
file exists
"/usr/bin/pgrep"
]}
{
set fd
[
open
"|pgrep -P
$pid
"
"r"
]
set fd
[
open
"|pgrep -P
$pid
"
"r"
]
set child_pid
[
string trim
[
lindex
[
split
[
read $fd
]
\n
]
0
]]
set child_pid
[
string trim
[
lindex
[
split
[
read $fd
]
\n
]
0
]]
}
else
{
}
else
{
...
...
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