Re: [RFC i-g-t v3] tests/gem_exec_pad_to_size: Test object padding at execbuf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 04/01/2015 05:39 PM, Chris Wilson wrote:
On Wed, Apr 01, 2015 at 05:31:16PM +0100, Chris Wilson wrote:
On Wed, Apr 01, 2015 at 05:07:25PM +0100, Tvrtko Ursulin wrote:

On 04/01/2015 04:42 PM, Chris Wilson wrote:
On Wed, Apr 01, 2015 at 04:14:52PM +0100, Tvrtko Ursulin wrote:
+	/* Re-exec with padding set. */
+	igt_assert(exec(fd, eb_handles, pad_to_size, offsets) == 0);

The crux of the test is that we generate two objects such that

B_offset = A_offset + A_size

and then tell the kernel that A is actually 2*size (A_pad_to_size)

+	if (offsets[1] > offsets[0])
+		distance = offsets[1] - offsets[0];
+	else
+		distance = offsets[0] - offsets[1];

The assertion I feel should only be that

B_offset + B_size <= A_offset && B_offset >= A_offset + A_pad_to_size

I don't get this. B starts after A + padding, but B ends before A?

s/&&/||/

Sorry &&. Gah, must be time for a coffee break.

The assertion is that the objects do not overlap based on the pad_to_size we
expect the kernel to apply, rather than their natural size. If the
kernel doesn't move the objects, they would it would fail.

You know all this time I didn't realize you were saying me check was broken, just that it was confusing. :)

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux