[PHP-CVS] svn: /SVNROOT/ global_avail

2012-01-08 Thread Hannes Magnusson
bjoriSun, 08 Jan 2012 11:53:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321925

Log:
Give irker english doc karma

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2012-01-08 11:47:26 UTC (rev 321924)
+++ SVNROOT/global_avail2012-01-08 11:53:10 UTC (rev 321925)
@@ -97,7 +97,7 @@
 avail|aferreira,thiago|phpdoc/pt
 
avail|machado,scar,davis,dnfeitosa,thiago,amandavale,rafa,klaussilveira|phpdoc/pt_BR
 avail|radical,shoty|phpdoc/ro
-avail|aur|phpdoc/en
+avail|aur,irker|phpdoc/en
 
avail|freespace,shafff,sveta,wanderer,kozloffsky,santiago,seprize,irker,mch,aur,das,tmn,bfl,countzero,alien,northcat|phpdoc/ru
 
avail|cumhuronat,gulenzek,xhandros,neoprobe,faruk,infralite,flarecaster,antimon,yelekin,ecamalan|phpdoc/tr
 avail|pfischer|phpdoc/es

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt trunk/ext/standard/tests/general_fu

2012-01-08 Thread Nuno Lopes
nlopess  Sun, 08 Jan 2012 18:03:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321933

Log:
do kill 9 to fix a race condition in this test. (should fix the debian 32-bit 
buildbot)

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt
U   
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt
U   php/php-src/trunk/ext/standard/tests/general_functions/bug39322.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt 
2012-01-08 16:46:40 UTC (rev 321932)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt 
2012-01-08 18:03:56 UTC (rev 321933)
@@ -16,7 +16,7 @@

 $process = proc_open('/bin/sleep 120', $descriptors, $pipes);

-proc_terminate($process);
+proc_terminate($process, 9);
 sleep(1); // wait a bit to let the process finish
 var_dump(proc_get_status($process));

@@ -38,7 +38,7 @@
   [exitcode]=
   int(-1)
   [termsig]=
-  int(15)
+  int(9)
   [stopsig]=
   int(0)
 }

Modified: 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt 
2012-01-08 16:46:40 UTC (rev 321932)
+++ 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt 
2012-01-08 18:03:56 UTC (rev 321933)
@@ -16,7 +16,7 @@

 $process = proc_open('/bin/sleep 120', $descriptors, $pipes);

-proc_terminate($process);
+proc_terminate($process, 9);
 sleep(1); // wait a bit to let the process finish
 var_dump(proc_get_status($process));

@@ -38,7 +38,7 @@
   [exitcode]=
   int(-1)
   [termsig]=
-  int(15)
+  int(9)
   [stopsig]=
   int(0)
 }

Modified: php/php-src/trunk/ext/standard/tests/general_functions/bug39322.phpt
===
--- php/php-src/trunk/ext/standard/tests/general_functions/bug39322.phpt
2012-01-08 16:46:40 UTC (rev 321932)
+++ php/php-src/trunk/ext/standard/tests/general_functions/bug39322.phpt
2012-01-08 18:03:56 UTC (rev 321933)
@@ -16,7 +16,7 @@

 $process = proc_open('/bin/sleep 120', $descriptors, $pipes);

-proc_terminate($process);
+proc_terminate($process, 9);
 sleep(1); // wait a bit to let the process finish
 var_dump(proc_get_status($process));

@@ -38,7 +38,7 @@
   [exitcode]=
   int(-1)
   [termsig]=
-  int(15)
+  int(9)
   [stopsig]=
   int(0)
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ext/spl/tests/ bug53071.phpt

2012-01-08 Thread Rasmus Lerdorf
rasmus   Sun, 08 Jan 2012 18:21:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321934

Log:
This test only works if gc is enabled

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/spl/tests/bug53071.phpt

Modified: php/php-src/branches/PHP_5_4/ext/spl/tests/bug53071.phpt
===
--- php/php-src/branches/PHP_5_4/ext/spl/tests/bug53071.phpt2012-01-08 
18:03:56 UTC (rev 321933)
+++ php/php-src/branches/PHP_5_4/ext/spl/tests/bug53071.phpt2012-01-08 
18:21:13 UTC (rev 321934)
@@ -1,26 +1,27 @@
---TEST--
-Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
---FILE--
-?php
-class myClass
-{
-   public $member;
-}
-function LimitedScope()
-{
-   $myA = new myClass();
-   $myB = new SplObjectStorage();
-   $myC = new myClass();
-   $myC-member = $myA; // myC has a referece to myA
-   $myB-Attach($myC);  // myB attaches myC
-   $myA-member = $myB; // myA has myB, comleting the cycle
-}
-LimitedScope();
-var_dump(gc_collect_cycles());
-
-echo Done.\n;
-
-?
---EXPECTF--
-int(5)
-Done.
+--TEST--
+Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
+--FILE--
+?php
+gc_enable();
+class myClass
+{
+   public $member;
+}
+function LimitedScope()
+{
+   $myA = new myClass();
+   $myB = new SplObjectStorage();
+   $myC = new myClass();
+   $myC-member = $myA; // myC has a referece to myA
+   $myB-Attach($myC);  // myB attaches myC
+   $myA-member = $myB; // myA has myB, comleting the cycle
+}
+LimitedScope();
+var_dump(gc_collect_cycles());
+
+echo Done.\n;
+
+?
+--EXPECTF--
+int(5)
+Done.

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/spl/tests/bug53071.phpt trunk/ext/spl/tests/bug53071.phpt

2012-01-08 Thread Rasmus Lerdorf
rasmus   Sun, 08 Jan 2012 18:22:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321935

Log:
Make sure gc is enabled

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/spl/tests/bug53071.phpt
U   php/php-src/trunk/ext/spl/tests/bug53071.phpt

Modified: php/php-src/branches/PHP_5_3/ext/spl/tests/bug53071.phpt
===
--- php/php-src/branches/PHP_5_3/ext/spl/tests/bug53071.phpt2012-01-08 
18:21:13 UTC (rev 321934)
+++ php/php-src/branches/PHP_5_3/ext/spl/tests/bug53071.phpt2012-01-08 
18:22:50 UTC (rev 321935)
@@ -1,26 +1,27 @@
---TEST--
-Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
---FILE--
-?php
-class myClass
-{
-   public $member;
-}
-function LimitedScope()
-{
-   $myA = new myClass();
-   $myB = new SplObjectStorage();
-   $myC = new myClass();
-   $myC-member = $myA; // myC has a referece to myA
-   $myB-Attach($myC);  // myB attaches myC
-   $myA-member = $myB; // myA has myB, comleting the cycle
-}
-LimitedScope();
-var_dump(gc_collect_cycles());
-
-echo Done.\n;
-
-?
---EXPECTF--
-int(5)
-Done.
+--TEST--
+Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
+--FILE--
+?php
+gc_enable();
+class myClass
+{
+   public $member;
+}
+function LimitedScope()
+{
+   $myA = new myClass();
+   $myB = new SplObjectStorage();
+   $myC = new myClass();
+   $myC-member = $myA; // myC has a referece to myA
+   $myB-Attach($myC);  // myB attaches myC
+   $myA-member = $myB; // myA has myB, comleting the cycle
+}
+LimitedScope();
+var_dump(gc_collect_cycles());
+
+echo Done.\n;
+
+?
+--EXPECTF--
+int(5)
+Done.

Modified: php/php-src/trunk/ext/spl/tests/bug53071.phpt
===
--- php/php-src/trunk/ext/spl/tests/bug53071.phpt   2012-01-08 18:21:13 UTC 
(rev 321934)
+++ php/php-src/trunk/ext/spl/tests/bug53071.phpt   2012-01-08 18:22:50 UTC 
(rev 321935)
@@ -1,26 +1,27 @@
---TEST--
-Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
---FILE--
-?php
-class myClass
-{
-   public $member;
-}
-function LimitedScope()
-{
-   $myA = new myClass();
-   $myB = new SplObjectStorage();
-   $myC = new myClass();
-   $myC-member = $myA; // myC has a referece to myA
-   $myB-Attach($myC);  // myB attaches myC
-   $myA-member = $myB; // myA has myB, comleting the cycle
-}
-LimitedScope();
-var_dump(gc_collect_cycles());
-
-echo Done.\n;
-
-?
---EXPECTF--
-int(5)
-Done.
+--TEST--
+Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
+--FILE--
+?php
+gc_enable();
+class myClass
+{
+   public $member;
+}
+function LimitedScope()
+{
+   $myA = new myClass();
+   $myB = new SplObjectStorage();
+   $myC = new myClass();
+   $myC-member = $myA; // myC has a referece to myA
+   $myB-Attach($myC);  // myB attaches myC
+   $myA-member = $myB; // myA has myB, comleting the cycle
+}
+LimitedScope();
+var_dump(gc_collect_cycles());
+
+echo Done.\n;
+
+?
+--EXPECTF--
+int(5)
+Done.

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/intl/ intl_error.c intl_error.h php_intl.c php_intl.h tests/ini_use_exceptions_basic.phpt

2012-01-08 Thread Gustavo André dos Santos Lopes
cataphract   Sun, 08 Jan 2012 18:41:53 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321936

Log:
- Added the ability for the intl exception to throw exceptions when a global 
error is set.

Changed paths:
U   php/php-src/trunk/ext/intl/intl_error.c
U   php/php-src/trunk/ext/intl/intl_error.h
U   php/php-src/trunk/ext/intl/php_intl.c
U   php/php-src/trunk/ext/intl/php_intl.h
A   php/php-src/trunk/ext/intl/tests/ini_use_exceptions_basic.phpt

Modified: php/php-src/trunk/ext/intl/intl_error.c
===
--- php/php-src/trunk/ext/intl/intl_error.c 2012-01-08 18:22:50 UTC (rev 
321935)
+++ php/php-src/trunk/ext/intl/intl_error.c 2012-01-08 18:41:53 UTC (rev 
321936)
@@ -21,12 +21,15 @@
 #endif

 #include php.h
+#include zend_exceptions.h

 #include php_intl.h
 #include intl_error.h

 ZEND_EXTERN_MODULE_GLOBALS( intl )

+static zend_class_entry *IntlException_ce_ptr;
+
 /* {{{ intl_error* intl_g_error_get()
  * Return global error structure.
  */
@@ -102,8 +105,11 @@
if( !msg )
return;

-   if(!err  INTL_G(error_level)) {
-   php_error_docref(NULL TSRMLS_CC, INTL_G(error_level), %s, 
msg);
+   if( !err ) {
+   if( INTL_G( error_level ) )
+   php_error_docref( NULL TSRMLS_CC, INTL_G( error_level 
), %s, msg );
+   if( INTL_G( use_exceptions ) )
+   zend_throw_exception_ex( IntlException_ce_ptr, 0 
TSRMLS_CC, %s, msg );
}
if( !err  !( err = intl_g_error_get( TSRMLS_C ) ) )
return;
@@ -223,6 +229,21 @@
 }
 /* }}} */

+void intl_register_IntlException_class( TSRMLS_D )
+{
+   zend_class_entry ce,
+*default_exception_ce;
+
+   default_exception_ce = zend_exception_get_default( TSRMLS_C );
+
+   /* Create and register 'IntlException' class. */
+   INIT_CLASS_ENTRY_EX( ce, IntlException, sizeof( IntlException ) - 
1, NULL );
+   IntlException_ce_ptr = zend_register_internal_class_ex( ce,
+   default_exception_ce, NULL TSRMLS_CC );
+   IntlException_ce_ptr-create_object = 
default_exception_ce-create_object;
+}
+/* }}} */
+
 /*
  * Local variables:
  * tab-width: 4

Modified: php/php-src/trunk/ext/intl/intl_error.h
===
--- php/php-src/trunk/ext/intl/intl_error.h 2012-01-08 18:22:50 UTC (rev 
321935)
+++ php/php-src/trunk/ext/intl/intl_error.h 2012-01-08 18:41:53 UTC (rev 
321936)
@@ -44,4 +44,7 @@
 voidintl_errors_set_code( intl_error* err, UErrorCode err_code 
TSRMLS_DC );
 voidintl_errors_set( intl_error* err, UErrorCode code, char* msg, int 
copyMsg TSRMLS_DC );

+// exported to be called on extension MINIT
+void   intl_register_IntlException_class( TSRMLS_D );
+
 #endif // INTL_ERROR_H

Modified: php/php-src/trunk/ext/intl/php_intl.c
===
--- php/php-src/trunk/ext/intl/php_intl.c   2012-01-08 18:22:50 UTC (rev 
321935)
+++ php/php-src/trunk/ext/intl/php_intl.c   2012-01-08 18:41:53 UTC (rev 
321936)
@@ -545,7 +545,7 @@
 PHP_INI_BEGIN()
 STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL, 
OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals)
 STD_PHP_INI_ENTRY(intl.error_level, 0, PHP_INI_ALL, OnUpdateLong, 
error_level, zend_intl_globals, intl_globals)
-
+   STD_PHP_INI_ENTRY(intl.use_exceptions, 0, PHP_INI_ALL, 
OnUpdateBool, use_exceptions, zend_intl_globals, intl_globals)
 PHP_INI_END()
 /* }}} */

@@ -653,6 +653,10 @@
/* Expose Spoofchecker constants to PHP scripts */
spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU );
 #endif
+
+   /* Register 'IntlException' PHP class */
+   intl_register_IntlException_class( TSRMLS_C );
+
/* Global error handling. */
intl_error_init( NULL TSRMLS_CC );


Modified: php/php-src/trunk/ext/intl/php_intl.h
===
--- php/php-src/trunk/ext/intl/php_intl.h   2012-01-08 18:22:50 UTC (rev 
321935)
+++ php/php-src/trunk/ext/intl/php_intl.h   2012-01-08 18:41:53 UTC (rev 
321936)
@@ -46,6 +46,7 @@
UBreakIterator* grapheme_iterator;
intl_error g_error;
long error_level;
+   zend_bool use_exceptions;
 ZEND_END_MODULE_GLOBALS(intl)

 /* Macro to access request-wide global variables. */

Added: php/php-src/trunk/ext/intl/tests/ini_use_exceptions_basic.phpt
===
--- php/php-src/trunk/ext/intl/tests/ini_use_exceptions_basic.phpt  
(rev 0)
+++ php/php-src/trunk/ext/intl/tests/ini_use_exceptions_basic.phpt  
2012-01-08 18:41:53 UTC (rev 321936)
@@ -0,0 +1,21 @@
+--TEST--
+intl.use_exceptions INI setting
+--SKIPIF--
+?php 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt branches/PHP_5_4/ext/spl/tests/Di

2012-01-08 Thread Rasmus Lerdorf
rasmus   Sun, 08 Jan 2012 18:43:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321937

Log:
These tests don't work if run as root

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
U   
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
U   
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
U   
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
U   php/php-src/trunk/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
U   php/php-src/trunk/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
2012-01-08 18:41:53 UTC (rev 321936)
+++ 
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
2012-01-08 18:43:30 UTC (rev 321937)
@@ -1,15 +1,18 @@
---TEST--
-SPL: DirectoryIterator test getGroup
---CREDITS--
+--TEST--
+SPL: DirectoryIterator test getGroup
+--SKIPIF--
+?php
+if (posix_geteuid() == 0) die('SKIP Cannot run test as root.');
+--CREDITS--
 Cesare D'Amico cesare.dam...@gruppovolta.it
 Andrea Giorgini agi...@gmail.com
 Filippo De Santis f...@ideato.it
 Daniel Londero daniel.lond...@gmail.com
 Francesco Trucchia f...@ideato.it
 Jacopo Romei jac...@sviluppoagile.it
-#Test Fest Cesena (Italy) on 2009-06-20
---FILE--
-?php
+#Test Fest Cesena (Italy) on 2009-06-20
+--FILE--
+?php
 $dirname = 'DirectoryIterator_getGroup_basic';
 mkdir($dirname);
 $dir = new DirectoryIterator($dirname);
@@ -21,6 +24,6 @@
 ?php
 $dirname = 'DirectoryIterator_getGroup_basic';
 rmdir($dirname);
-?
---EXPECTF--
+?
+--EXPECTF--
 bool(true)

Modified: 
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
2012-01-08 18:41:53 UTC (rev 321936)
+++ 
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
2012-01-08 18:43:30 UTC (rev 321937)
@@ -1,5 +1,8 @@
 --TEST--
 SPL: DirectoryIterator test getOwner
+--SKIPIF--
+?php
+if (posix_geteuid() == 0) die('SKIP Cannot run test as root.');
 --CREDITS--
 Cesare D'Amico cesare.dam...@gruppovolta.it
 Andrea Giorgini agi...@gmail.com

Modified: 
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
2012-01-08 18:41:53 UTC (rev 321936)
+++ 
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
2012-01-08 18:43:30 UTC (rev 321937)
@@ -1,15 +1,18 @@
---TEST--
-SPL: DirectoryIterator test getGroup
---CREDITS--
+--TEST--
+SPL: DirectoryIterator test getGroup
+--SKIPIF--
+?php
+if (posix_geteuid() == 0) die('SKIP Cannot run test as root.');
+--CREDITS--
 Cesare D'Amico cesare.dam...@gruppovolta.it
 Andrea Giorgini agi...@gmail.com
 Filippo De Santis f...@ideato.it
 Daniel Londero daniel.lond...@gmail.com
 Francesco Trucchia f...@ideato.it
 Jacopo Romei jac...@sviluppoagile.it
-#Test Fest Cesena (Italy) on 2009-06-20
---FILE--
-?php
+#Test Fest Cesena (Italy) on 2009-06-20
+--FILE--
+?php
 $dirname = 'DirectoryIterator_getGroup_basic';
 mkdir($dirname);
 $dir = new DirectoryIterator($dirname);
@@ -21,6 +24,6 @@
 ?php
 $dirname = 'DirectoryIterator_getGroup_basic';
 rmdir($dirname);
-?
---EXPECTF--
+?
+--EXPECTF--
 bool(true)

Modified: 
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
2012-01-08 18:41:53 UTC (rev 321936)
+++ 
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
2012-01-08 18:43:30 UTC (rev 321937)
@@ -1,5 +1,8 @@
 --TEST--
 SPL: DirectoryIterator test getOwner
+--SKIPIF--
+?php
+if (posix_geteuid() == 0) die('SKIP Cannot run test as root.');
 --CREDITS--
 Cesare D'Amico cesare.dam...@gruppovolta.it
 Andrea Giorgini agi...@gmail.com

Modified: php/php-src/trunk/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
===
--- php/php-src/trunk/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt   
2012-01-08 18:41:53 UTC (rev 321936)
+++ php/php-src/trunk/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt   
2012-01-08 18:43:30 UTC (rev 321937)
@@ -1,15 +1,18 @@
---TEST--
-SPL: DirectoryIterator test getGroup
---CREDITS--
+--TEST--
+SPL: DirectoryIterator test getGroup
+--SKIPIF--
+?php
+if 

Re: [PHP-CVS] =?utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F3/ext/spl/tests/DirectoryIterator=5FgetGroup=5Fbasic.phpt_branches/PHP=5F5=5F3/ext/spl/tests/DirectoryIterator=5FgetOwner=5Fbasic.phpt_bra

2012-01-08 Thread Stas Malyshev

Hi!


rasmus   Sun, 08 Jan 2012 18:43:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321937

Log:
These tests don't work if run as root

Changed paths:
 U   
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
 U   
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
 U   
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
 U   
php/php-src/branches/PHP_5_4/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt
 U   php/php-src/trunk/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
 U   php/php-src/trunk/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
2012-01-08 18:41:53 UTC (rev 321936)
+++ 
php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt
2012-01-08 18:43:30 UTC (rev 321937)
@@ -1,15 +1,18 @@
---TEST--
-SPL: DirectoryIterator test getGroup
---CREDITS--
+--TEST--
+SPL: DirectoryIterator test getGroup
+--SKIPIF--
+?php
+if (posix_geteuid() == 0) die('SKIP Cannot run test as root.');


Does this work on Windows?

--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] =?utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F3/ext/spl/tests/DirectoryIterator=5FgetGroup=5Fbasic.phpt_branches/PHP=5F5=5F3/ext/spl/tests/DirectoryIterator=5FgetOwner=5Fbasic.phpt_bra

2012-01-08 Thread Rasmus Lerdorf
On 01/08/2012 12:36 PM, Stas Malyshev wrote:
 +if (posix_geteuid() == 0) die('SKIP Cannot run test as root.');
 
 Does this work on Windows?

Dunno, but we have 22 tests using that same check and none of them check
for Windows, so I assume it does.

-Rasmus




-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] =?utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F3/ext/spl/tests/DirectoryIterator=5FgetGroup=5Fbasic.phpt_branches/PHP=5F5=5F3/ext/spl/tests/DirectoryIterator=5FgetOwner=5Fbasic.phpt_bra

2012-01-08 Thread Pierre Joye
Buggy skipif code simply does not work, and as posix does not exist on
windows

On Sun, Jan 8, 2012 at 9:42 PM, Rasmus Lerdorf ras...@php.net wrote:
 On 01/08/2012 12:36 PM, Stas Malyshev wrote:
 +if (posix_geteuid() == 0) die('SKIP Cannot run test as root.');

 Does this work on Windows?

 Dunno, but we have 22 tests using that same check and none of them check
 for Windows, so I assume it does.

 -Rasmus




 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] =?utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F3/ext/spl/tests/DirectoryIterator=5FgetGroup=5Fbasic.phpt_branches/PHP=5F5=5F3/ext/spl/tests/DirectoryIterator=5FgetOwner=5Fbasic.phpt_bra

2012-01-08 Thread Rasmus Lerdorf
On 01/08/2012 12:42 PM, Rasmus Lerdorf wrote:
 On 01/08/2012 12:36 PM, Stas Malyshev wrote:
 +if (posix_geteuid() == 0) die('SKIP Cannot run test as root.');

 Does this work on Windows?
 
 Dunno, but we have 22 tests using that same check and none of them check
 for Windows, so I assume it does.

Ok, I dug a bit deeper. You are right, technically the check doesn't
work on Windows, but the way our tests work, unless the skipif script
returns skip the test will run, even if the skipif has an error. So,
the 20+ tests that do this check will still run on Windows.

-Rasmus


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php