glx: Add a testcase for GLX_EXT_buffer_age

v2: Indent according to piglit style, fix copyright message, drop
    redundant glReadBuffer() setting. (changes by anholt).

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adel Gadllah <adel.gadllah@gmail.com> (v2)
glx-buffer-age: Test each frame rendered, and render enough frames.

An implementation might have up to 4 (!) buffers in its queue, so
render a bunch of frames and make sure each frame has a valid age.

Reviewed-by: Adel Gadllah <adel.gadllah@gmail.com>
glx-buffer-age: Test with vblank_mode=0.

Revealed a problem with the Mesa patches.  Interestingly,
glXSwapIntervalMESA(0) doesn't produce the same behavior.

Reviewed-by: Adel Gadllah <adel.gadllah@gmail.com>
framework/status.py: Update some docstrings

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/tests/status_tests.py: add initialization tests

Just a few simple tests to ensure that the various status classes
initialize.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/status.py: Replace subclasses with constants

This patch replaces the flyweight children of Status with a single class
that is initialized with arguments, and provides constants. These
constants are mostly immutable in the cleanest way possible (they're not
if you really want to go after them, but short of Cython or a native C
extension it's impossible to make a truly immutable object in python).

What this provides for us is a simple, clean interface, a massive
reduction in code, and better compatibility for python 3 (the previous
implementation relied on a behavior of __slots__ that changed in python
3), and minimal API changes.

v2: - Replace patch that used abc.ABCMeta with this constant aproach

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
status_tests: New initializer test

Due to changes in the way Status works the previous initialization tests
now only test lookup. This adds a new test that does a simple
initialization on Status()

v2: - Add this patch

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/tests/status.py: Add test for status in list syntax

Currently a comparison like this will raise an error:
framework.status.PASS in ['pass']

This test currently fails, and is fixed by another patch in this series

v2: - update this test to work with constant statuses

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/status.py: Fix bug in Status.__eq__

Because Status.__eq__ didn't have the ability to compare str or unicode
instances, using Pass() in ['pass'] would raise an exception. With this
patch that is no longer the case, and that syntax works fine.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/tests/status_tests.py: remove equivalency tests

These tests are not actually relevant, they were for testing the
definition of a docstring that was incorrect. That docstring was
updated, but the corresponding tests where not completely removed, which
means these tests ended up testing pass == pass, skip == skip, etc. Not
very useful

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/tests/status_tests.py: Pretty up the output

This makes the changes cosmetically more pleasing, but doesn't affect
the functionality of the tests at all.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
edgeflag-const: test constant (zero-stride) edge flag
ARB_explicit_uniform_location: test for uniform location boundary values

v2: fix style issues, use asprintf (Topi, Anuj)
v3: more cleanups (Topi, Ian)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
ARB_explicit_uniform_location: test sequential array elements

v2: set values directly to shader, simplify overall (Topi)
    fix style issues, use asprintf (Anuj)
v3: more cleanups (Topi, Ian)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
junit: Update for framework.status refactoring.

With commit 8455927c4ef0fcf310ea7ed1e97ae2ff75fec80c status are
instances as opposed to classes.

Trivial.
ARB_query_buffer_object: Add out of bound buffer access test

Test runs asynchronous query and tries to store the result
out of the bound of query buffer object to check if
GL_INVALID_OPERATION is generated correctly.
ARB_query_buffer_object: Add test for QUERY_BUFFER_BINDING

Tests if glGetIntegerv returns correct binding for
query buffer object
ARB_query_buffer_object: Add glGetQueryObject{ui64}v tests

Test runs asynchronous query and check if correct value is stored
in query buffer object.