Commit Graph

3146 Commits

Author SHA1 Message Date
Brian Warner
05dbb1cf86 update project-home URLs: /trac/tahoe/ was replaced by /trac/tahoe-lafs/ 2011-10-30 12:14:28 -07:00
Zooko O'Whielacronx
d9c1064d42 undo the effects of a patch I hadn't intended to commit, named "debugprint the values of blocks and hashes thereof; make the test data and the seg size small in order to make the debugprints easy to look at"
rolling back:

Thu Sep 29 23:46:28 MDT 2011  zooko@zooko.com
  * debugprint the values of blocks and hashes thereof; make the test data and the seg size small in order to make the debugprints easy to look at

    M ./src/allmydata/mutable/publish.py -1 +2
    M ./src/allmydata/mutable/retrieve.py +3
    M ./src/allmydata/test/test_mutable.py -2 +2
2011-10-28 22:03:49 +00:00
Zooko O'Whielacronx
416701e404 debugprint the values of blocks and hashes thereof; make the test data and the seg size small in order to make the debugprints easy to look at 2011-09-30 05:46:28 +00:00
Brian Warner
633641174a mutable/retrieve: don't write() after we've been pauseProducer'ed
This fixes a test failure found against current Twisted trunk in
test_mutable.Filenode.test_retrieve_producer_mdmf (when it uses
PausingAndStoppingConsumer). There must be some sort of race: I could
make it fail against Twisted-11.0 if I just increased the 0.5s delay in
test_download.PausingAndStoppingConsumer to about 0.6s, and could make
Twisted-trunk pass by reducing it to about 0.3s .

I fixed the test (as opposed to the bug) by replacing the delay with a
simple reliable eventually(), and adding extra asserts to fail the test
if the consumer's write() method is called while the producer is
supposed to be paused

The bug itself was that mutable.retrieve.Retrieve wasn't checking the
"stopped" flag after resuming from a pause, and thus delivered one
segment to a consumer that wasn't expecting it. I split out
stopped-flag-checking to separate function, which is now called
immediately after _check_for_paused(). I also cleaned up some Deferred
usage and whitespace.
2011-10-16 17:24:00 -07:00
Brian Warner
fff237be9a remove interpreter shbang lines from non-executables
thanks to Greg Troxel for the catch
2011-10-14 10:23:01 -07:00
Brian Warner
d28041fbe4 CLI: don't deprecate --mutable, small docs fixes. refs #1561
Also don't accept 'tahoe mkdir --format=chk'.
2011-10-13 21:00:02 -07:00
Brian Warner
57ee56533f add --format= to 'tahoe put'/'mkdir', remove --mutable-type. Closes #1561 2011-10-13 20:15:00 -07:00
Brian Warner
3eb60ff986 web/filenode.py: rely on Request.notifyFinish. Closes #1366.
This is safe now that tahoe depends upon Twisted>=10.1, since notifyFinish
first appeared in Twisted-9.0
2011-10-13 13:12:19 -07:00
david-sarah
3dc491758d util/happinessutil.py: suppress a warning from check-miscaptures. (It is not a bug because the capturing function is only used by a 'map' in the same iteration.) refs #1556 2011-10-08 22:21:06 -07:00
david-sarah
22da015dd1 Fix some more potential bugs in test code exposed by check-miscaptures.py. refs #1556 2011-10-06 20:38:47 -07:00
david-sarah
a31a701e42 Fix some potential bugs (in non-test code) exposed by check-miscaptures.py. refs #1556 2011-10-06 20:24:44 -07:00
david-sarah
bdfa7b3772 Fix some potential bugs in test code exposed by check-miscaptures.py. refs #1556 2011-10-06 19:34:43 -07:00
Brian Warner
11ce612589 oops, missed a test failure 2011-10-13 09:37:13 -07:00
Brian Warner
210761cd49 misc mutable-type fixes:
* fix tahoe.cfg control of default mutable type
* tolerate arbitrary case in [client]mutable.format value
* small docs improvements
* use get_mutable_type() as a format-is-mutable predicate
* tighten up error message
2011-10-13 09:32:29 -07:00
Brian Warner
01b00dc7dc webapi: use all-caps "SDMF"/"MDMF" acronyms in t=json response
docs: upcase examples of t=json output and format= input
2011-10-13 09:31:43 -07:00
Brian Warner
dad354b275 webapi: handle format=, remove mutable-type=
* fix CLI commands (put, mkdir) to send format=, not mutable-type=
* fix tests
* test_cli: fix tests that observe t=json output, don't ignore failures in
  'tahoe put'
* fix handling of version= to make it easier to use the default
* interpret ?mutable=true&format=MDMF as MDMF, not SDMF
2011-10-13 09:29:51 -07:00
david-sarah
2acc0419b9 Tests for ref #1547 2011-10-01 20:53:16 -07:00
david-sarah
978fd83856 Change the file upload forms on directory and welcome pages to use a 3-way radio button to select immutable, SDMF, or MDMF. Add '(experimental)' to the label for creating an MDMF directory. Also improve the spacing of form elements. refs #1547 2011-10-01 20:45:03 -07:00
david-sarah
ac780a4148 test_web.py: minor cleanups, mainly to make the first argument to shouldFail tests consistent 2011-10-01 21:03:32 -07:00
david-sarah
38d819ef44 Tests for ref #1552 2011-10-01 21:00:36 -07:00
david-sarah
5ae446fbd2 test/common.py: in shouldFail and shouldHTTPError, when the raised exception does not include the expected substring (or, for shouldHTTPError, when the status code is wrong), mention which test that happened in. 2011-10-10 17:22:27 -07:00
david-sarah
cf9bf2ea10 interfaces.py: remove get_extension_params and set_extension_params methods from IMutableFileURI. refs #393, #1526 2011-10-10 12:48:42 -07:00
david-sarah
de00b277cc interfaces.py: fix a typo in the name of IMutableSlotWriter.put_encprivkey. refs #393 2011-10-10 12:46:42 -07:00
david-sarah
bc0d9b682e immutable/literal.py: add pauseProducing method to LiteralProducer. refs #1537 2011-10-03 12:52:39 -07:00
david-sarah
bc50edc86e no_network.py: Clean up whitespace around code changed by previous patch. 2011-10-03 18:04:07 -07:00
david-sarah
ee25dcd2fc no_network.py: Fix potential bugs in some tests due to capture of slots in for loops. 2011-10-03 18:02:31 -07:00
Brian Warner
0716c496c8 MDMF: remove extension fields from caps, tolerate arbitrary ones. Fixes #1526
The filecaps used to be produced with hints for 'k' and segsize, but they
weren't actually used, and doing so had the potential to limit how we change
those filecaps in the future. Also the parsing code had some problems dealing
with other numbers of extensions. Removing the existing fields and making the
parser tolerate (and ignore) extra ones makes MDMF more future-proof.
2011-10-02 00:35:53 +01:00
david-sarah
5ba0529b87 test/test_runner.py: BinTahoe.test_path has rare nondeterministic failures; this patch probably fixes a problem where the actual cause of failure is masked by a string conversion error. 2011-09-27 15:53:36 -07:00
david-sarah
f72cba50ba mutable/publish.py: fix an unused import. refs #1542 2011-09-24 22:22:06 -07:00
david-sarah
c88adf0ac0 mutable/layout.py: make unpack_sdmf_checkstring and unpack_mdmf_checkstring more similar, and change an assert to give a more useful message if it fails. refs #1540 2011-09-24 19:36:51 -07:00
kevan
70d27cfa7c mutable/publish: handle unknown mutable share formats when handling errors 2011-09-24 17:43:05 -07:00
kevan
e8afe84813 mutable/layout: break unpack_checkstring into unpack_mdmf_checkstring and unpack_sdmf_checkstring, add distinguisher function for checkstrings 2011-09-24 17:41:34 -07:00
kevan
2187f27ad0 test/test_mutable: reenable mdmf publish surprise test 2011-09-24 16:54:15 -07:00
kevan
a911e15783 mutable/publish: use unpack_mdmf_checkstring and unpack_sdmf_checkstring instead of unpack_checkstring. fixes #1540 2011-09-24 16:51:37 -07:00
david-sarah
1fa5c729b7 mutable/publish.py: copy the self.writers dict before iterating over it, since we remove elements from it during the iteration. refs #393 2011-09-24 14:12:08 -07:00
david-sarah
f94eb86fc9 mutable/publish.py: simplify by refactoring self.outstanding to self.num_outstanding. refs #393 2011-09-24 13:50:04 -07:00
david-sarah
4af626a798 test_mutable.py: update SkipTest message for test_publish_surprise_mdmf to reference the right ticket number. refs #1540. 2011-09-23 14:16:22 -07:00
Brian Warner
f61bdbffd7 control.py: unbreak speed-test: overwrite() wants a MutableData, not str
Really, all the upload/modify APIs should take a string or a filehandle, and
internally wrap it as needed. Callers should not need to be aware of
Uploadable() or MutableData() classes.
2011-09-23 00:37:48 -07:00
david-sarah
5d3d0dc336 test_mutable.py: skip test_publish_surprise_mdmf, which is causing an error. refs #1534, #393 2011-09-20 11:33:19 -07:00
kevan
d93b2965c3 test/test_mutable: write publish surprise test for MDMF, rename existing test_publish_surprise to clarify that it is for SDMF 2011-09-17 17:36:57 -07:00
kevan
19cf58f2aa test/test_mutable: refactor publish surprise test into common test fixture, rewrite test_publish_surprise to use test fixture 2011-09-17 17:35:33 -07:00
kevan
8c7406508a mutable/publish: add errback immediately after write, don't consume errors from other parts of the publisher 2011-09-17 16:47:08 -07:00
david-sarah
87a936564e uri.py: fix two interface violations in verifier URI classes. refs #1474 2011-09-19 20:01:56 -07:00
Brian Warner
8e69b94588 Make platform-detection code tolerate linux-3.0, patch by zooko.
Otherwise address-autodetection can't find ifconfig. refs #1536
2011-09-15 13:26:20 -07:00
david-sarah
3f756e9429 test_web.py: fix a bug in _count_leases that was causing us to check only the lease count of one share file, not of all share files as intended. 2011-09-15 11:51:26 -07:00
Zooko O'Whielacronx
2025e42ec2 tests: bump up the timeout in this test that fails on FreeStorm's CentOS in order to see if it is just very slow 2011-09-12 19:42:55 -07:00
david-sarah
c10099f982 interfaces: document that the 'fills-holes-with-zero-bytes' key should be used to detect whether a storage server has that behavior. refs #1528 2011-09-12 17:28:43 -07:00
Zooko O'Whielacronx
32f80625c9 storage: more paranoid handling of bounds and palimpsests in mutable share files
* storage server ignores requests to extend shares by sending a new_length
* storage server fills exposed holes (created by sending a write vector whose offset begins after the end of the current data) with 0 to avoid "palimpsest" exposure of previous contents
* storage server zeroes out lease info at the old location when moving it to a new location
ref. #1528
2011-09-12 15:26:55 -07:00
Zooko O'Whielacronx
942c5e5162 storage: test that the storage server ignores requests to extend shares by sending a new_length, and that the storage server fills exposed holes with 0 to avoid "palimpsest" exposure of previous contents
ref. #1528
2011-09-12 15:25:54 -07:00
Zooko O'Whielacronx
20e2910c61 immutable: prevent clients from reading past the end of share data, which would allow them to learn the cancellation secret
Declare explicitly that we prevent this problem in the server's version dict.
fixes #1528 (there are two patches that are each a sufficient fix to #1528 and this is one of them)
2011-09-12 15:24:58 -07:00