summaryrefslogtreecommitdiff
path: root/tests/ftp.pm
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-04-23 23:55:34 +0000
committerYang Tse <yangsita@gmail.com>2008-04-23 23:55:34 +0000
commit96edebf4d9ec656ec6ed83dca3bbc3947033c71d (patch)
tree85232db570c48e6f7258bc68f9966b5981cac3a5 /tests/ftp.pm
parent3783b455c08d48cb8a487b16046ffdf71ba46dae (diff)
downloadcurl-96edebf4d9ec656ec6ed83dca3bbc3947033c71d.tar.gz
improve synchronization between test harness runtests.pl script
and test harness servers to minimize risk of false test failures. http://curl.haxx.se/mail/lib-2008-04/0392.html
Diffstat (limited to 'tests/ftp.pm')
-rw-r--r--tests/ftp.pm23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/ftp.pm b/tests/ftp.pm
index b3cc14abb..421fee1a6 100644
--- a/tests/ftp.pm
+++ b/tests/ftp.pm
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -84,4 +84,25 @@ sub ftpkillslaves {
}
}
+
+sub set_advisor_read_lock {
+ my ($filename) = @_;
+
+ if(open(FILEH, ">$filename")) {
+ close(FILEH);
+ return;
+ }
+ printf "Error creating lock file $filename error: $!";
+}
+
+
+sub clear_advisor_read_lock {
+ my ($filename) = @_;
+
+ if(-f $filename) {
+ unlink($filename);
+ }
+}
+
+
1;