mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	tests/gem_wait_render_timeout: Convert to subtests
I want to add a bunch of api tests besides the functional "render-timeout" testcase. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
		
							parent
							
								
									5da8b8db02
								
							
						
					
					
						commit
						e4753d2d96
					
				
							
								
								
									
										2
									
								
								tests/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								tests/.gitignore
									
									
									
									
										vendored
									
									
								
							@ -104,7 +104,7 @@ gem_tiling_max_stride
 | 
			
		||||
gem_unfence_active_buffers
 | 
			
		||||
gem_unref_active_buffers
 | 
			
		||||
gem_userptr_blits
 | 
			
		||||
gem_wait_render_timeout
 | 
			
		||||
gem_wait
 | 
			
		||||
gem_write_read_ring_switch
 | 
			
		||||
gem_workarounds
 | 
			
		||||
gen3_mixed_blits
 | 
			
		||||
 | 
			
		||||
@ -136,7 +136,7 @@ TESTS_progs = \
 | 
			
		||||
	gem_tiling_max_stride \
 | 
			
		||||
	gem_unfence_active_buffers \
 | 
			
		||||
	gem_unref_active_buffers \
 | 
			
		||||
	gem_wait_render_timeout \
 | 
			
		||||
	gem_wait \
 | 
			
		||||
	gem_workarounds \
 | 
			
		||||
	gen3_mixed_blits \
 | 
			
		||||
	gen3_render_linear_blits \
 | 
			
		||||
 | 
			
		||||
@ -106,12 +106,12 @@ static void blt_color_fill(struct intel_batchbuffer *batch,
 | 
			
		||||
	ADVANCE_BATCH();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
igt_simple_main
 | 
			
		||||
static void render_timeout(int fd)
 | 
			
		||||
{
 | 
			
		||||
	drm_intel_bufmgr *bufmgr;
 | 
			
		||||
	struct intel_batchbuffer *batch;
 | 
			
		||||
	uint64_t timeout = ENOUGH_WORK_IN_SECONDS * NSEC_PER_SEC;
 | 
			
		||||
	int fd, ret;
 | 
			
		||||
	int ret;
 | 
			
		||||
	const bool do_signals = true; /* signals will seem to make the operation
 | 
			
		||||
				       * use less process CPU time */
 | 
			
		||||
	bool done = false;
 | 
			
		||||
@ -119,8 +119,6 @@ igt_simple_main
 | 
			
		||||
 | 
			
		||||
	igt_skip_on_simulation();
 | 
			
		||||
 | 
			
		||||
	fd = drm_open_any();
 | 
			
		||||
 | 
			
		||||
	bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
 | 
			
		||||
	drm_intel_bufmgr_gem_enable_reuse(bufmgr);
 | 
			
		||||
	batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
 | 
			
		||||
@ -217,3 +215,18 @@ igt_simple_main
 | 
			
		||||
 | 
			
		||||
	close(fd);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int drm_fd;
 | 
			
		||||
 | 
			
		||||
igt_main
 | 
			
		||||
{
 | 
			
		||||
	igt_fixture
 | 
			
		||||
		drm_fd = drm_open_any();
 | 
			
		||||
 | 
			
		||||
	igt_subtest("render_timeout")
 | 
			
		||||
		render_timeout(drm_fd);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	igt_fixture
 | 
			
		||||
		close(drm_fd);
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user