mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-13 02:46:23 +00:00
tests/drv_hangman: Open drm fd before doing anything
This way we correctly auto-skip instead of falling over the lack of i915 debugfs files first and fail the testcase due to that. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
ee0808982f
commit
6cf72724e2
@ -217,10 +217,11 @@ static void test_error_state_basic(void)
|
|||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
|
fd = drm_open_driver(DRIVER_INTEL);
|
||||||
|
|
||||||
clear_error_state();
|
clear_error_state();
|
||||||
assert_error_state_clear();
|
assert_error_state_clear();
|
||||||
|
|
||||||
fd = drm_open_driver(DRIVER_INTEL);
|
|
||||||
submit_batch(fd, I915_EXEC_RENDER, true);
|
submit_batch(fd, I915_EXEC_RENDER, true);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
@ -373,9 +374,10 @@ static void test_error_state_capture(unsigned ring_id,
|
|||||||
uint64_t offset;
|
uint64_t offset;
|
||||||
bool cmd_parser;
|
bool cmd_parser;
|
||||||
|
|
||||||
|
fd = drm_open_driver(DRIVER_INTEL);
|
||||||
|
|
||||||
clear_error_state();
|
clear_error_state();
|
||||||
|
|
||||||
fd = drm_open_driver(DRIVER_INTEL);
|
|
||||||
gen = intel_gen(intel_get_drm_devid(fd));
|
gen = intel_gen(intel_get_drm_devid(fd));
|
||||||
cmd_parser = uses_cmd_parser(fd, gen);
|
cmd_parser = uses_cmd_parser(fd, gen);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user