projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Write "Mac OS X" instead of "MacOS X".
[gnulib.git]
/
tests
/
test-open.h
diff --git
a/tests/test-open.h
b/tests/test-open.h
index
9b43945
..
cab1d27
100644
(file)
--- a/
tests/test-open.h
+++ b/
tests/test-open.h
@@
-1,5
+1,5
@@
/* Test of opening a file descriptor.
/* Test of opening a file descriptor.
- Copyright (C) 2007-20
09
Free Software Foundation, Inc.
+ Copyright (C) 2007-20
12
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-63,6
+63,12
@@
test_open (int (*func) (char const *, int, ...), bool print)
ASSERT (write (fd, "c", 1) == 1);
ASSERT (close (fd) == 0);
ASSERT (write (fd, "c", 1) == 1);
ASSERT (close (fd) == 0);
+ /* Although O_NONBLOCK on regular files can be ignored, it must not
+ cause a failure. */
+ fd = func (BASE "file", O_NONBLOCK | O_RDONLY);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+
/* Symlink handling, where supported. */
if (symlink (BASE "file", BASE "link") != 0)
{
/* Symlink handling, where supported. */
if (symlink (BASE "file", BASE "link") != 0)
{