Christophe Leroy de9df3993c lib/test_hexdump.c: fix failure on big endian cpu
On a big endian cpu, test_hexdump fails as follows.  The logs show that
bytes are expected in reversed order.

  [...]
  test_hexdump: Len: 24 buflen: 130 strlen: 97
  test_hexdump: Result: 97 'be32db7b 0a1893b2 70bac424 7d83349b a69c31ad 9c0face9                    .2.{....p..$}.4...1.....'
  test_hexdump: Expect: 97 '7bdb32be b293180a 24c4ba70 9b34837d ad319ca6 e9ac0f9c                    .2.{....p..$}.4...1.....'
  test_hexdump: Len: 8 buflen: 130 strlen: 77
  test_hexdump: Result: 77 'be32db7b0a1893b2                                                     .2.{....'
  test_hexdump: Expect: 77 'b293180a7bdb32be                                                     .2.{....'
  test_hexdump: Len: 6 buflen: 131 strlen: 87
  test_hexdump: Result: 87 'be32 db7b 0a18                                                                   .2.{..'
  test_hexdump: Expect: 87 '32be 7bdb 180a                                                                   .2.{..'
  test_hexdump: Len: 24 buflen: 131 strlen: 97
  test_hexdump: Result: 97 'be32db7b 0a1893b2 70bac424 7d83349b a69c31ad 9c0face9                    .2.{....p..$}.4...1.....'
  test_hexdump: Expect: 97 '7bdb32be b293180a 24c4ba70 9b34837d ad319ca6 e9ac0f9c                    .2.{....p..$}.4...1.....'
  test_hexdump: Len: 32 buflen: 131 strlen: 101
  test_hexdump: Result: 101 'be32db7b0a1893b2 70bac4247d83349b a69c31ad9c0face9 4cd1199943b1af0c  .2.{....p..$}.4...1.....L...C...'
  test_hexdump: Expect: 101 'b293180a7bdb32be 9b34837d24c4ba70 e9ac0f9cad319ca6 0cafb1439919d14c  .2.{....p..$}.4...1.....L...C...'
  test_hexdump: failed 801 out of 1184 tests

This patch fixes it.

Link: http://lkml.kernel.org/r/f3112437f62c2f48300535510918e8be1dceacfb.1533610877.git.christophe.leroy@c-s.fr
Fixes: 64d1d77a44697 ("hexdump: introduce test suite")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: rashmica <rashmicy@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-22 10:52:48 -07:00
..
2018-07-04 08:37:50 +02:00
2018-07-10 15:00:52 -06:00
2018-08-22 10:52:48 -07:00
2017-12-01 13:09:40 -08:00
2017-12-01 13:09:40 -08:00
2018-06-22 00:29:39 +02:00
2018-08-16 12:14:42 -07:00
2017-12-01 13:09:40 -08:00
2018-02-06 18:32:44 -08:00
2018-08-22 10:52:48 -07:00
2018-07-23 15:22:39 +10:00
2018-02-06 18:32:44 -08:00
2017-10-07 10:45:14 -06:00
2017-02-24 17:46:57 -08:00
2018-06-07 17:34:39 -07:00
2018-06-12 16:19:22 -07:00
2018-05-01 10:22:41 -04:00
2018-08-18 11:44:53 -07:00
2018-04-12 09:41:19 -07:00
2018-06-12 16:19:22 -07:00
2017-12-01 13:09:40 -08:00
2018-08-22 10:52:48 -07:00
2017-12-01 13:09:40 -08:00
2016-12-06 10:17:03 +02:00
2018-07-17 09:27:43 +02:00
2018-06-30 10:47:46 -07:00
2018-06-27 18:58:49 +03:00
2018-04-23 16:39:35 +01:00
2017-08-15 09:02:07 -07:00