[i-g-t] tests/i915/gem_mmap_wc: Adjust loop to OBJECT_SIZE

Submitted by Katarzyna Dec on Feb. 7, 2019, 8:08 a.m.

Details

Message ID 20190207080804.23389-1-katarzyna.dec@intel.com
State New
Headers show
Series "tests/i915/gem_mmap_wc: Adjust loop to OBJECT_SIZE" ( rev: 1 ) in IGT

Not browsing as part of any series.

Commit Message

Katarzyna Dec Feb. 7, 2019, 8:08 a.m.
When we run test with INTEL_SIMULATION=1 we set OBJECT_SIZE
to 1M which is not reflected in test_close() loop.

Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
---
 tests/i915/gem_mmap_wc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/tests/i915/gem_mmap_wc.c b/tests/i915/gem_mmap_wc.c
index 110883eb..bff0fa2a 100644
--- a/tests/i915/gem_mmap_wc.c
+++ b/tests/i915/gem_mmap_wc.c
@@ -285,7 +285,7 @@  test_close(int fd)
 
 	memset(ptr, 0xcc, OBJECT_SIZE);
 	gem_close(fd, handle);
-	for (i = 0; i < 4096; i++)
+	for (i = 0; i < OBJECT_SIZE/4096; i++)
 		igt_assert(ptr[i*4096+i] == 0xcc);
 
 	munmap(ptr, OBJECT_SIZE);

Comments

Quoting Katarzyna Dec (2019-02-07 08:08:04)
> When we run test with INTEL_SIMULATION=1 we set OBJECT_SIZE
> to 1M which is not reflected in test_close() loop.

Why would you bother running this test on simulation? It's just a test
of the kernel reference counting.
-Chris
On Thu, Feb 07, 2019 at 08:11:28AM +0000, Chris Wilson wrote:
> Quoting Katarzyna Dec (2019-02-07 08:08:04)
> > When we run test with INTEL_SIMULATION=1 we set OBJECT_SIZE
> > to 1M which is not reflected in test_close() loop.
> 
> Why would you bother running this test on simulation? It's just a test
> of the kernel reference counting.
> -Chris
So why do we have different object size for simulation in this test when we
should not bother?
Btw - I am fixing a bug in your code.
I wanted to talk to you on irc, but something is not working for me....

Kasia :)
Quoting Katarzyna Dec (2019-02-07 08:34:44)
> On Thu, Feb 07, 2019 at 08:11:28AM +0000, Chris Wilson wrote:
> > Quoting Katarzyna Dec (2019-02-07 08:08:04)
> > > When we run test with INTEL_SIMULATION=1 we set OBJECT_SIZE
> > > to 1M which is not reflected in test_close() loop.
> > 
> > Why would you bother running this test on simulation? It's just a test
> > of the kernel reference counting.
> > -Chris
> So why do we have different object size for simulation in this test when we
> should not bother?

No idea. All hw interaction should be covered by selftests (this
certainly is), the raison d'etre for igt is to cover user observable
behaviour. For the simulator, we should just be able to use seftests
followed by bare uABI checks before moving onto real workloads.

> Btw - I am fixing a bug in your code.

Nope, that is nothing to do with me. Someone else thought is was a good
idea. I do not like having tests vary, make different tests.
-Chris