summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Adding a new HD XOR code for k=3, m=3, hd=3Kevin Greenan2015-04-093-3/+15
| | | | | | Also added additional test to test_xor_code to do an exhaustive decode test (all possible 1 and 2 disk failures) and changed teh default liberasurecode test to test (3, 3, 3).
* Merged in fix-metadata-check (pull request #13)Tushar Gohad2015-03-301-0/+6
|\ | | | | | | fix-metadata-check from Kota
| * Add a decode error test w/o metadata checkKota Tsuyuzaki2015-03-301-0/+5
| |
| * Fix invalid metadata handlingKota Tsuyuzaki2015-03-301-1/+2
| | | | | | | | | | | | | | | | | | On the current code, get_fragment_partition might touch the invlid memory area with minus index (that means a invalid header) and it causes segmentation fault. This fixes it to handle the minus index as a EBADHEADER and then no segmentaition fault appeared on the case.
* | Fix building with --disable-staticPete Zaitcev2015-03-301-1/+1
| | | | | | | | | | | | | | | | Fedora packaging rules require ./configure --disable-static. However, that ends with: ../src/.libs/liberasurecode.so: undefined reference to `dlopen' The fix is to add a missing -ldl into flags of test_xor_hd_code.
* | Fix nasty rebuild bug where partiy would be reconstructed incorrectlyKevin Greenan2015-03-301-4/+24
|/ | | | | | | | when both data and parity was missing. The fix is to just call decode when reconstructing parity, since it will have to do extra work anyway when data is missing. We did a little extra work in ISA-L to do better, but can save that for later, since 99% of the time decode will perform just fine.
* Sanitize fragments_to_string() errorcodes, add tests for frags w/o fmetadataTushar Gohad2015-03-281-2/+50
| | | | Addresses issue#10
* Reallow 0 byte encodesTushar Gohad2015-03-111-4/+0
|
* test: Add missing EBACKENDNOTAVAIL checksv1.0.3Tushar Gohad2015-03-101-4/+55
| | | | | | | | | | | | Without these checks, backend libraries not being available is causing errors like in tests that are missing these checks: $ make test [snip] ok 1 - test_create_backend_invalid_args: UNKNOWN lt-liberasurecode_test: liberasurecode_test.c:276: test_destroy_backend_invalid_args: Assertion `desc > 0' failed. make: *** [test] Aborted (core dumped) Closes issue #6
* WIP: fix doubtful codeKota Tsuyuzaki2015-03-091-3/+2
|
* Use enum value when handling shssKota Tsuyuzaki2015-03-091-1/+1
|
* Apply EINSUFFFRAGS to reconstructKota Tsuyuzaki2015-03-061-0/+21
|
* Rename metadata_adder on backend_commonKota Tsuyuzaki2015-03-051-1/+1
| | | | This patch renames the "metadata_adder" variable to "backend_metadata_size"
* Fix small thingsKota Tsuyuzaki2015-02-271-2/+4
| | | | | | | | Small fixes as follows: - Add is_compatible_with function into shss backend - Remove encoded data check against to shss at liberasurecode_test.c - Decrease metadata_adder size on shss backend to be correct fixed value
* Enable to get fragment_len includes metadata_adderKota Tsuyuzaki2015-02-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to get correct fragment size includes metadata_adder. Current implementaion automatically allocates extra bytes for the metadata_adder in alloc_buffer, and then, no information about the extra bytes will be returned to the api caller side. It's too confusable because callers couldn't know how size they assumes as the fragment size. To be easy to find out the size infomation, this patch adds "frag_adder_size" variable into fragment metadata and also some functions to get fragment size. The definitions of these size infomation are here, fragment_meta: - size-> raw data size used to encode/fragment_to_string - frag_adder_size-> metadata_adder of backend specification And the definitions of functions are here, - get_fragment_size: -> return sizeof(fragument_header) + size + frag_adder_size - get_fragment_buffer_size: -> return size + frag_adder_size - get_fragment_payload_size: -> return size By using these function above, users could get the size information directly from fragments. It results in enabling to return fragment_len to the caller side easily.
* Ensure fragment pointers passed to cleanupKota Tsuyuzaki2015-02-271-0/+17
| | | | | | | | | | | | | | | | | | | | | | | This patch achieves a couple of things as follows: - Undoing the liberasurecode_encode_cleanup specification to expect "fragment" pointers as its arguments. - Ensuring liberasurecode_encode to pass "fratment" pointers to liberasurecode_encode_cleanup. liberasurecode_encode_cleanup is used also in pyeclib so that it is expected that the argument pointers (i.e. encoded_data and encoded_parity) should be the collection of the heads of "fragment" pointers. However, when the backend encode fails, liberasurecode keeps "data" pointers behind of fragment_header, and then, goes to "out:" statement to cleanup its memories. It causes invalid pointer failure. This patch adds a translation function from "data" pointers to "fragment" pointers and ensure liberasurecode_encode to pass correct pointers to libersurecode_encode_cleanup.
* Fix get_fragment_partition return valueKota Tsuyuzaki2015-02-271-0/+60
| | | | | | | | When num_missing is over than the num of parities (i.e. > m), get_fragment_partition should return -1 as an error code. This patch fixes it and adds a test called "test_get_fragment_partition" into liberasurecode_test.c.
* Add NTT backend called "shss"ntt_backendKota Tsuyuzaki2015-02-101-21/+93
| | | | | | | | | | | | | | This introduces a new plug-able backend called "shss" made by Nippon Telegraph and Telephone corporation (NTT). Note that this produces a just plug-in to shss erasure coding binary so that users have to install a shss binary (i.e. libshss.so) aside from liberasurecode when using shss. Please contact us if you are insterested in the NTT backend (welcome!): Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp> Co-Author: Ryuta Kon <kon.ryuta@po.ntts.co.jp>
* Add optional fragment metadata check for decodeTushar Gohad2015-01-302-15/+15
| | | | Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
* Decreasing the verbosity of the tests and renaming one of the stripe verifyKevin Greenan2015-01-192-14/+11
| | | | | tests to a 'fragment verify' test, since it is using is_valid_fragment and and validating fragment headers, not stripe-level.
* add fragment validationEric Lambert2014-11-091-4/+233
|
* fixed mem leaks in unit testsEric Lambert2014-10-101-0/+23
|
* add backend_id and backend_version to fragment metadataEric Lambert2014-10-031-0/+11
|
* libec version is now stored in fragment headerEric Lambert2014-10-021-0/+7
|
* Check decode error code during missing frags testsTushar Gohad2014-09-301-3/+5
| | | | Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
* Plugging-in the ISA-L backend... Still needs more documentation and a ↵Kevin Greenan2014-09-291-1/+50
| | | | little clean-up, but the tests are passing...
* Char * backend names are no longer supported. They have been replaced with ↵Eric Lambert2014-09-292-124/+44
| | | | elements of the ec_backend_id_t enum.
* liberasurecode_backend_lookup_id now returns EC_BACKENDS_MAX, asnewapiEric Lambert2014-09-261-4/+4
| | | | | | | opposed to -1, when it can not locate the specified backend (-1 was a non-sensical return value since the function signature called for a type of ec_backend_id_t). NOTE: with this change we now successfully build and tests pass on OS X with clang.
* crc32 checksum now supported (prior to this commit checksum values wereEric Lambert2014-09-251-4/+4
| | | | not being placed into the fragment header).
* Add checksum testcases (but most turned off since we dont seem to beEric Lambert2014-09-251-54/+152
| | | | supporting checksums at the moment).
* A little bit of code clean up based on feedback/reviewsEric Lambert2014-09-151-1/+1
|
* Removed unused timer variables from libec_slapEric Lambert2014-09-111-12/+0
|
* Compile in pedantic mode and fail compilation on warnings. Also cleanup all ↵Eric Lambert2014-09-104-20/+12
| | | | existing warnings.
* added simple test for get_fragment_metadataEric Lambert2014-09-031-0/+59
|
* added argument validation logic and tests forEric Lambert2014-09-021-0/+49
| | | | | | | | liberasure_get_fragment_metadata and liberasurecode_verify_stripe_metadata. In the process removed the liberasure descriptor from the liberasure_get_fragment_metadata function's signature as it was not being used in the function's implementation.
* Merge branch 'newapi' of https://bitbucket.org/tsg-/liberasurecode into newapiEric Lambert2014-09-022-2/+2
|\
| * Add doxygen config. Update README, copyrights.Tushar Gohad2014-09-012-2/+2
| | | | | | | | Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
* | Added more tests (most of which test that the "public" functionsEric Lambert2014-09-021-40/+307
|/ | | | | | perform some argument validity checks). Also fixed some bugs exposed by these new tests. NOTE: liberasurecode_test now *requires* that the null provider be loadable by the test (meaning is on LD_LIBRARY_PATH).
* Fix memory corruption (did not alloc enough in the fragments_needed test).Kevin Greenan2014-08-261-7/+7
|
* skipping fragment_needed test as they have exposed some kind of memoryEric Lambert2014-08-261-4/+3
| | | | corruption issue.
* Merge branch 'newapi' of https://bitbucket.org/tsg-/liberasurecode into newapiEric Lambert2014-08-261-12/+158
|\
| * Freeing the memory allocated by the fragments_needed tests.Kevin Greenan2014-08-261-0/+5
| |
| * Added tests for new get_fragments_needed API.Kevin Greenan2014-08-261-12/+153
| | | | | | | | | | | | | | | | I also fixed some bugs in the tests: 1.) The Hamming distances were incorrect 2.) The translation of Hamming distance to tolerated errors was incorrect (num tolerated = HD -1) 3.) Some of the test names were manged (probably a runaway s///g)
* | Added libec_slap testEric Lambert2014-08-263-1/+602
|/
* Backend changes needed to honor "excluded fragments".Kevin Greenan2014-08-211-1/+4
|
* minor clean upEric Lambert2014-08-201-7/+8
|
* Merge branch 'newapi' of https://bitbucket.org/tsg-/liberasurecode into newapiEric Lambert2014-08-201-53/+47
|\ | | | | | | | | Conflicts: test/liberasurecode_test.c
| * Make style consistent (formatting, variable defs)Tushar Gohad2014-08-201-51/+46
| | | | | | | | Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
| * - Cleaned up the documentation in erasurecode.h to ensure that itMark Storer2014-08-181-2/+2
| | | | | | | | | | | | | | | | | | follows a common format and that it accurately reflects the code. - Cleaned up liberasurecode_instance_destroy to ensure that the return code is correct and that it is not trying to free data that has not been removed from the open instances. - Updated the tests to assert that the liberasurecode_instance_destroy method is return correctly.
* | decode test now inspects fragmentsEric Lambert2014-08-201-0/+21
|/