From:  ab@php.net (Anatol Belski)
Date:  04 Aug 2018 21:27:45 Hong Kong Time
Newsgroup:  news.php.net/php.internals.win
Subject:  

RE: [INTERNALS-WIN] ext/standard/tests/file/fopen_variation11-win32.phpt

NNTP-Posting-Host:  null

Hi Christoph,

> -----Original Message-----
> From: Christoph M. Becker 
> Sent: Friday, August 3, 2018 3:26 PM
> To: internals-win 
> Subject: [INTERNALS-WIN] ext/standard/tests/file/fopen_variation11-
> win32.phpt
> 
> Hi!
> 
> Quite obviously, ext/standard/tests/file/fopen_variation11-win32.phpt[1]
> (and ext/standard/tests/file/fopen_variation10-win32.phpt) is likely to be
> always skipped, since its rather unlikely that c:\fopen_variation10.tmp exists,
> and therefore is_writable() would return FALSE.
> 
> Checking for is_writable('C:') instead appears to be more correct, but still the
> test would likely be skipped due to common permission settings, wouldn't it?
> 
> Not sure, what to do with this test.  Thoughts?
> 
That seems to be a buggy skip condition in first place. As the test was added quite long ago, I guess it was somewhen possible to write to C: fe under XP. Anyway that test will be for sure out of sync regarding the warning outputs, etc.

The note about is_writable("c:") makes sense for the usual case, but fe. AppVeyor runs under an elevated account only. So perhaps it would work there, even it would skip locally. For that, the skip condition should check fe if the script can write into "c:\fopen_variation10.tmp" or whether it runs under an elevated account. One can use AppVeyor with the personal GitHub account to check such things. If it is not possible to fix that test, removing it seems appropriate.

Regards

Anatol