Commit graph

210 commits

Author SHA1 Message Date
Kyle Marsh
f45d28765d S3 Fuzzer: remove num-retries override
Overriding num-retries to 0 sometimes causes boto to fail when the server
doesn't respond fast enough.  Removing the override shouldn't cause any
problems with the fuzzer.
2011-09-12 13:02:27 -07:00
Kyle Marsh
d2c841d1df S3 Fuzzer: PRNG Seed and decisiong graph fixes
- Change random seed generator to always spit out ints between 0 and 100,000
- Fix seeds so randomly generated seeds are *actually* the same as those seeds
	read from a file.
- Tweaks to decision graph

Remaining Bugs:
	- Single } encountered in format string
	- _mexe complains about "BadStatusLine"
2011-09-12 13:01:50 -07:00
Kyle Marsh
23fee1476a S3 Fuzzer: Start Fuzzing
- tweak yaml decision graph
- add test setup bucket creation, etc.
- add output with varying levels of verbosity
2011-09-12 13:01:07 -07:00
Kyle Marsh
76956d86e4 S3 Fuzzer: finish describing bucket operations
Finishing touches on decision graph for bucket operations.
2011-09-12 12:59:53 -07:00
Kyle Marsh
e12f124686 S3 Fuzzer: Change how random data works
Remove SpecialVariables dict subclass in favor of RepeatExpandingFormatter
string.Formatter subclass.
2011-09-12 12:58:57 -07:00
Kyle Marsh
bfca00ac4c S3 Fuzzer: start writing nodes for bucket PUTs
Continue working on decision graph; add PUT requests for buckets.
2011-09-12 12:58:20 -07:00
Kyle Marsh
14288ad2f6 S3 Fuzzer: Incorporate Tv's suggestions
Tv looked over the fuzzer and had some idiomatic and design suggestions.

Adds several tests and reworks how expansion happens in addition to idiom
changes.
2011-09-12 12:57:43 -07:00
Kyle Marsh
bb7111a0d1 S3 Fuzzer: Write Decision Graph
Start writing the decision graph describing the fuzzer's attack surface in
earnest.
2011-09-12 12:55:32 -07:00
Kyle Marsh
62bd05a390 S3 Fuzzer: Handle null choices
Sometimes you might want to have your current node terminate the descent or
set something to the empty string.
2011-09-12 12:53:18 -07:00
Kyle Marsh
d7b49713f7 S3 Fuzzer: Implmented headers and made random safe
Random can sometimes include } or { which will confuse the string formatter.
Formatter escapes those values when they're doubled: }}, {{ but this
required some slight hacking to the expander.
2011-09-12 12:53:18 -07:00
Kyle Marsh
3f1314f7c8 S3 Fuzzer: set values can be weighted lists now 2011-09-12 12:53:18 -07:00
Kyle Marsh
4737652fc1 S3 Fuzzer: Added binary mode to random data generator 2011-09-12 12:53:18 -07:00
Kyle Marsh
195571b555 S3 Fuzzer: support weights for choices 2011-09-12 12:53:18 -07:00
Kyle Marsh
f5bb3f9c15 S3 Fuzzer: implemented decision expansion
Decision reached by descending the graph describing the attack surface can
be expanded to fill in all the placeholders
2011-09-12 12:53:17 -07:00
Kyle Marsh
7d9ec02686 S3 Fuzzer: Added SpecialVariables dict subclass
Helper class to catch sentinal keys and turn them into random values.  This
will be used to generate garbage data when expanding a decision.

Also add unit tests for expand_decision and assemble_decision
2011-09-12 12:52:37 -07:00
Kyle Marsh
a9a41a2891 S3 Fuzzer: began writing graph descent
still missing headers and choice weights
2011-09-12 12:52:37 -07:00
Kyle Marsh
fc93c02963 S3 Fuzzer: Change direction towards decision tree
Fuzzer now builds requests based on a DAG that describes the request space
and attack surface.
2011-09-12 12:51:01 -07:00
Kyle Marsh
691955935d S3 Fuzzer: add authorization to FuzzyRequest 2011-09-12 12:50:43 -07:00
Kyle Marsh
31adf6afa5 S3 Fuzzer: Begin writing unit tests for S3 Fuzzer 2011-09-12 12:50:14 -07:00
Kyle Marsh
93cf99aed9 S3 Fuzzer: Add skeleton for a targeted S3 Fuzzer 2011-09-12 12:49:12 -07:00
Stephon Striplin
2efa622751 Add atomic read tests 2011-08-29 13:14:18 -07:00
Stephon Striplin
f232f43d0b update attr decorators for dho
* passes test_object_raw_put_authenticated
* fails test_atomic_write_bucket_gone
2011-08-29 12:47:17 -07:00
Stephon Striplin
eeaeec573b don't delete key in atomic gone test
The key hasn't been written to the server so it doesn't need a delete
2011-08-29 12:36:00 -07:00
Stephon Striplin
3d775a02f4 add raw PUT tests 2011-08-26 13:45:37 -07:00
Stephon Striplin
76f78c0bb8 refactor raw GET tests
urllib2 is no longer necessary. We will use urlparse instead to get the
path and query components of the uri.
2011-08-26 13:42:31 -07:00
Stephon Striplin
e4d78eccbb add test for missing Content-Length header bucket creation 2011-08-25 17:46:25 -07:00
Stephon Striplin
aa700f1c8a add an atomic put test for removing bucket 2011-08-25 17:20:11 -07:00
Stephon Striplin
18d0b7d250 Add raw GET tests 2011-08-25 11:39:50 -07:00
Tommi Virtanen
cc9a026f6b Add dependency on isodate.
Commit ea3f73ef90 made
s3tests use isodate, but did not depend on it.
2011-08-15 14:46:03 -07:00
Stephon Striplin
ea3f73ef90 add bucket list data vs object data comparison tests
* test_bucket_list_return_data
* test_bucket_list_object_time
2011-08-11 15:58:26 -07:00
Stephon Striplin
fd68aa2b5b remove superfluous code in test_bucket_list_maxkeys_zero 2011-08-11 15:52:16 -07:00
Stephon Striplin
16d84101e4 remove fails_on_dho on passing tests
* test_object_set_get_metadata_empty_to_unreadable_prefix
* test_object_set_get_metadata_empty_to_unreadable_suffix
* test_object_set_get_metadata_empty_to_unreadable_infix
* test_object_set_get_metadata_overwrite_to_unreadable_prefix
* test_object_set_get_metadata_overwrite_to_unreadable_suffix
* test_object_set_get_metadata_overwrite_to_unreadable_infix
2011-08-11 13:42:10 -07:00
Stephon Striplin
5e7792e0bf Switch test_bucket_list_maxkeys_unreadble to use '\n' instead of '\a'.
This avoids the SAX parser error. It also gave a different error code
from Amazon.
2011-08-11 11:23:43 -07:00
Stephon Striplin
80d332346f Switch tests using '\a' to '\n'
As noted in ce3d448d64, This will avoid
SAX parser errors.
2011-08-11 11:21:17 -07:00
Stephon Striplin
adcfe6f681 remove contentlength zero header test
This test effectively tells the server that this request will contain no
data and any data in the body should be interpreted to be part of the
next request. By luck, we close the tcp connection beforehand so we
don't see this additional data. However, the issues caused here would
not be at the rgw/dho level.
2011-08-11 11:01:56 -07:00
Tommi Virtanen
230ec11852 Flag test_object_create_bad_contenttype_unreadable as failing on both RGW and DHO. 2011-08-11 09:35:06 -07:00
Tommi Virtanen
76faa58bf7 DHO does not support bucket logging currently. 2011-08-11 09:31:20 -07:00
Tommi Virtanen
ce3d448d64 Switch test_object_create_unreadable to use '\n' instead of '\a'.
This avoids a SAX/boto interaction bug that is not of much interest,
yet still seems "evil" enough that it fulfills the original intent
of the test.

Add a link to the relevant bug report.
2011-08-11 09:30:26 -07:00
Tommi Virtanen
48e078a758 Flag test_bucket_list_maxkeys_unreadable as failing on dho & rgw. 2011-08-11 09:28:48 -07:00
Tommi Virtanen
6577c8266c Flag some fails_on_dho tests as fails_on_rgw too. 2011-08-11 08:47:25 -07:00
Tommi Virtanen
7da111aa7e Test that S3 object write replaces the metadata.
See http://tracker.newdream.net/issues/1352
2011-08-10 15:04:19 -07:00
Tommi Virtanen
199b8b46c5 Test S3 api for handling of Content-MD5 that does not match.
The existing test_object_create_bad_md5_invalid is not valid
base64, and hence triggers a different code path. This time,
submit valid base64, but have the result not match the expected
md5sum.
2011-08-10 14:55:34 -07:00
Stephon Striplin
0e9935a01e refactor/add additional prefix/delimiter bucket list tests 2011-08-10 12:05:28 -07:00
Stephon Striplin
f855beff73 add marker bucket list tests 2011-08-09 18:42:06 -07:00
Stephon Striplin
1f2810557f add maxkeys bucket list tests 2011-08-09 18:35:18 -07:00
Stephon Striplin
e7f66f178e add test for no bucket list delimiter 2011-08-09 15:02:54 -07:00
Stephon Striplin
881c09f626 add test for checking bucket list with no prefix 2011-08-08 17:39:02 -07:00
Stephon Striplin
0e698734b6 add non-existant prefix bucket list test 2011-08-08 17:24:40 -07:00
Stephon Striplin
c89404ba68 remove fails_on_dho/rgw on test_bucket_list_many 2011-08-08 16:40:14 -07:00
Stephon Striplin
854dcc5b10 create additional parameterized bucket list tests
* Test on prefix and delimiter, including slash and non-slash
  delimiters.
2011-08-08 15:16:15 -07:00