[dm-devel] [PATCH 4/7] tests/hwtable: fix test_regex_2_strings_hwe_dir
mwilck at suse.com
mwilck at suse.com
Tue May 3 22:06:43 UTC 2022
From: Martin Wilck <mwilck at suse.com>
Unlike "getuid_callout", "vpd_vendor" doesn't invalidate "uid_attribute".
Signed-off-by: Martin Wilck <mwilck at suse.com>
---
tests/hwtable.c | 2 +-
tests/test-lib.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/hwtable.c b/tests/hwtable.c
index b8e73a6..e60e914 100644
--- a/tests/hwtable.c
+++ b/tests/hwtable.c
@@ -888,8 +888,8 @@ static void test_regex_2_strings_hwe_dir(const struct hwt_state *hwt)
/* foo:barz matches kv3 and kv2 and kv1 */
pp = mock_path_flags(vnd_foo.value, prd_barz.value, USE_VPD_VND);
TEST_PROP(prio_name(&pp->prio), prio_rdac.value);
- TEST_PROP(pp->uid_attribute, NULL);
assert_int_equal(pp->vpd_vendor_id, VPD_VP_HP3PAR);
+ TEST_PROP(pp->uid_attribute, uid_baz.value);
TEST_PROP(checker_name(&pp->checker), chk_hp.value);
}
diff --git a/tests/test-lib.c b/tests/test-lib.c
index 68e0dd8..6dd3ee8 100644
--- a/tests/test-lib.c
+++ b/tests/test-lib.c
@@ -229,7 +229,7 @@ int __wrap_ioctl(int fd, unsigned long request, void *param)
if (hdr->interface_id == 'S' && hdr->cmdp[0] == 0x12
&& (hdr->cmdp[1] & 1) == 1 && hdr->cmdp[2] == HP3PAR_VPD) {
assert_in_range(hdr->dxfer_len,
- sizeof(vpd_data + 3), INT_MAX);
+ sizeof(vpd_data) + 3, INT_MAX);
memset(buf, 0, hdr->dxfer_len);
buf[1] = HP3PAR_VPD;
put_unaligned_be16(sizeof(vpd_data), &buf[2]);
--
2.36.0
More information about the dm-devel
mailing list