cl: Add atomic_max tests

v2: Properly test signed/unsigned values

Signed-off-by: Aaron Watry <awatry@gmail.com>
cl: Add tests for additional atomic functions

Signed-off-by: Aaron Watry <awatry@gmail.com>
cl: Merge tests with the same name.

This fixes hidden failures where summary would report the result
of the last test with given name.

v2: Tag tss variants

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
framework/log.py: Merge Log.log() and Log.post_log()

These methods were always called back to back, and required an
overlapping set of arguments. Initially I thought that having a second
method might be useful, but it doesn't really seem that useful at this
point.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
framework/log.py: Use keyword args to format instead of splat

Using splat with a dictionary makes sense when the dictionary is already
available (like with locals()), but it isn't very clear.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
log.py: Makes method names clearer

This replace _summary, _running, and _percent with _format*. This makes
the methods easier to understand, especially with names like __summary
also used in the class

v2: - rename _print_* to _format_* (Ilia)

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
framework: refactor the log module

This refactors the log module away from a single class that does
everything to having two classes. The first class LogFactory, is a state
manager that returns BaseLog derived objects when it's get() method is
called. However, it mainly acts as a shared state manager.

The BaseLog derived classes provide three public methods; start(),
log(), summary().

This makes the interfaces much cleaner, just 3 public methods that are
fairly obvious and clearly documented. It uses inheritance for more
shared code, and is just generally much less complex than the previous
implementation

The use of a non-recursive lock mandates that the majority of the code
be in un-locked protected methods, while the public method takes the
lock, otherwise inheritance is nearly impossible.

v2: - Fix summary line in the verbose logger to support using '\r'. This
      works by printing the summary at the end of start() and log()
    - add -v/--verbose option back (Ilia)
v3: - Be more aggressive about locking
v4: - be more granular with locking by using two locks, one for
      printing, one for manipulating the shared data.
    - Move some unit tests to the next patch that belong there.
v5: - simplify the locking. This may have a performance impact, but
      makes the code much simpler. It should be possible to make the
      locking finer grained later
v6: - Lock one additional command
v7: - fix bug in Test. Test did not call log.start() so verbose log
      would print <status>: None
    - replace RLock with Lock. This requires a little bit of refactoring
      to make it work, since the lock cannot be called recursively
v8: - remove trailing whitespace

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
framework: Add dummy logger that produces no output

This adds a new logger option that produces no output. This is aimed at
headless setups or for systems like jenkins where the output data isn't
very useful.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Filter expected failures from JUnit output

Piglit test results are difficult to analyze with simpler JUnit
visualizers like those provided by Jenkins.  There are hundreds of
failures, but the engineer is typically interested only in NEW
failures.  Jenkins JUnit rules typically expect 100% pass rate, or
some static threshold of failures.

Specifying test names in the [expected-failures] or [expected-crashes]
sections of the config file enables JUnit reporting of just the test
failures which represent new regressions.

Test names are expected in the dotted JUnit format (eg:
"piglit.spec.ARB_fragment_program.fp-formats") and are case
insensitive.

Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com>
cl/atomic: Fix duplicate names for threaded int/uint tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
cl: Avoid duplicate subtest names

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
cl: Fix subtest names in scalar-comparison

These use lte kernels
Also fixes duplicate subtest names

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
cl: Fix name of bitwise int subtest

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
cl: vXi32-stack: Rename to avoid subtest name conflicts

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
cl: i32-stack-array: Rename to avoid subtest conflicts

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
draw-pixels: report format/type for failures

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
draw-pixels: update BYTE_TO_FLOAT() macro to match Mesa

Use Mesa's BYTE_TO_FLOAT_TEX() arithmetic.  This lets Mesa pass the
test.  No regression with nvidia's driver either.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Create an initial to-do list

I'm sure other people have items to add...
cl: fix adding concurent tests v2

v2: Tom Stellard
  - Simplify  code
  - Add comment about using concurrent tests with render nodes

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
CL: Add atomic_add global tests

Adds two separate files, one which tests atomic_add without usage
of the return values, and another which tests with return usage.

At least the Radeon HD (EG/SI) line has two separate sets of instructions
depending on whether the return value is used or not.

v2: Only use return variant for atomic_add-global-return

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>