mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 03:58:27 +00:00 
			
		
		
		
	lib: add igt_assert_lt
Found one user in gem_wait.c Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
		
							parent
							
								
									e3f8eb58e6
								
							
						
					
					
						commit
						305fb1db5c
					
				@ -381,6 +381,19 @@ void igt_exit(void) __attribute__((noreturn));
 | 
			
		||||
 */
 | 
			
		||||
#define igt_assert_lte(n1, n2) igt_assert_cmpint(n1, <=, >, n2)
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * igt_assert_lt:
 | 
			
		||||
 * @n1: first integer
 | 
			
		||||
 * @n2: second integer
 | 
			
		||||
 *
 | 
			
		||||
 * Fails (sub-)test if the second integers is strictly smaller than the first.
 | 
			
		||||
 * Beware that for now this only works on integers.
 | 
			
		||||
 *
 | 
			
		||||
 * Like igt_assert(), but displays the values being compared on failure instead
 | 
			
		||||
 * of simply printing the stringified expression.
 | 
			
		||||
 */
 | 
			
		||||
#define igt_assert_lt(n1, n2) igt_assert_cmpint(n1, <, >=, n2)
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * igt_require:
 | 
			
		||||
 * @expr: condition to test
 | 
			
		||||
 | 
			
		||||
@ -157,7 +157,7 @@ static void render_timeout(int fd)
 | 
			
		||||
			iter <<= 1;
 | 
			
		||||
	} while (!done && iter < 1000000);
 | 
			
		||||
 | 
			
		||||
	igt_assert_cmpint(iter, <, >=, 1000000);
 | 
			
		||||
	igt_assert_lt(iter, 1000000);
 | 
			
		||||
 | 
			
		||||
	igt_info("%d iters is enough work\n", iter);
 | 
			
		||||
	gem_quiescent_gpu(fd);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user