tests: Fail early on nonexistent file.

* lib/tests/io/90-stat.c (main): Fail early on nonexistent file.
This commit is contained in:
Danny Milosavljevic 2019-07-02 13:39:41 +02:00 committed by Jan Nieuwenhuizen
parent 5a2a00f4e8
commit c7d050c0cd
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 3 additions and 0 deletions

View File

@ -71,6 +71,9 @@ main ()
struct stat sbuf;
if (fd < 0)
return 2;
int r = fstat (fd, &sbuf);
if (r < 0)
return 1;