[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2426: drop-upload on Windows: admin privileges needed to run tests on Windows 7+

Tahoe-LAFS trac at tahoe-lafs.org
Mon May 18 22:45:29 UTC 2015


#2426: drop-upload on Windows: admin privileges needed to run tests on Windows 7+
------------------------------------------------+-------------------------
 Reporter:  daira                               |          Owner:  daira
     Type:  defect                              |         Status:  new
 Priority:  normal                              |      Milestone:  1.11.0
Component:  unknown                             |        Version:  unknown
 Keywords:  drop-upload windows tests security  |  Launchpad Bug:
------------------------------------------------+-------------------------
 Running the drop-upload tests without admin privileges on Windows 7 gives
 these errors when run from a normal (non-admin) command prompt:
 {{{
 [ERROR]
 Traceback (most recent call last):
   File "c:\tahoe\git\tahoe-magic\src\allmydata\test\test_drop_upload.py",
 line 247, in <lambda>
     d.addCallback(lambda ign: self._check_file(u"short", "test"))
   File "c:\tahoe\git\tahoe-magic\src\allmydata\test\test_drop_upload.py",
 line 298, in _check_file
     fileutil.flush_volume(path_u)
   File "c:\tahoe\git\tahoe-magic\src\allmydata\util\fileutil.py", line
 599, in flush_volume
     raise WinError(get_last_error())
 exceptions.WindowsError: [Error 6] The handle is invalid.

 allmydata.test.test_drop_upload.MockTest.test_drop_upload
 allmydata.test.test_drop_upload.RealTest.test_drop_upload
 }}}

 (probably also on Windows Vista, but no-one will ever make me care about
 Vista any more).

 `FlushFileBuffers` on a drive is indeed [https://msdn.microsoft.com/en-
 us/library/windows/desktop/aa364439%28v=vs.85%29.aspx documented to
 require admin privs]:
 > To flush all open files on a volume, call '''!FlushFileBuffers''' with a
 handle to the volume. The caller must have administrative privileges.

 I'm not actually sure that flushing buffers is still necessary; for the
 time being I'll keep it in until the tests are fully debugged, and then
 try removing it.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2426>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list