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
1=== modified file 'bzrlib/tests/blackbox/test_breakin.py'
2--- bzrlib/tests/blackbox/test_breakin.py 2009-07-31 14:56:55 +0000
3+++ bzrlib/tests/blackbox/test_breakin.py 2009-09-07 08:41:47 +0000
4@@ -127,7 +127,7 @@
5 # instead. Most notably, the WNOHANG isn't allowed, so
6 # this can hang indefinitely.
7 pid_killed, returncode = os.waitpid(pid, opts)
8- if (pid_killed, returncode) != (0, 0):
9+ if pid_killed != 0 and returncode != 0:
10 if sig is not None:
11 # high bit in low byte says if core was dumped; we
12 # don't care
13
14=== modified file 'bzrlib/tests/blackbox/test_remove.py'
15--- bzrlib/tests/blackbox/test_remove.py 2009-03-23 14:59:43 +0000
16+++ bzrlib/tests/blackbox/test_remove.py 2009-09-07 08:52:04 +0000
17@@ -61,15 +61,18 @@
18 f.write("\nsome other new content!")
19 f.close()
20
21- def run_bzr_remove_changed_files(self, error_regexes, files_to_remove):
22+ def run_bzr_remove_changed_files(self, error_regexes, files_to_remove,
23+ working_dir=None):
24 error_regexes.extend(["Can't safely remove modified or unknown files:",
25 'Use --keep to not delete them,'
26 ' or --force to delete them regardless.'
27 ])
28 self.run_bzr_error(error_regexes,
29- ['remove'] + list(files_to_remove))
30+ ['remove'] + list(files_to_remove),
31+ working_dir=working_dir)
32 #see if we can force it now
33- self.run_bzr(['remove', '--force'] + list(files_to_remove))
34+ self.run_bzr(['remove', '--force'] + list(files_to_remove),
35+ working_dir=working_dir)
36
37 def test_remove_new_no_files_specified(self):
38 tree = self.make_branch_and_tree('.')
39@@ -196,10 +199,9 @@
40 self.run_bzr("commit -m 'added files'")
41 self.changeFile(a)
42 self.changeFile(c)
43- os.chdir('b')
44- self.run_bzr_remove_changed_files(['modified:[.\s]*a[.\s]*b/c'],
45- ['../a', 'c', '.', '../d'])
46- os.chdir('..')
47+ self.run_bzr_remove_changed_files(
48+ ['modified:[.\s]*a[.\s]*b/c'],
49+ ['../a', 'c', '.', '../d'], working_dir='b')
50 self.assertNotInWorkingTree(files)
51 self.failIfExists(files)
52
53
54=== modified file 'bzrlib/tests/per_branch/test_permissions.py'
55--- bzrlib/tests/per_branch/test_permissions.py 2009-03-23 14:59:43 +0000
56+++ bzrlib/tests/per_branch/test_permissions.py 2009-09-07 08:46:00 +0000
57@@ -91,10 +91,10 @@
58 ' permission logic')
59 if sys.platform == 'win32':
60 raise tests.TestNotApplicable('chmod has no effect on win32')
61- elif sys.platform == 'darwin':
62- # OS X creates temp dirs with the 'wheel' group, which users are
63- # not likely to be in, and this prevents us from setting the sgid
64- # bit
65+ elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
66+ # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
67+ # users are not likely to be in, and this prevents us from setting
68+ # the sgid bit
69 os.chown(self.test_dir, os.getuid(), os.getgid())
70 # also, these are BzrBranch format specific things..
71 t = self.make_branch_and_tree('.')
72
73=== modified file 'bzrlib/tests/test_permissions.py'
74--- bzrlib/tests/test_permissions.py 2009-03-23 14:59:43 +0000
75+++ bzrlib/tests/test_permissions.py 2009-09-07 08:46:00 +0000
76@@ -140,10 +140,10 @@
77 def test_new_files_group_sticky_bit(self):
78 if sys.platform == 'win32':
79 raise TestSkipped('chmod has no effect on win32')
80- elif sys.platform == 'darwin':
81- # OS X creates temp dirs with the 'wheel' group, which users are
82- # not likely to be in, and this prevents us from setting the sgid
83- # bit
84+ elif sys.platform == 'darwin' or sys.platform.startswith('freebsd'):
85+ # OS X (and FreeBSD) create temp dirs with the 'wheel' group, which
86+ # users are not likely to be in, and this prevents us from setting
87+ # the sgid bit
88 os.chown(self.test_dir, os.getuid(), os.getgid())
89
90 t = self.make_branch_and_tree('.')