Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/test_string.c: avoid masking memset16/32/64 failures
If a memsetXX implementation is completely broken and fails in the first iteration, when i, j, and k are all zero, the failure is masked as zero is returned. Failing in the first iteration is perhaps the most likely failure, so this makes the tests pretty much useless. Avoid the situation by always setting a random unused bit in the result on failure. Link: http://lkml.kernel.org/r/[email protected] Fixes: 03270c1 ("lib/string.c: add testcases for memset16/32/64") Signed-off-by: Peter Rosin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information