chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix tests under Windows


From: Mario Domenech Goulart
Subject: Re: [PATCH] Fix tests under Windows
Date: Sun, 05 Sep 2021 14:12:49 +0200

Hi Peter,

On Thu, 2 Sep 2021 10:26:00 +0200 Peter Bex <peter@more-magic.net> wrote:

> As Vasilij already reported, there are two failing tests under mingw.
> They initially fail for the same reason - they try to delete files
> that have been opened but not closed, which is an error under Windows.
>
> After fixing this, the posix-tests fail due to the fact that Windows
> doesn't fully support file modes.  It doesn't know about execute
> permissions, and doesn't support making files write-only or having
> files with no permissions.
>
> To fix that, we can conceptually "right-extend" the user permissions
> over group and others after adding read permissions (as Windows does
> not have files without read permissions) and dropping execute
> permissions.  In code, I cond-expand on Windows, shift the group and
> other bits out to obtain the user bits, and then dispatch on the values
> to get read and write access or read-only access.
>
> With these patches in place, the tests pass once again on mingw-msys.
>
> Why we never noticed before?  The POSIX tests were extended in ffe553,
> and the read-lines-test was added in cfa1e7, both of which were added
> somewhere between 5.2.0 and 5.3.0rc1.  And on *nix these tests work
> fine, of course...

Thanks.  I could not test your patches on Windows (because I don't have
a Windows system), but the changes make sense to me and don't break
things on Linux, where I tested them.  So I pushed them to both master
and prerelease.

All the best.
Mario
-- 
http://parenteses.org/mario



reply via email to

[Prev in Thread] Current Thread [Next in Thread]