Age | Commit message (Collapse) | Author |
|
Use do_ioctl and do_ioctl_err where possible.
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
Change m >= n patterns to igt_assert_lte(n, m), and ditto for strict
greater-than.
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
igt_assert_neq can only compare integers, not pointers.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add rules to fix unused-result warnings when compiling with
_FORTIFY_SOURCE defined and apply them to the library and tests.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
The integer comparison macros give us better error output by including
the actual values that failed the comparison.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
It collides with the subtest naming convention glossary entry for swap.
Which makes the docbook xml stuff unhappy.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
drm_open_any always returns a valid file descriptor, so there is no need
to check the return value.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Replace open coded min/max/swap with the macro invocation.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
People use it way too often, and it upsets the test library. The only
valid places to use this is of igt infrastructure self-tests where you
need to check something _without_ all the other abi use checks
igt_fail and friends do. For those tests just #define an internal
assert to hide it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Damien dodged this ...
Also run the script while at it.
v2: Don't just capture identifiers for pipe, but also expressions.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
And also pimp the spatch file itself with usage hints.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I've yet again totally screwed things up (this time automated with
cocci even, but not yet pushed luckily). So finally add a new version
for easier conversion and adjust the cocci script.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
abort should only be used for internal library checks - using
abort() we get a "crash" result, using igt_fail we get "fail"
in piglit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Also update old hunks to match on igt logging instead of fprintf.
v2: Don't forget about perror.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
These should go to stdout instead. The next patch will clean this up
with cocci, so no change from fprintf(stdout, to printf( here.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Small start but useful to collect refactorings/simplifications for
common igt patterns. Please add more if you stumble over some so that
we can occasionally run this to clean up the tests.
I haven't figured out yet how to do the assert_cmpint->assert_eq
transformation.
Run this with
spatch --sp-file lib/igt.cocci --in-place tests/*.c
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|