summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fragment metadata checksumming supportfrag_metadata_checksumTushar Gohad2016-03-101-4/+16
|
* Add a method to check if a backend is present.Timur Alperovich2016-03-081-0/+18
| | | | | | | Uses dlopen to check if a backend is present. This may be used by consumers who need to check which backends are present on a system. Issue #23
* Fix prototype declaration / definition mismatch (issue #25)Dirk Mueller2016-03-041-1/+1
|
* Check frag idx validity when verifying frag metadataTushar Gohad2016-02-141-2/+48
| | | | ... also add related test code
* Make libtool archive references relative to builddirTushar Gohad2015-12-101-6/+6
|
* Split helpers.h include for backward compatibilityTushar Gohad2015-09-222-0/+2
| | | | | | | Users of liberasurecode <= 1.0.7 used alloc/free helpers (which they shouldn't have). This change is to make sure we are still able to those older revs of programs and they work with newer liberasurecode.
* Enforce the (k + m < 32) limit, add unit testsKota Tsuyuzaki2015-08-181-2/+33
|
* Rename remaining INTERNAL_RS_VAND instancesTushar Gohad2015-07-201-17/+17
| | | | ... to LIBERASURECODE_RS_VAND
* Rename liberasurecode_rsvand -> liberasurecode_rs_vandliberasurecode_rs_vand-renameTushar Gohad2015-06-221-2/+2
|
* Rename rs_vand_internal to liberasurecode_rs_vandTushar Gohad2015-06-223-41/+43
|
* Fix open/write() and uninitialize var warnings in rs_vand internalTushar Gohad2015-06-221-3/+6
|
* Plugging new internal RS backend into liberasurecode.Kevin Greenan2015-06-181-1/+108
|
* Adding internal tests for the new internal RS codec.Kevin Greenan2015-06-183-1/+409
|
* Fix a uint < 0 warning reported by ClangTushar Gohad2015-04-301-3/+3
| | | | Also add -Wall for future builds
* This is the fix for Issue #13:Kevin Greenan2015-04-271-34/+170
| | | | | | | | | | | | | | https://bitbucket.org/tsg-/liberasurecode/issue/13/decode-fails-for-many-cases-when-m-k This fix includes: 1.) Proper buffer allocation for the 'missing_idxs' structure, which was not allocating enough space when k > m. 2.) Checks to use header fields of parity fragments during decode when *no* data fragments are available. 3.) Fixed the unit tests to properly handle the case where k <= m. 4.) Extended the unit test framework to support multiple tests per backend 5.) Added tests for all RS implementations: (4,8), (4,4), (10,10)
* 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.