-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virsh_crash: Test to check environment behavior after test
The test crashes virsh. It can be used to check if the core file will be recorded and if the coredump will be reported. Signed-off-by: Sebastian Mitterle <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- virsh.crash: | ||
type = virsh_crash | ||
variants: | ||
- in_ci: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from time import sleep | ||
import logging as log | ||
|
||
from virttest import utils_misc | ||
|
||
|
||
# Using as lower capital is not the best way to do, but this is just a | ||
# workaround to avoid changing the entire file. | ||
logging = log.getLogger('avocado.' + __name__) | ||
|
||
|
||
def run(test, params, env): | ||
utils_misc.cmd_status_output("virsh event --all --loop > /dev/null 2>&1 &", | ||
shell=True) | ||
sleep(5) | ||
_, pid = utils_misc.cmd_status_output("pidof virsh", shell=True) | ||
utils_misc.cmd_status_output("kill -s SIGSEGV %s" % pid, shell=True) | ||
|