mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-12 17:02:57 +00:00
gem_lut_handle: Make the error checking explicit for LUT handling
What this test is interested in is the handling of the LUT for very large arrays, irrespective of whether such batch are actually executable. So adjust the pass/fail checks to be explicit in the error they are looking for, so that we do not conflate memory/aperture pressure as a failure in the LUT API. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65391 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
+21
-19
@@ -171,7 +171,9 @@ static int many_exec(int fd, uint32_t batch, int num_exec, int num_reloc, unsign
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define fail(x) assert(x == -1 && errno == ENOENT)
|
||||
#define _fail(x) ((x) == -1 && errno == ENOENT)
|
||||
#define fail(x) assert(_fail(x))
|
||||
#define pass(x) assert(!_fail(x))
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@@ -194,15 +196,15 @@ int main(int argc, char **argv)
|
||||
fail(exec(fd, handle, USE_LUT | BROKEN));
|
||||
|
||||
for (i = 2; i <= 65536; i *= 2) {
|
||||
do_or_die(many_exec(fd, handle, i-1, i-1, NORMAL));
|
||||
do_or_die(many_exec(fd, handle, i-1, i, NORMAL));
|
||||
do_or_die(many_exec(fd, handle, i-1, i+1, NORMAL));
|
||||
do_or_die(many_exec(fd, handle, i, i-1, NORMAL));
|
||||
do_or_die(many_exec(fd, handle, i, i, NORMAL));
|
||||
do_or_die(many_exec(fd, handle, i, i+1, NORMAL));
|
||||
do_or_die(many_exec(fd, handle, i+1, i-1, NORMAL));
|
||||
do_or_die(many_exec(fd, handle, i+1, i, NORMAL));
|
||||
do_or_die(many_exec(fd, handle, i+1, i+1, NORMAL));
|
||||
pass(many_exec(fd, handle, i-1, i-1, NORMAL));
|
||||
pass(many_exec(fd, handle, i-1, i, NORMAL));
|
||||
pass(many_exec(fd, handle, i-1, i+1, NORMAL));
|
||||
pass(many_exec(fd, handle, i, i-1, NORMAL));
|
||||
pass(many_exec(fd, handle, i, i, NORMAL));
|
||||
pass(many_exec(fd, handle, i, i+1, NORMAL));
|
||||
pass(many_exec(fd, handle, i+1, i-1, NORMAL));
|
||||
pass(many_exec(fd, handle, i+1, i, NORMAL));
|
||||
pass(many_exec(fd, handle, i+1, i+1, NORMAL));
|
||||
|
||||
fail(many_exec(fd, handle, i-1, i-1, NORMAL | BROKEN));
|
||||
fail(many_exec(fd, handle, i-1, i, NORMAL | BROKEN));
|
||||
@@ -214,15 +216,15 @@ int main(int argc, char **argv)
|
||||
fail(many_exec(fd, handle, i+1, i, NORMAL | BROKEN));
|
||||
fail(many_exec(fd, handle, i+1, i+1, NORMAL | BROKEN));
|
||||
|
||||
do_or_die(many_exec(fd, handle, i-1, i-1, USE_LUT));
|
||||
do_or_die(many_exec(fd, handle, i-1, i, USE_LUT));
|
||||
do_or_die(many_exec(fd, handle, i-1, i+1, USE_LUT));
|
||||
do_or_die(many_exec(fd, handle, i, i-1, USE_LUT));
|
||||
do_or_die(many_exec(fd, handle, i, i, USE_LUT));
|
||||
do_or_die(many_exec(fd, handle, i, i+1, USE_LUT));
|
||||
do_or_die(many_exec(fd, handle, i+1, i-1, USE_LUT));
|
||||
do_or_die(many_exec(fd, handle, i+1, i, USE_LUT));
|
||||
do_or_die(many_exec(fd, handle, i+1, i+1, USE_LUT));
|
||||
pass(many_exec(fd, handle, i-1, i-1, USE_LUT));
|
||||
pass(many_exec(fd, handle, i-1, i, USE_LUT));
|
||||
pass(many_exec(fd, handle, i-1, i+1, USE_LUT));
|
||||
pass(many_exec(fd, handle, i, i-1, USE_LUT));
|
||||
pass(many_exec(fd, handle, i, i, USE_LUT));
|
||||
pass(many_exec(fd, handle, i, i+1, USE_LUT));
|
||||
pass(many_exec(fd, handle, i+1, i-1, USE_LUT));
|
||||
pass(many_exec(fd, handle, i+1, i, USE_LUT));
|
||||
pass(many_exec(fd, handle, i+1, i+1, USE_LUT));
|
||||
|
||||
fail(many_exec(fd, handle, i-1, i-1, USE_LUT | BROKEN));
|
||||
fail(many_exec(fd, handle, i-1, i, USE_LUT | BROKEN));
|
||||
|
||||
Reference in New Issue
Block a user