diff options
| author | Thomas Wood <thomas.wood@intel.com> | 2015-04-02 11:50:01 +0100 |
|---|---|---|
| committer | Thomas Wood <thomas.wood@intel.com> | 2015-04-08 17:58:32 +0100 |
| commit | 564dfd45a99e688c0a450f911adb864f4d5bd6b5 (patch) | |
| tree | 45537f623595a286980c6a7a43a29dfdc16e6124 /tests | |
| parent | 074d8b440ef37eeb5fc8195a84a8c970f385a563 (diff) | |
tests/kms_fbc_crc: fix fread() return value assertion
Use 1 as the element size to check the number of bytes returned is
greater than 0, rather than checking the number of elements returned.
This fixes a regression from commit 47f6b13 (igt.cocci: check the
return values of various functions).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89833
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/kms_fbc_crc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c index 10e1ca43..ccdec33e 100644 --- a/tests/kms_fbc_crc.c +++ b/tests/kms_fbc_crc.c @@ -510,7 +510,7 @@ igt_main status = igt_debugfs_fopen("i915_fbc_status", "r"); igt_require_f(status, "No i915_fbc_status found\n"); - igt_assert_eq(fread(buf, sizeof(buf), 1, status), sizeof(buf)); + igt_assert_lt(0, fread(buf, 1, sizeof(buf), status)); fclose(status); buf[sizeof(buf) - 1] = '\0'; igt_require_f(!strstr(buf, "unsupported by this chipset") && |
