intel/mda/tests: use an ASSERT on fread()

Coverity is pointing out that we should check this, and in reality if
this isn't what we expect the rest of the test is probably invalid
anyway.

CID: 1666504
CID: 1666544
CID: 1666552
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37750>
This commit is contained in:
Dylan Baker
2025-10-07 20:10:30 +00:00
parent 28fbc6addb
commit f25e59b951
+3 -3
View File
@@ -30,7 +30,7 @@ TEST(Tar, RoundtripSmallFile)
char *contents = new char[size];
fseek(f, 0, SEEK_SET);
fread(contents, size, 1, f);
ASSERT_EQ(fread(contents, size, 1, f), 1);
fclose(f);
{
@@ -79,7 +79,7 @@ TEST(Tar, RoundtripContentsWithRecordSize)
char *contents = new char[size];
fseek(f, 0, SEEK_SET);
fread(contents, size, 1, f);
ASSERT_EQ(fread(contents, size, 1, f), 1);
fclose(f);
{
@@ -128,7 +128,7 @@ TEST(Tar, TimestampRoundtrip)
char *contents = new char[size];
fseek(f, 0, SEEK_SET);
fread(contents, size, 1, f);
ASSERT_EQ(fread(contents, size, 1, f), 1);
fclose(f);
{