raid: Change example to use multi-binary function

Change-Id: I9a3edf4ad0b9b8afad6d0545bfc7436b4c8fdfe0
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
This commit is contained in:
Greg Tucker 2018-02-27 17:26:13 -07:00
parent 4b45beff4f
commit 5af4e4aa0a

View File

@ -55,15 +55,15 @@ int main(int argc, char *argv[])
((char *)buffs[i])[j] = rand(); ((char *)buffs[i])[j] = rand();
printf("Generate xor parity\n"); 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: "); 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("%s\n", should_pass == 0 ? "Pass" : "Fail");
printf("Find corruption: "); printf("Find corruption: ");
((char *)buffs[TEST_SOURCES / 2])[TEST_LEN / 2] ^= 1; // flip one bit ((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"); printf("%s\n", should_fail != 0 ? "Pass" : "Fail");
return 0; return 0;