Commit 29ae12bd authored by Ville Syrjälä's avatar Ville Syrjälä

tests/kms_properties: Validate properties harder

Make the property validation more thorough:
- validate property flags
- make sure there's an expected number of values/enums
- make sure the possible values make sense
- make sure the current value makes sense
- actually iterate through all planes/crtc/connectors to
  check their properties
- make sure encoders don't expose properties while at it
- check that atomic props aren't exposed to non-atomic clients

Still passes on my ivb. Not tested anything else so far.
Signed-off-by: Ville Syrjälä's avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: 's avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
parent 0350f0e7
......@@ -390,4 +390,6 @@ static inline bool igt_list_empty(const struct igt_list *list)
__builtin_popcountll(x), \
__builtin_popcount(x))
#define is_power_of_two(x) (((x) & ((x)-1)) == 0)
#endif /* IGT_AUX_H */
......@@ -575,6 +575,32 @@ static inline void igt_ignore_warn(bool value)
*/
#define igt_assert_lte(n1, n2) igt_assert_cmpint(n1, <=, >, n2)
/**
* igt_assert_lte_u64:
* @n1: first integer
* @n2: second integer
*
* Fails (sub-)test if the second integer is strictly smaller than the first.
* Beware that for now this only works on integers.
*
* Like igt_assert(), but displays the values being compared on failure instead
* of simply printing the stringified expression.
*/
#define igt_assert_lte_u64(n1, n2) igt_assert_cmpu64(n1, <=, >, n2)
/**
* igt_assert_lte_s64:
* @n1: first integer
* @n2: second integer
*
* Fails (sub-)test if the second integer is strictly smaller than the first.
* Beware that for now this only works on integers.
*
* Like igt_assert(), but displays the values being compared on failure instead
* of simply printing the stringified expression.
*/
#define igt_assert_lte_s64(n1, n2) igt_assert_cmps64(n1, <=, >, n2)
/**
* igt_assert_lt:
* @n1: first integer
......@@ -588,6 +614,32 @@ static inline void igt_ignore_warn(bool value)
*/
#define igt_assert_lt(n1, n2) igt_assert_cmpint(n1, <, >=, n2)
/**
* igt_assert_lt_u64:
* @n1: first integer
* @n2: second integer
*
* Fails (sub-)test if the second integer is smaller than or equal to the first.
* Beware that for now this only works on integers.
*
* Like igt_assert(), but displays the values being compared on failure instead
* of simply printing the stringified expression.
*/
#define igt_assert_lt_u64(n1, n2) igt_assert_cmpu64(n1, <, >=, n2)
/**
* igt_assert_lt_s64:
* @n1: first integer
* @n2: second integer
*
* Fails (sub-)test if the second integer is smaller than or equal to the first.
* Beware that for now this only works on integers.
*
* Like igt_assert(), but displays the values being compared on failure instead
* of simply printing the stringified expression.
*/
#define igt_assert_lt_s64(n1, n2) igt_assert_cmps64(n1, <, >=, n2)
/**
* igt_assert_fd:
* @fd: file descriptor
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment