]> arthur.barton.de Git - bup.git/commit
tmetadata: the "non existent group name" test didn't make any sense.
authorAvery Pennarun <apenwarr@gmail.com>
Sun, 20 Mar 2011 09:19:08 +0000 (02:19 -0700)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 20 Mar 2011 09:42:10 +0000 (02:42 -0700)
commit344de17fdf54ad6f8ff6036c4e3b17c37e54e2e4
treeb613ca962e0666bddaaf03bed58c83af81943b5b
parent71948a603c68fb24108eb09a26d7eda9b311bc10
tmetadata: the "non existent group name" test didn't make any sense.

There's certainly no reason to expect the file's uid/gid would have changed
after a call that's supposed to fail.  It was passing by pure luck on Linux,
which doesn't have a sticky gid bit causing the newly created file to have
a gid != os.getgid().  But on MacOS, the file was originally created with a
gid != os.getgid(), and so restoring its numeric id restored that, and then
the test failed.

The test is still kind of pointless; it doesn't actually test anything
useful, like (for example) automatic fallback to restoring by numeric gid if
the groupname can't be found.  In fact, looking at the code, it doesn't seem
like it *would* fall back, which is a bug.  But I'm not going to fix that
right now.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/t/tmetadata.py