[PATCH 11/11] Ensure temporary directory used by tests exists
Ken Brown
kbrown@cornell.edu
Sun Nov 8 19:27:27 GMT 2020
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"
Ken
More information about the Cygwin-patches
mailing list