aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-04-04 06:39:03 +0000
committerYang Tse <yangsita@gmail.com>2007-04-04 06:39:03 +0000
commit8a529bd98764f023680d750d76e138bc644e50a6 (patch)
tree55984c3006bfba90aa9d3e43385b6d2d3102ad08 /tests
parent8fe9376d542ef4f11b2049190de363f7b79436ec (diff)
test can be allowed to run if fopen() is capable of fopen()ing
three additional files once that we have already open()ed the big bunch of file descriptors.
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/lib518.c8
-rw-r--r--tests/libtest/lib537.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c
index 30de15ef3..1997b2f9e 100644
--- a/tests/libtest/lib518.c
+++ b/tests/libtest/lib518.c
@@ -67,21 +67,21 @@ static void close_file_descriptors(void)
static int fopen_works(void)
{
- FILE *fpa[SAFETY_MARGIN];
+ FILE *fpa[3];
int i;
int ret = 1;
- for (i = 0; i < SAFETY_MARGIN; i++) {
+ for (i = 0; i < 3; i++) {
fpa[i] = NULL;
}
- for (i = 0; i < SAFETY_MARGIN; i++) {
+ for (i = 0; i < 3; i++) {
fpa[i] = fopen(DEV_NULL, "r");
if (fpa[i] == NULL) {
ret = 0;
break;
}
}
- for (i = 0; i < SAFETY_MARGIN; i++) {
+ for (i = 0; i < 3; i++) {
if (fpa[i] != NULL)
fclose(fpa[i]);
}
diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c
index 29de30818..d59957430 100644
--- a/tests/libtest/lib537.c
+++ b/tests/libtest/lib537.c
@@ -68,21 +68,21 @@ static void close_file_descriptors(void)
static int fopen_works(void)
{
- FILE *fpa[SAFETY_MARGIN];
+ FILE *fpa[3];
int i;
int ret = 1;
- for (i = 0; i < SAFETY_MARGIN; i++) {
+ for (i = 0; i < 3; i++) {
fpa[i] = NULL;
}
- for (i = 0; i < SAFETY_MARGIN; i++) {
+ for (i = 0; i < 3; i++) {
fpa[i] = fopen(DEV_NULL, "r");
if (fpa[i] == NULL) {
ret = 0;
break;
}
}
- for (i = 0; i < SAFETY_MARGIN; i++) {
+ for (i = 0; i < 3; i++) {
if (fpa[i] != NULL)
fclose(fpa[i]);
}