tests: use memcmp to compare binary buffers

instead of strncmp because it will stop at the first \0

http://tracker.ceph.com/issues/6697 Fixes: #6697

Signed-off-by: Loic Dachary <loic-201408@dachary.org>