Skip to content

Commit

Permalink
raid: Change example to use multi-binary function
Browse files Browse the repository at this point in the history
Change-Id: I9a3edf4ad0b9b8afad6d0545bfc7436b4c8fdfe0
Signed-off-by: Greg Tucker <[email protected]>
  • Loading branch information
gbtucker committed Mar 1, 2018
1 parent 4b45bef commit 5af4e4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions raid/xor_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ int main(int argc, char *argv[])
((char *)buffs[i])[j] = rand();

printf("Generate xor parity\n");
xor_gen_sse(TEST_SOURCES + 1, TEST_LEN, buffs);
xor_gen(TEST_SOURCES + 1, TEST_LEN, buffs);

printf("Check parity: ");
should_pass = xor_check_sse(TEST_SOURCES + 1, TEST_LEN, buffs);
should_pass = xor_check(TEST_SOURCES + 1, TEST_LEN, buffs);
printf("%s\n", should_pass == 0 ? "Pass" : "Fail");

printf("Find corruption: ");
((char *)buffs[TEST_SOURCES / 2])[TEST_LEN / 2] ^= 1; // flip one bit
should_fail = xor_check_sse(TEST_SOURCES + 1, TEST_LEN, buffs); //recheck
should_fail = xor_check(TEST_SOURCES + 1, TEST_LEN, buffs); //recheck
printf("%s\n", should_fail != 0 ? "Pass" : "Fail");

return 0;
Expand Down

0 comments on commit 5af4e4a

Please sign in to comment.