tests: Fail early on nonexistent file.
* lib/tests/io/90-stat.c (main): Fail early on nonexistent file.
This commit is contained in:
parent
5a2a00f4e8
commit
c7d050c0cd
|
@ -71,6 +71,9 @@ main ()
|
||||||
|
|
||||||
struct stat sbuf;
|
struct stat sbuf;
|
||||||
|
|
||||||
|
if (fd < 0)
|
||||||
|
return 2;
|
||||||
|
|
||||||
int r = fstat (fd, &sbuf);
|
int r = fstat (fd, &sbuf);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue