mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
tests/pm_rps: ducttape for igt fork helper cleanup issues
We don't call cleanup handlers when exiting a subtest currently, only when exiting the entire binary. Which means pm_rps falls over when it fails more than one subtest. Cc: Jeff McGee <jeff.mcgee@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
f962dee636
commit
5188bbe23e
@ -196,9 +196,27 @@ static void emit_store_dword_imm(uint32_t val)
|
||||
}
|
||||
|
||||
#define LOAD_HELPER_PAUSE_USEC 500
|
||||
static void load_helper_set_load(enum load load)
|
||||
{
|
||||
assert(lh.igt_proc.running);
|
||||
|
||||
if (lh.load == load)
|
||||
return;
|
||||
|
||||
lh.load = load;
|
||||
kill(lh.igt_proc.pid, SIGUSR2);
|
||||
}
|
||||
|
||||
static void load_helper_run(enum load load)
|
||||
{
|
||||
assert(!lh.igt_proc.running);
|
||||
/*
|
||||
* FIXME fork helpers won't get cleaned up when started from within a
|
||||
* subtest, so handle the case where it sticks around a bit too long.
|
||||
*/
|
||||
if (lh.igt_proc.running) {
|
||||
load_helper_set_load(load);
|
||||
return;
|
||||
}
|
||||
|
||||
igt_require(lh.ready == true);
|
||||
|
||||
@ -229,20 +247,8 @@ static void load_helper_run(enum load load)
|
||||
}
|
||||
}
|
||||
|
||||
static void load_helper_set_load(enum load load)
|
||||
{
|
||||
assert(lh.igt_proc.running);
|
||||
|
||||
if (lh.load == load)
|
||||
return;
|
||||
|
||||
lh.load = load;
|
||||
kill(lh.igt_proc.pid, SIGUSR2);
|
||||
}
|
||||
|
||||
static void load_helper_stop(void)
|
||||
{
|
||||
assert(lh.igt_proc.running);
|
||||
kill(lh.igt_proc.pid, SIGUSR1);
|
||||
igt_wait_helper(&lh.igt_proc);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user