提交 182dd5ba 编写于 作者: M Maciej W. Rozycki 提交者: Thomas Bogendoerfer

lib/math/test_div64: Fix error message formatting

Align the expected result with one actually produced for easier visual
comparison; this has to take into account what the format specifiers
will actually produce rather than the characters they consist of.  E.g.:

test_div64: ERROR: 10000000ab275080 / 00000009 => 01c71c71da20d00e,00000002
test_div64: ERROR: expected value              => 0000000013045e47,00000001

(with a failure induced by setting bit #60 of the divident).
Signed-off-by: NMaciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
上级 6f3377bc
...@@ -170,7 +170,7 @@ static inline bool test_div64_verify(u64 quotient, u32 remainder, int i, int j) ...@@ -170,7 +170,7 @@ static inline bool test_div64_verify(u64 quotient, u32 remainder, int i, int j)
if (!test_div64_verify(quotient, remainder, i, j)) { \ if (!test_div64_verify(quotient, remainder, i, j)) { \
pr_err("ERROR: %016llx / %08x => %016llx,%08x\n", \ pr_err("ERROR: %016llx / %08x => %016llx,%08x\n", \
divident, divisor, quotient, remainder); \ divident, divisor, quotient, remainder); \
pr_err("ERROR: expected value=> %016llx,%08x\n", \ pr_err("ERROR: expected value => %016llx,%08x\n",\
test_div64_results[i][j].quotient, \ test_div64_results[i][j].quotient, \
test_div64_results[i][j].remainder); \ test_div64_results[i][j].remainder); \
result = false; \ result = false; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册