diff --git a/tests/testdmabuf.c b/tests/testdmabuf.c index a7cb6b9050..0c729d96e4 100644 --- a/tests/testdmabuf.c +++ b/tests/testdmabuf.c @@ -189,7 +189,8 @@ allocate_memfd (gsize size) if (fd == -1) g_error ("memfd allocation failed"); - ftruncate (fd, size); + if (ftruncate (fd, size) != 0) + g_error ("ftruncate failed"); return fd; }