git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] test-lib.sh: No POSIXPERM for cygwin

From
Torsten Bögershausen <tboegi@web.de>
Date
Feb 6, 2013, 20:16 UTC
Message-ID
<5112BA0D.6020200@web.de>
In-Reply-To
<CABPQNSYmGhaDG0Dzpp2C0ZwKoFwP5EokJW+TC8JT-Bw6rKa79A@mail.gmail.com>
Am 2013-02-06 10:34, schrieb Erik Faye-Lund:
Show 6 quoted lines
> On Sun, Jan 27, 2013 at 3:57 PM, Torsten Bögershausen <tboegi@web.de> wrote:
>> t0070 and t1301 fail when running the test suite under cygwin.
>> Skip the failing tests by unsetting POSIXPERM.
>>
>
> But is this the real reason? I thought Cygwin implemented POSIX permissions...?
t0070:
  'mktemp to unwritable directory prints filename'
   mkdir cannotwrite &&
   chmod -w cannotwrite &&
   test_when_finished "chmod +w cannotwrite" &&
   test_must_fail test-mktemp cannotwrite/testXXXXXX 2>err &&
   grep "cannotwrite/test" err

When a directory under Linux/*nix has no write permission, it is not allowed to create another directory (or file..) here. This is not working under cygwin, a directory/file can be created even if the parent directory has chmod 0. ------------- tb@PC /cygdrive/c/temp $ mkdir ttt

tb@PC /cygdrive/c/temp $ chmod 0 ttt

tb@PC /cygdrive/c/temp $ ls -ld ttt d---------+ 1 tb None 0 Feb 6 20:33 ttt

tb@PC /cygdrive/c/temp $ touch ttt/x

tb@PC /cygdrive/c/temp $ ls -ld ttt d---------+ 1 tb None 0 Feb 6 20:33 ttt

tb@PC /cygdrive/c/temp $ ls -l ttt total 0 -rw-r--r--+ 1 tb None 0 Feb 6 20:33 x -------------------------------------------

If this is POSIX compliant? I'm not an expert here. On the other hand: This test case does not test git, but rather the file system, so we can probaly remove it?

About 1301: Some resereach needs to be done, to find out the connection between umask, cygwin and the mount options.

On my system I have:
$mount
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
/Torsten
Previous: Erik Faye-LundNext: Ramsay Jones
Message 3 of 6 in “[RFC] test-lib.sh: No POSIXPERM for cygwin”
  1. Torsten BögershausenJan 27, 2013
  2. Erik Faye-LundFeb 6, 2013
  3. Torsten BögershausenFeb 6, 2013
  4. Ramsay JonesFeb 7, 2013
  5. Junio C HamanoFeb 7, 2013
  6. Torsten BögershausenFeb 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.