Merge lp:~vila/bzr/freebsd-regressions into lp:bzr

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~vila/bzr/freebsd-regressions
Merge into: lp:bzr
Diff against target: None lines
To merge this branch: bzr merge lp:~vila/bzr/freebsd-regressions
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+11291@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

The test botnet welcomed FreeBSD this week-end.

Here are some fixes that shouldn't be controversial.

That leaves only two failures to get the full suite passing but they are more controversial or may be just a better understanding so I'll submit them separately.

Revision history for this message
Matthew Fuller (fullermd) wrote :

> - elif sys.platform == 'darwin':
> - # OS X creates temp dirs with the 'wheel' group, which users are
> - # not likely to be in, and this prevents us from setting the sgid
> - # bit
> + elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
> + # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
> + # users are not likely to be in, and this prevents us from setting
> + # the sgid bit

This and the other similar one will apply to anything with BSD-derived
filesystem semantics. BSD FSen always inherit the group from the
parent directory (rather than only when the dir is sgid like SysV).
So this will presumably affect Net/Open/Dragonfly/whatever else too,
and maybe others (earlier versions of HP/UX? Like we even support
that... ;)

However, it can vary by filesystem too. On ZFS, for instance, SysV
semantics hold.

--
Matthew Fuller (MF4839) | <email address hidden>
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.

Revision history for this message
Robert Collins (lifeless) wrote :

 merge approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/tests/blackbox/test_breakin.py'
--- bzrlib/tests/blackbox/test_breakin.py 2009-07-31 14:56:55 +0000
+++ bzrlib/tests/blackbox/test_breakin.py 2009-09-07 08:41:47 +0000
@@ -127,7 +127,7 @@
127 # instead. Most notably, the WNOHANG isn't allowed, so127 # instead. Most notably, the WNOHANG isn't allowed, so
128 # this can hang indefinitely.128 # this can hang indefinitely.
129 pid_killed, returncode = os.waitpid(pid, opts)129 pid_killed, returncode = os.waitpid(pid, opts)
130 if (pid_killed, returncode) != (0, 0):130 if pid_killed != 0 and returncode != 0:
131 if sig is not None:131 if sig is not None:
132 # high bit in low byte says if core was dumped; we132 # high bit in low byte says if core was dumped; we
133 # don't care133 # don't care
134134
=== modified file 'bzrlib/tests/blackbox/test_remove.py'
--- bzrlib/tests/blackbox/test_remove.py 2009-03-23 14:59:43 +0000
+++ bzrlib/tests/blackbox/test_remove.py 2009-09-07 08:52:04 +0000
@@ -61,15 +61,18 @@
61 f.write("\nsome other new content!")61 f.write("\nsome other new content!")
62 f.close()62 f.close()
6363
64 def run_bzr_remove_changed_files(self, error_regexes, files_to_remove):64 def run_bzr_remove_changed_files(self, error_regexes, files_to_remove,
65 working_dir=None):
65 error_regexes.extend(["Can't safely remove modified or unknown files:",66 error_regexes.extend(["Can't safely remove modified or unknown files:",
66 'Use --keep to not delete them,'67 'Use --keep to not delete them,'
67 ' or --force to delete them regardless.'68 ' or --force to delete them regardless.'
68 ])69 ])
69 self.run_bzr_error(error_regexes,70 self.run_bzr_error(error_regexes,
70 ['remove'] + list(files_to_remove))71 ['remove'] + list(files_to_remove),
72 working_dir=working_dir)
71 #see if we can force it now73 #see if we can force it now
72 self.run_bzr(['remove', '--force'] + list(files_to_remove))74 self.run_bzr(['remove', '--force'] + list(files_to_remove),
75 working_dir=working_dir)
7376
74 def test_remove_new_no_files_specified(self):77 def test_remove_new_no_files_specified(self):
75 tree = self.make_branch_and_tree('.')78 tree = self.make_branch_and_tree('.')
@@ -196,10 +199,9 @@
196 self.run_bzr("commit -m 'added files'")199 self.run_bzr("commit -m 'added files'")
197 self.changeFile(a)200 self.changeFile(a)
198 self.changeFile(c)201 self.changeFile(c)
199 os.chdir('b')202 self.run_bzr_remove_changed_files(
200 self.run_bzr_remove_changed_files(['modified:[.\s]*a[.\s]*b/c'],203 ['modified:[.\s]*a[.\s]*b/c'],
201 ['../a', 'c', '.', '../d'])204 ['../a', 'c', '.', '../d'], working_dir='b')
202 os.chdir('..')
203 self.assertNotInWorkingTree(files)205 self.assertNotInWorkingTree(files)
204 self.failIfExists(files)206 self.failIfExists(files)
205207
206208
=== modified file 'bzrlib/tests/per_branch/test_permissions.py'
--- bzrlib/tests/per_branch/test_permissions.py 2009-03-23 14:59:43 +0000
+++ bzrlib/tests/per_branch/test_permissions.py 2009-09-07 08:46:00 +0000
@@ -91,10 +91,10 @@
91 ' permission logic')91 ' permission logic')
92 if sys.platform == 'win32':92 if sys.platform == 'win32':
93 raise tests.TestNotApplicable('chmod has no effect on win32')93 raise tests.TestNotApplicable('chmod has no effect on win32')
94 elif sys.platform == 'darwin':94 elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
95 # OS X creates temp dirs with the 'wheel' group, which users are95 # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
96 # not likely to be in, and this prevents us from setting the sgid96 # users are not likely to be in, and this prevents us from setting
97 # bit97 # the sgid bit
98 os.chown(self.test_dir, os.getuid(), os.getgid())98 os.chown(self.test_dir, os.getuid(), os.getgid())
99 # also, these are BzrBranch format specific things..99 # also, these are BzrBranch format specific things..
100 t = self.make_branch_and_tree('.')100 t = self.make_branch_and_tree('.')
101101
=== modified file 'bzrlib/tests/test_permissions.py'
--- bzrlib/tests/test_permissions.py 2009-03-23 14:59:43 +0000
+++ bzrlib/tests/test_permissions.py 2009-09-07 08:46:00 +0000
@@ -140,10 +140,10 @@
140 def test_new_files_group_sticky_bit(self):140 def test_new_files_group_sticky_bit(self):
141 if sys.platform == 'win32':141 if sys.platform == 'win32':
142 raise TestSkipped('chmod has no effect on win32')142 raise TestSkipped('chmod has no effect on win32')
143 elif sys.platform == 'darwin':143 elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
144 # OS X creates temp dirs with the 'wheel' group, which users are144 # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
145 # not likely to be in, and this prevents us from setting the sgid145 # users are not likely to be in, and this prevents us from setting
146 # bit146 # the sgid bit
147 os.chown(self.test_dir, os.getuid(), os.getgid())147 os.chown(self.test_dir, os.getuid(), os.getgid())
148148
149 t = self.make_branch_and_tree('.')149 t = self.make_branch_and_tree('.')