diff options
Diffstat (limited to 'tests/zfs-tests/cmd/file/randwritecomp.c')
-rw-r--r-- | tests/zfs-tests/cmd/file/randwritecomp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/zfs-tests/cmd/file/randwritecomp.c b/tests/zfs-tests/cmd/file/randwritecomp.c index cc70d1212f84..2d5c0ec8643c 100644 --- a/tests/zfs-tests/cmd/file/randwritecomp.c +++ b/tests/zfs-tests/cmd/file/randwritecomp.c @@ -152,6 +152,11 @@ main(int argc, char *argv[]) n = strtoull(argv[0], NULL, 0); fd = open(filename, O_RDWR|O_CREAT, 0666); + if (fd == -1) { + (void) fprintf(stderr, "open(%s) failed: %s\n", filename, + strerror(errno)); + exit(EXIT_FAILURE); + } err = fstat(fd, &ss); if (err != 0) { (void) fprintf(stderr, |