aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib525.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib525.c')
-rw-r--r--tests/libtest/lib525.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c
index ce12b3b84..14e0c0c76 100644
--- a/tests/libtest/lib525.c
+++ b/tests/libtest/lib525.c
@@ -25,6 +25,7 @@ int test(char *URL)
CURL *curl;
FILE *hd_src ;
int hd ;
+ int error;
struct_stat file_info;
int running;
char done=FALSE;
@@ -48,6 +49,13 @@ int test(char *URL)
fdopen() from the previous descriptor, but hey this is just
an example! */
hd_src = fopen(arg2, "rb");
+ if(NULL == hd_src) {
+ error = ERRNO;
+ fprintf(stderr, "fopen() failed with error: %d %s\n",
+ error, strerror(error));
+ fprintf(stderr, "Error opening file: %s\n", arg2);
+ return TEST_ERR_MAJOR_BAD;
+ }
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");