]> www.infradead.org Git - users/sagi/libnvme.git/commit
test: account for discovery log page entry stripping
authorCaleb Sander <csander@purestorage.com>
Wed, 30 Aug 2023 16:45:57 +0000 (10:45 -0600)
committerDaniel Wagner <wagi@monom.org>
Mon, 4 Sep 2023 17:23:24 +0000 (19:23 +0200)
commit5081b43bd2801a2ccd58f4f8be3ce9e8bc387d45
tree34108ce33eccd02660b98347bafb9e5fa81febea
parentbc6e07ad3dfcc201dd508f19b134896992713298
test: account for discovery log page entry stripping

The discovery log page tests incorrectly assumed the log page
nvmf_get_discovery_log() returns exactly matches what was fetched.
This failed to account for the trailing space trimming
of the TRSVCID and TRADDR fields.
If the arbitrary entries happened to contain trailing spaces
for these fields, the test cases would fail.
Generate arbitrary entries with space-padded strings for the log page
and corresponding expected entries with NUL-padded strings.

Signed-off-by: Caleb Sander <csander@purestorage.com>
test/ioctl/discovery.c
test/ioctl/util.c
test/ioctl/util.h