Add comment for [p]select_smoke tests STDIN issue.
Change-Id: I59cde8b5aaac3e27419ca86d16f85e5af568acf9
diff --git a/tests/sys_select_test.cpp b/tests/sys_select_test.cpp
index 96e7663..d4ac333 100644
--- a/tests/sys_select_test.cpp
+++ b/tests/sys_select_test.cpp
@@ -90,6 +90,9 @@
ASSERT_EQ(EINVAL, errno);
int num_fds = select(max, &r, &w, &e, NULL);
+ // If there is data to be read on STDIN, then the number of
+ // fds ready will be 3 instead of 2. Allow this case, but verify
+ // every fd that is set.
ASSERT_TRUE(num_fds == 2 || num_fds == 3) << "Num fds returned " << num_fds;
ASSERT_TRUE(FD_ISSET(STDOUT_FILENO, &w));
ASSERT_TRUE(FD_ISSET(STDERR_FILENO, &w));
@@ -141,6 +144,9 @@
ASSERT_EQ(-1, pselect(-1, &r, &w, &e, NULL, &ss));
ASSERT_EQ(EINVAL, errno);
+ // If there is data to be read on STDIN, then the number of
+ // fds ready will be 3 instead of 2. Allow this case, but verify
+ // every fd that is set.
int num_fds = pselect(max, &r, &w, &e, NULL, &ss);
ASSERT_TRUE(num_fds == 2 || num_fds == 3) << "Num fds returned " << num_fds;
ASSERT_TRUE(FD_ISSET(STDOUT_FILENO, &w));