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:
@@ -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);
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user