X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-open.h;h=2ba5d137bf87fd8ceec029b4af1ce61e7063e971;hb=94122ae4818e7808c99303a0d2094ee9c6a2b843;hp=3e5c5e172639dfd4c5bc07e1ebdc0874725ac627;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/tests/test-open.h b/tests/test-open.h index 3e5c5e172..2ba5d137b 100644 --- a/tests/test-open.h +++ b/tests/test-open.h @@ -63,6 +63,12 @@ test_open (int (*func) (char const *, int, ...), bool print) 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) {