~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lock.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-31 15:49:25 UTC
  • mto: This revision was merged to the branch mainline in revision 4611.
  • Revision ID: john@arbash-meinel.com-20090731154925-fquqoz209bh9aabr
Change the flags around a bit.

Now it is selftest -Edisable_lock_checks rather than -Dlock
it is also now -Dstrict-locks to enable the new debugging,
and I'll work on getting the test suite to always set that value,
with -Edisable_lock_checks reverting that value.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
        try:
77
77
            if lock.have_fcntl and self.write_lock is lock._fcntl_WriteLock:
78
78
                # With -Dlock, fcntl locks are properly exclusive
79
 
                debug.debug_flags.add('lock')
 
79
                debug.debug_flags.add('strict-locks')
80
80
                self.assertRaises(errors.LockContention,
81
81
                                  self.write_lock, 'a-lock-file')
82
82
                # But not without it
83
 
                debug.debug_flags.remove('lock')
 
83
                debug.debug_flags.remove('strict-locks')
84
84
                try:
85
85
                    w_lock = self.write_lock('a-lock-file')
86
86
                except errors.LockContention:
101
101
        try:
102
102
            if lock.have_fcntl and self.read_lock is lock._fcntl_ReadLock:
103
103
                # With -Dlock, fcntl locks are properly exclusive
104
 
                debug.debug_flags.add('lock')
 
104
                debug.debug_flags.add('strict-locks')
105
105
                self.assertRaises(errors.LockContention,
106
106
                                  self.read_lock, 'a-lock-file')
107
107
                # But not without it
108
 
                debug.debug_flags.remove('lock')
 
108
                debug.debug_flags.remove('strict-locks')
109
109
                try:
110
110
                    r_lock = self.read_lock('a-lock-file')
111
111
                except errors.LockContention: