Conversation
|
@yangbodong22011 i didn't think of nested tests, which in theory can happen not only at termination: to support that properly your fix is not enough (when regarding the use of |
|
@oranagra there's no generic solution to this, I'd stick with |
|
so we need to try one and fallback to the other? or detect the distro? |
|
AFAIR there's no |
On Linux, is it possible that |
|
@yangbodong22011 Looking now, I see that |
|
question is if |
1) cur_test: when restart_server, "no such variable" error occurs
./runtest --single integration/rdb
test {client freed during loading}
SET ::cur_test
restart_server
kill_server
test "Check for memory leaks (pid $pid)"
SET ::cur_test
UNSET ::cur_test
UNSET ::cur_test // This global variable has been unset.
2) `ps --ppid` not available on macOS platform, can be replaced with
`pgrep -P pid`.
46492e2 to
f22fa95
Compare
|
I made compatibility changes. Another change way is: Do you have any suggestions? |
|
@yangbodong22011 why are you re-introducing |
for
Okay, I will finish it later. |
|
@oranagra Can it be modified like this, when cur_test exists, call unset. |
|
@yangbodong22011 the problem is not only that i think the right thing to do is back up the old value when entering |
|
@yangbodong22011 i didn't understand your post:
the |
Reduce one line of code, Move |
- set fd [open "|ps --ppid $pid -o pid" "r"]
+ set fd [open "|ps --ppid $pid -o pid -h" "r"]why did you add |
|
|
but see b61b663 |
Oh, I understand, so I should clear why the |
if there are nested tests and nested servers, we need to restore the
previous value of cur_test when a test exist.
example:
```
test{test 1} {
start_server {
test{test 1.1 - master only} {
}
start_server {
test{test 1.2 - with replication} {
}
}
}
}
```
when `test 1.1 - master only exists`, we're still inside `test 1`
* Tests: Some fixes for macOS
1) cur_test: when restart_server, "no such variable" error occurs
./runtest --single integration/rdb
test {client freed during loading}
SET ::cur_test
restart_server
kill_server
test "Check for memory leaks (pid $pid)"
SET ::cur_test
UNSET ::cur_test
UNSET ::cur_test // This global variable has been unset.
2) `ps --ppid` not available on macOS platform, can be replaced with
`pgrep -P pid`.
* handle cur_test for nested tests
if there are nested tests and nested servers, we need to restore the
previous value of cur_test when a test exist.
example:
```
test{test 1} {
start_server {
test{test 1.1 - master only} {
}
start_server {
test{test 1.2 - with replication} {
}
}
}
}
```
when `test 1.1 - master only exists`, we're still inside `test 1`
Co-authored-by: Oran Agra <[email protected]>
1) cur_test: when restart_server, "no such variable" error occurs
The calling process is as follows:
fixd way:
I think unset can be cancelled, because every test will actively set at the beginning of the run.
@oranagra Do you have any suggestions?
2) ps --ppid
ps --ppidnot available on macOS platform, can be replaced withpgrep -P pid.