[PATCH 11/11] Ensure temporary directory used by tests exists
Jon Turney
jon.turney@dronecode.org.uk
Mon Nov 9 21:01:51 GMT 2020
On 09/11/2020 17:48, Ken Brown via Cygwin-patches wrote:
> On 11/9/2020 11:25 AM, Jon Turney wrote:
>> On 08/11/2020 19:27, Ken Brown via Cygwin-patches wrote:
>>> On 11/8/2020 1:52 PM, Jon Turney wrote:
>>>> On 08/11/2020 18:19, Ken Brown via Cygwin-patches wrote:
>>>>> On 11/5/2020 2:47 PM, Jon Turney wrote:
>>>>>> +# temporary directory to be used for files created by tests (as
>>>>>> an absolute,
>>>>>> +# /cygdrive path, so it can be understood by the test DLL, which
>>>>>> will have
>>>>>> +# different mount table)
>>>>>> +tmpdir = $(shell cygpath -ma $(objdir)/testsuite/tmp/ | sed -e
>>>>>> 's#^\([A-Z]\):#/cygdrive/\L\1#')
>>>>>
>>>>> This isn't right if the cygdrive prefix is not 'cygdrive'. Maybe
>>>>> use 'proc/cygdrive' instead of 'cygdrive'?
>>>>>
>>>>
>>>> That's how I originally had it. Unfortunately, test ltp/symlink01
>>>> relies on the test directory being specified as a canonicalized
>>>> pathname (i.e. is the same after realpath()).
>>>>
>>>> Since there's no /etc/fstab in the the filesystem relative to the
>>>> test DLL, I think it should always be using the default cygdrive
>>>> prefix?
>>>
>>> But there's a mkdir command that seems to be run in the context of
>>> the user running 'make check'. If the cygdrive prefix is not
>>> 'cygdrive', 'make check' fails as follows:
>>>
>>> ERROR: tcl error sourcing
>>> /home/kbrown/src/cygdll/newlib-cygwin/winsup/testsuite/winsup.api/winsup.exp.
>>>
>>> ERROR: can't create directory "/cygdrive": permission denied
>>> while executing
>>> "file mkdir $tmpdir/$base"
>>>
>>
>> Ah, I see.
>>
>> Maybe something like the attached is needed.
>
> That fixes it, thanks. I get
>
> === winsup Summary ===
>
> # of expected passes 253
> # of unexpected failures 23
> # of unexpected successes 1
> # of expected failures 7
Yup. I get the same numbers.
More information about the Cygwin-patches
mailing list