]> granicus.if.org Git - php/commitdiff
deleted invalid test.
authorDave Kelsey <dkelsey@php.net>
Fri, 23 Jan 2009 18:56:55 +0000 (18:56 +0000)
committerDave Kelsey <dkelsey@php.net>
Fri, 23 Jan 2009 18:56:55 +0000 (18:56 +0000)
ext/standard/tests/file/flock_variation1.phpt [deleted file]

diff --git a/ext/standard/tests/file/flock_variation1.phpt b/ext/standard/tests/file/flock_variation1.phpt
deleted file mode 100644 (file)
index 3e3f510..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
---TEST--
-Test flock() function: usage variations
---CREDITS--
-Dave Kelsey <d_kelsey@uk.ibm.com>
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip.. not for Windows');
-}
-if (function_exists("pcntl_fork") == FALSE) {
-    die('skip.. no pcntl_fork()');
-}
-?> 
---FILE--
-<?php
-/* 
-Prototype: bool flock(resource $handle, int $operation [, int &$wouldblock]);
-Description: PHP supports a portable way of locking complete files in an advisory way
-*/
-
-echo "*** Test flock() function: with the operations given as numeric values ***\n";
-
-$filename = dirname(__FILE__)."/flock_variation1.tmp";
-$file_handle = fopen($filename, "w");
-fwrite($file_handle, str_repeat("Hello2World", 10) );
-fclose($file_handle);
-
-$file_read = fopen($filename, "r");
-
-$pid = pcntl_fork();
-echo "-- child process is created --\n";
-if ($pid == -1) {
-  die('could not fork');
-} else if ($pid) {
-    echo "-- Trying to get the Reader Lock --\n";
-    if( flock($file_read, LOCK_EX) ) {
-      echo "-- Got Lock --\n";
-      sleep(5);
-      flock($file_read, LOCK_UN);
-    }
-    else
-       echo "-- Couldn't get the Lock --\n";
-} else {
-    echo "-- Trying to get the Writer Lock --\n";
-    if( flock($file_read, LOCK_EX) ) {
-      echo "-- Got Lock --\n";
-      flock($file_read, LOCK_UN);
-    }
-    else
-       echo "-- Couldn't get the Lock --\n";
-
-}
-
-echo "*** Done ***\n";
-?>
---CLEAN--
-<?php
-fclose($file_read);
-fclose($file_write);
-unlink($filename);
-?>
---EXPECTF--