log_tests.py: Add tests from framework/log.py

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
framework/log.py: Make self.__summary keys explicitly

It would be an unwelcome surprise if some test returns 'fails' or 'pas',
so rather than allowing such a thing to happen, assert that the result
is actually viable.

v2: - Spelling corrections
    - Replace list comprehension with a generator
    - Remove tests that are too implementation specific

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
log: Rename get_current and mark_complete

This replaces very specific names with more general ones. This should be
more useful if we wanted to subclass log at some point.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
log: add verbose logger

This adds a verbose logger option, similar to that of the old piglit
logger, but with some of the flair of the new one.

v2: - Use different method to set Log.__string
    - fix typo env.concurrent to correct env.verbose
    - resume uses stored verbosity settings

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
sso: Verify glActiveShaderProgram with invalid program parameter

There are several cases outlined in the GL 4.4 spec where
glActiveShaderProgram should generate specific errors.  In addition,
section 2.3.1 (Errors) says:

    "Currently, when an error flag is set, results of GL operation are
    undefined only if an OUT_OF_MEMORY error has occurred. In other
    cases, there are no side effects unless otherwise noted; the command
    which generates the error is ignored so that it has no effect on GL
    state or framebuffer contents."

After calling glActiveShaderProgram with an invalid parameter, verify
that the active program state has not been modified.

v2: Fix a couple typos in comments.  Restore expected active shader
binding after failing subtests.  Suggested by Jordan.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Drop defines of _GNU_SOURCE in tests.

The build system defines it globally.

Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
glean: Use piglit-dispatch instead of calling piglit_get_proc_address().

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl-resource-not-bound: test rendering with unbound resources

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
arb_clear_buffer_object: Test multiple formats.

Use glClearBufferData to clear a buffer with all supported internal formats.
arb_clear_buffer_object: Negative test unsupported formats.

Try to clear buffers using unsupported internal formats and check for the
expected errors.
arb_clear_buffer_object: Negative test buffer alignment.

The spec requires the buffer size to be a multiple of the size of the internal
format used for clearing.

Violate this and check for expected errors.
arb_clear_buffer_object: Try to clear a mapped buffer.

This is a negative test.
Try to clear entire buffer while it is entirely mapped.
Check for expected errors.
arb_clear_buffer_object: Negative test without bound buffer.

Try to clear a buffer binding point while no buffer ist bound to it.
Check for expected errors.
arb_clear_buffer_object: Pass NULL as data.

If NULL is passed as the data pointer to glClearBufferData the buffer should be
cleared to all zeros.
arb_clear_buffer_object: Negative test offset and size.

The offset and size parameters of glClearBufferSubData have to oblige to some
restrictions. Violate these and check for errors.
arb_clear_buffer_object: Clear partially mapped buffer.

From the spec:
    "An INVALID_OPERATION error is generated if any part of the specified
     range of the buffer bound to <target> is currently mapped."

This allows to clear a range of a buffer even if another, non-overlapping range
of that buffer is currently mapped.
arb_clear_buffer_object: Clear overlapping ranges.

Consecutively clear multiple, overlapping ranges of a buffer and check the
result.
arb_clear_buffer_object: Clear range of buffer.

Simple test to clear a buffer only partially.
Check that only the desired range was altered.
arb_clear_buffer_object: Clear a 0-length range.

Check that clearing of 0-length ranges is a no-op that doesn't generate any
errors.
arb_gpu_shader5: Add shader tests to verify 'invocations' layout qualifier

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>