1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Copyright (c) 2019 Martin Wilck, SUSE Linux GmbH, Nuremberg */
17 #include "unaligned.h"
21 #include "discovery.h"
24 #define VPD_BUFSIZ 4096
27 unsigned char vpdbuf[VPD_BUFSIZ];
31 static int setup(void **state)
33 struct vpdtest *vt = malloc(sizeof(*vt));
41 static int teardown(void **state)
43 struct vpdtest *vt = *state;
50 /* vendor_id should have less than 8 chars to test space handling */
51 static const char vendor_id[] = "Linux";
52 static const char test_id[] =
53 "A123456789AbcDefB123456789AbcDefC123456789AbcDefD123456789AbcDef";
55 int __wrap_ioctl(int fd, unsigned long request, void *param)
58 struct sg_io_hdr *io_hdr;
62 io_hdr = (struct sg_io_hdr *)param;
63 assert_in_range(len, 0, io_hdr->dxfer_len);
64 val = mock_ptr_type(unsigned char *);
66 memcpy(io_hdr->dxferp, val, len);
72 * create_vpd80() - create a "unit serial number" VPD page.
74 * @bufsiz: length of VPD buffer
76 * @size: value for the "page length" field
77 * @len: actual number of characters to use from @id
79 * If len < size, the content will be right aligned, as mandated by the
84 static int create_vpd80(unsigned char *buf, size_t bufsiz, const char *id,
87 assert_true(len <= size);
89 memset(buf, 0, bufsiz);
91 put_unaligned_be16(size, buf + 2);
93 memset(buf + 4, ' ', size - len);
94 memcpy(buf + 4 + size - len, id, len);
98 static int _hex2bin(const char hx)
100 assert_true(isxdigit(hx));
101 if (hx >= '0' && hx <= '9')
103 if (hx >= 'a' && hx <= 'f')
104 return hx - 'a' + 10;
105 if (hx >= 'A' && hx <= 'F')
106 return hx - 'A' + 10;
110 static void hex2bin(unsigned char *dst, const char *src,
111 size_t dstlen, size_t srclen)
116 assert(srclen % 2 == 0);
117 for (sc = src, ds = dst;
118 sc < src + srclen && ds < dst + dstlen;
120 *ds = 16 * _hex2bin(sc[0]) + _hex2bin(sc[1]);
124 * create_t10_vendor_id_desc() - Create T10 vendor ID
125 * @desc: descriptor buffer
127 * @n: number of characters to use for ID
128 * (includes 8 bytes for vendor ID!)
130 * Create a "T10 vendor specific ID" designation descriptor.
131 * The vendor field (8 bytes) is filled with vendor_id (above).
133 * Return: descriptor length.
135 static int create_t10_vendor_id_desc(unsigned char *desc,
136 const char *id, size_t n)
138 int vnd_len = sizeof(vendor_id) - 1;
140 /* code set: ascii */
142 /* type: 10 vendor ID */
147 memcpy(desc + 4, (const unsigned char *)vendor_id, vnd_len);
148 memset(desc + 4 + vnd_len, ' ', 8 - vnd_len);
149 memcpy(desc + 4 + 8, (const unsigned char *)id, n - 8);
155 * create_eui64_desc() - create EUI64 descriptor.
156 * @desc, @id: see above.
157 * @n: number of bytes (8, 12, or 16).
159 * Create an EUI64 designation descriptor.
161 * Return: descriptor length.
163 static int create_eui64_desc(unsigned char *desc,
164 const char *id, size_t n)
166 assert_true(n == 8 || n == 12 || n == 16);
168 /* code set: binary */
175 hex2bin(desc + 4, id, n, 2 * n);
180 * create_naa_desc() - create an NAA designation descriptor
181 * @desc, @id: see above.
182 * @naa: Name Address Authority field (2, 3, 5, or 6).
184 * Return: descriptor length.
186 static int create_naa_desc(unsigned char *desc,
187 const char *id, int naa)
189 assert_true(naa == 2 || naa == 3 || naa == 5 || naa == 6);
191 /* code set: binary */
196 desc[4] = _hex2bin(id[0]) | (naa << 4);
201 hex2bin(desc + 5, id + 1, 7, 14);
205 hex2bin(desc + 5, id + 1, 15, 30);
213 /* type and flags for SCSI name string designation descriptor */
219 ZERO_LAST = 0x10, /* flag to zero out some bytes at string end */
222 static const char * const str_prefix[] = {
228 static const char byte0[] = {
235 * create_scsi_string_desc() - create a SCSI name string descriptor.
236 * @desc, @id: see above.
237 * @typ: one of STR_EUI, STR_NAA, STR_IQN, possibly ORd with ZERO_LAST
238 * @maxlen: number of characters to use from input ID.
240 * If ZERO_LAST is set, zero out the last byte.
242 * Return: descriptor length.
244 static int create_scsi_string_desc(unsigned char *desc,
245 const char *id, int typ, int maxlen)
248 int type = typ & STR_MASK;
250 /* code set: UTF-8 */
252 /* type: SCSI string */
256 assert_in_range(type, STR_EUI, STR_IQN);
257 assert_true(maxlen % 4 == 0);
258 len = snprintf((char *)(desc + 4), maxlen, "%s%s",
259 str_prefix[type], id);
265 plen = 4 * ((len - 1) / 4) + 4;
266 memset(desc + 4 + len, '\0', plen - len);
272 * create_vpd83() - create "device identification" VPD page
273 * @buf, @bufsiz, @id: see above.
274 * @type: descriptor type to use (1, 2, 3, 8)
275 * @parm: opaque parameter (e.g. means "naa" for NAA type)
276 * @len: designator length (exact meaning depends on designator type)
278 * Create a "device identification" VPD page with a single
279 * designation descriptor.
281 * Return: VPD page length.
283 static int create_vpd83(unsigned char *buf, size_t bufsiz, const char *id,
284 uint8_t type, int parm, int len)
289 memset(buf, 0, bufsiz);
295 n = create_t10_vendor_id_desc(desc, id, len);
298 n = create_eui64_desc(desc, id, len);
301 n = create_naa_desc(desc, id, parm);
304 n = create_scsi_string_desc(desc, id, parm, len);
309 put_unaligned_be16(n, buf + 2);
314 * assert_correct_wwid() - test that a retrieved WWID matches expectations
316 * @expected: expected WWID length
317 * @returned: WWID length as returned by code under test
318 * @byte0, @byte1: leading chars that our code prepends to the ID
319 * (e.g. "36" for "NAA registered extended" type)
320 * @lowercase: set if lower case WWID is expected
321 * @orig: original ID string, may be longer than wwid
322 * @wwid: WWID as returned by code under test
324 static void assert_correct_wwid(const char *test,
325 int expected, int returned,
326 int byte0, int byte1, bool lowercase,
332 condlog(2, "%s: exp/ret: %d/%d, wwid: %s", test,
333 expected, returned, wwid);
335 * byte0 and byte1 are the leading chars that our code prepends
336 * to the ID to indicate the designation descriptor type, .
339 assert_int_equal(byte0, wwid[0]);
343 assert_int_equal(byte1, wwid[1]);
346 /* check matching length, and length of WWID string */
347 assert_int_equal(expected, returned);
348 assert_int_equal(returned, strlen(wwid));
349 /* check expected string value up to expected length */
350 for (i = 0; i < returned - ofs; i++)
351 assert_int_equal(wwid[ofs + i],
352 lowercase ? tolower(orig[i]) : orig[i]);
356 * For T10 vendor ID - replace sequences of spaces with a single underscore.
357 * Use a different implementation then libmultipath, deliberately.
359 static char *subst_spaces(const char *src)
361 char *dst = calloc(1, strlen(src) + 1);
367 assert_non_null(dst);
369 re = calloc(1, sizeof(*re));
371 rc = regcomp(re, " +", REG_EXTENDED);
372 assert_int_equal(rc, 0);
375 for (rc = regexec(re, src, 1, &match, 0), p = dst;
377 src += match.rm_eo, rc = regexec(re, src, 1, &match, 0)) {
378 memcpy(p, src, match.rm_so);
383 assert_int_equal(rc, REG_NOMATCH);
389 * test_vpd_vnd_LEN_WLEN() - test code for VPD 83, T10 vendor ID
390 * @LEN: ID length in the VPD page (includes 8 byte vendor ID)
391 * @WLEN: WWID buffer size
393 * The input ID is modified by inserting some spaces, to be able to
394 * test the handling of spaces by the code. This is relevant only for
395 * a minimum input length of 24.
396 * The expected result must be adjusted accordingly.
398 #define make_test_vpd_vnd(len, wlen) \
399 static void test_vpd_vnd_ ## len ## _ ## wlen(void **state) \
401 struct vpdtest *vt = *state; \
404 char *exp_wwid, *exp_subst, *input; \
406 input = strdup(test_id); \
407 /* 8 vendor bytes collapsed to actual vendor ID length + 1 */ \
408 /* and one '1' prepended */ \
409 exp_len = len - 8 + sizeof(vendor_id) + 1; \
411 /* insert some spaces to test space collapsing */ \
412 input[15] = input[17] = input[18] = ' '; \
413 /* adjust expectation for space treatment */ \
414 /* drop char for 2nd space on offset 17/18 */ \
417 /* drop trailing single '_' if input ends with space */ \
418 if (len == 15 + 9 || len == 17 + 9 || len == 18 + 9) \
420 if (exp_len >= wlen) \
421 exp_len = wlen - 1; \
422 n = create_vpd83(vt->vpdbuf, sizeof(vt->vpdbuf), input, \
424 rc = asprintf(&exp_wwid, "%s_%s", vendor_id, input); \
425 assert_int_not_equal(rc, -1); \
427 /* Replace spaces, like code under test */ \
428 exp_subst = subst_spaces(exp_wwid); \
430 will_return(__wrap_ioctl, n); \
431 will_return(__wrap_ioctl, vt->vpdbuf); \
432 ret = get_vpd_sgio(10, 0x83, 0, vt->wwid, wlen); \
433 assert_correct_wwid("test_vpd_vnd_" #len "_" #wlen, \
434 exp_len, ret, '1', 0, false, \
435 exp_subst, vt->wwid); \
440 * test_vpd_str_TYP_LEN_WLEN() - test code for VPD 83, SCSI name string
441 * @TYP: numeric value of STR_EUI, STR_NAA, STR_IQN above
442 * @LEN: ID length the VPD page
443 * @WLEN: WWID buffer size
445 #define make_test_vpd_str(typ, len, wlen) \
446 static void test_vpd_str_ ## typ ## _ ## len ## _ ## wlen(void **state) \
448 struct vpdtest *vt = *state; \
451 int type = typ & STR_MASK; \
453 n = create_vpd83(vt->vpdbuf, sizeof(vt->vpdbuf), test_id, \
455 exp_len = len - strlen(str_prefix[type]); \
456 if (typ & ZERO_LAST) \
458 if (exp_len >= wlen) \
459 exp_len = wlen - 1; \
460 will_return(__wrap_ioctl, n); \
461 will_return(__wrap_ioctl, vt->vpdbuf); \
462 ret = get_vpd_sgio(10, 0x83, 0, vt->wwid, wlen); \
463 assert_correct_wwid("test_vpd_str_" #typ "_" #len "_" #wlen, \
464 exp_len, ret, byte0[type], 0, \
466 test_id, vt->wwid); \
470 * test_vpd_naa_NAA_WLEN() - test code for VPD 83 NAA designation
471 * @NAA: Network Name Authority (2, 3, 5, or 6)
472 * @WLEN: WWID buffer size
474 #define make_test_vpd_naa(naa, wlen) \
475 static void test_vpd_naa_ ## naa ## _ ## wlen(void **state) \
477 struct vpdtest *vt = *state; \
491 /* returned size is always uneven */ \
492 exp_len = wlen > len ? len : \
493 wlen % 2 == 0 ? wlen - 1 : wlen - 2; \
495 n = create_vpd83(vt->vpdbuf, sizeof(vt->vpdbuf), test_id, \
497 will_return(__wrap_ioctl, n); \
498 will_return(__wrap_ioctl, vt->vpdbuf); \
499 ret = get_vpd_sgio(10, 0x83, 0, vt->wwid, wlen); \
500 assert_correct_wwid("test_vpd_naa_" #naa "_" #wlen, \
501 exp_len, ret, '3', '0' + naa, true, \
502 test_id, vt->wwid); \
506 * test_vpd_eui_LEN_WLEN() - test code for VPD 83, EUI64
507 * @LEN: EUI64 length (8, 12, or 16)
508 * @WLEN: WWID buffer size
509 * @SML: Use small VPD page size
511 #define make_test_vpd_eui(len, wlen, sml) \
512 static void test_vpd_eui_ ## len ## _ ## wlen ## _ ## sml(void **state) \
514 struct vpdtest *vt = *state; \
516 /* returned size is always uneven */ \
517 int exp_len = wlen > 2 * len + 1 ? 2 * len + 1 : \
518 wlen % 2 == 0 ? wlen - 1 : wlen - 2; \
520 n = create_vpd83(vt->vpdbuf, sizeof(vt->vpdbuf), test_id, \
523 /* overwrite the page size to DEFAULT_SGIO_LEN + 1 */ \
524 put_unaligned_be16(255, vt->vpdbuf + 2); \
525 /* this causes get_vpd_sgio to do a second ioctl */ \
526 will_return(__wrap_ioctl, n); \
527 will_return(__wrap_ioctl, vt->vpdbuf); \
529 will_return(__wrap_ioctl, n); \
530 will_return(__wrap_ioctl, vt->vpdbuf); \
531 ret = get_vpd_sgio(10, 0x83, 0, vt->wwid, wlen); \
532 assert_correct_wwid("test_vpd_eui_" #len "_" #wlen "_" #sml, \
533 exp_len, ret, '2', 0, true, \
534 test_id, vt->wwid); \
538 * test_vpd80_SIZE_LEN_WLEN() - test code for VPD 80
539 * @SIZE, @LEN: see create_vpd80()
540 * @WLEN: WWID buffer size
542 #define make_test_vpd80(size, len, wlen) \
543 static void test_vpd80_ ## size ## _ ## len ## _ ## wlen(void **state) \
545 struct vpdtest *vt = *state; \
547 int exp_len = len > 20 ? 20 : len; \
548 char *input = strdup(test_id); \
550 /* insert trailing whitespace after pos 20 */ \
551 memset(input + 20, ' ', sizeof(test_id) - 20); \
552 if (exp_len >= wlen) \
553 exp_len = wlen - 1; \
554 n = create_vpd80(vt->vpdbuf, sizeof(vt->vpdbuf), input, \
556 will_return(__wrap_ioctl, n); \
557 will_return(__wrap_ioctl, vt->vpdbuf); \
558 ret = get_vpd_sgio(10, 0x80, 0, vt->wwid, wlen); \
559 assert_correct_wwid("test_vpd80_" #size "_" #len "_" #wlen, \
560 exp_len, ret, 0, 0, false, \
566 /* Tests without trailing whitespace: 21 WWID bytes required */
567 make_test_vpd80(20, 20, 30);
568 make_test_vpd80(20, 20, 21);
569 make_test_vpd80(20, 20, 20);
570 make_test_vpd80(20, 20, 10);
572 /* Tests with 4 byte trailing whitespace: 21 WWID bytes required */
573 make_test_vpd80(24, 24, 30);
574 make_test_vpd80(24, 24, 25);
575 make_test_vpd80(24, 24, 24);
576 make_test_vpd80(24, 24, 21);
577 make_test_vpd80(24, 24, 20);
579 /* Tests with 4 byte leading whitespace: 17 WWID bytes required */
580 make_test_vpd80(20, 16, 30);
581 make_test_vpd80(20, 16, 17);
582 make_test_vpd80(20, 16, 16);
584 /* Tests with 4 byte leading whitespace: 21 WWID bytes required */
585 make_test_vpd80(24, 20, 21);
586 make_test_vpd80(24, 20, 20);
588 /* Tests with leading and trailing whitespace: 21 WWID bytes required */
589 make_test_vpd80(30, 24, 30);
590 make_test_vpd80(30, 24, 21);
591 make_test_vpd80(30, 24, 20);
593 /* VPD 83, T10 vendor ID */
594 make_test_vpd_vnd(40, 40);
595 make_test_vpd_vnd(40, 30);
596 make_test_vpd_vnd(30, 20);
597 make_test_vpd_vnd(29, 30);
598 make_test_vpd_vnd(28, 30);
599 make_test_vpd_vnd(27, 30); /* space at end */
600 make_test_vpd_vnd(26, 30); /* space at end */
601 make_test_vpd_vnd(25, 30);
602 make_test_vpd_vnd(24, 30); /* space at end */
603 make_test_vpd_vnd(23, 30);
604 make_test_vpd_vnd(24, 20);
605 make_test_vpd_vnd(23, 20);
606 make_test_vpd_vnd(22, 20);
607 make_test_vpd_vnd(21, 20);
608 make_test_vpd_vnd(20, 20);
609 make_test_vpd_vnd(19, 20);
610 make_test_vpd_vnd(20, 10);
611 make_test_vpd_vnd(10, 10);
614 /* small vpd page test */
615 make_test_vpd_eui(8, 32, 1);
616 make_test_vpd_eui(12, 32, 1);
617 make_test_vpd_eui(16, 40, 1);
619 /* 64bit, WWID size: 18 */
620 make_test_vpd_eui(8, 32, 0);
621 make_test_vpd_eui(8, 18, 0);
622 make_test_vpd_eui(8, 17, 0);
623 make_test_vpd_eui(8, 16, 0);
624 make_test_vpd_eui(8, 10, 0);
626 /* 96 bit, WWID size: 26 */
627 make_test_vpd_eui(12, 32, 0);
628 make_test_vpd_eui(12, 26, 0);
629 make_test_vpd_eui(12, 25, 0);
630 make_test_vpd_eui(12, 20, 0);
631 make_test_vpd_eui(12, 10, 0);
633 /* 128 bit, WWID size: 34 */
634 make_test_vpd_eui(16, 40, 0);
635 make_test_vpd_eui(16, 34, 0);
636 make_test_vpd_eui(16, 33, 0);
637 make_test_vpd_eui(16, 20, 0);
639 /* NAA IEEE registered extended (36), WWID size: 34 */
640 make_test_vpd_naa(6, 40);
641 make_test_vpd_naa(6, 34);
642 make_test_vpd_naa(6, 33);
643 make_test_vpd_naa(6, 32);
644 make_test_vpd_naa(6, 20);
646 /* NAA IEEE registered (35), WWID size: 18 */
647 make_test_vpd_naa(5, 20);
648 make_test_vpd_naa(5, 18);
649 make_test_vpd_naa(5, 17);
650 make_test_vpd_naa(5, 16);
652 /* NAA local (33), WWID size: 18 */
653 make_test_vpd_naa(3, 20);
654 make_test_vpd_naa(3, 18);
655 make_test_vpd_naa(3, 17);
656 make_test_vpd_naa(3, 16);
658 /* NAA IEEE extended (32), WWID size: 18 */
659 make_test_vpd_naa(2, 20);
660 make_test_vpd_naa(2, 18);
661 make_test_vpd_naa(2, 17);
662 make_test_vpd_naa(2, 16);
664 /* SCSI Name string: EUI64, WWID size: 17 */
665 make_test_vpd_str(0, 20, 18)
666 make_test_vpd_str(0, 20, 17)
667 make_test_vpd_str(0, 20, 16)
668 make_test_vpd_str(0, 20, 15)
670 /* SCSI Name string: EUI64, zero padded, WWID size: 16 */
671 make_test_vpd_str(16, 20, 18)
672 make_test_vpd_str(16, 20, 17)
673 make_test_vpd_str(16, 20, 16)
674 make_test_vpd_str(16, 20, 15)
676 /* SCSI Name string: NAA, WWID size: 17 */
677 make_test_vpd_str(1, 20, 18)
678 make_test_vpd_str(1, 20, 17)
679 make_test_vpd_str(1, 20, 16)
680 make_test_vpd_str(1, 20, 15)
682 /* SCSI Name string: NAA, zero padded, WWID size: 16 */
683 make_test_vpd_str(17, 20, 18)
684 make_test_vpd_str(17, 20, 17)
685 make_test_vpd_str(17, 20, 16)
686 make_test_vpd_str(17, 20, 15)
688 /* SCSI Name string: IQN, WWID size: 17 */
689 make_test_vpd_str(2, 20, 18)
690 make_test_vpd_str(2, 20, 17)
691 make_test_vpd_str(2, 20, 16)
692 make_test_vpd_str(2, 20, 15)
694 /* SCSI Name string: IQN, zero padded, WWID size: 16 */
695 make_test_vpd_str(18, 20, 18)
696 make_test_vpd_str(18, 20, 17)
697 make_test_vpd_str(18, 20, 16)
698 make_test_vpd_str(18, 20, 15)
700 static int test_vpd(void)
702 const struct CMUnitTest tests[] = {
703 cmocka_unit_test(test_vpd80_20_20_30),
704 cmocka_unit_test(test_vpd80_20_20_21),
705 cmocka_unit_test(test_vpd80_20_20_20),
706 cmocka_unit_test(test_vpd80_20_20_10),
707 cmocka_unit_test(test_vpd80_24_24_30),
708 cmocka_unit_test(test_vpd80_24_24_25),
709 cmocka_unit_test(test_vpd80_24_24_24),
710 cmocka_unit_test(test_vpd80_24_24_21),
711 cmocka_unit_test(test_vpd80_24_24_20),
712 cmocka_unit_test(test_vpd80_20_16_30),
713 cmocka_unit_test(test_vpd80_20_16_17),
714 cmocka_unit_test(test_vpd80_20_16_16),
715 cmocka_unit_test(test_vpd80_24_20_21),
716 cmocka_unit_test(test_vpd80_24_20_20),
717 cmocka_unit_test(test_vpd80_30_24_30),
718 cmocka_unit_test(test_vpd80_30_24_21),
719 cmocka_unit_test(test_vpd80_30_24_20),
720 cmocka_unit_test(test_vpd_vnd_40_40),
721 cmocka_unit_test(test_vpd_vnd_40_30),
722 cmocka_unit_test(test_vpd_vnd_30_20),
723 cmocka_unit_test(test_vpd_vnd_29_30),
724 cmocka_unit_test(test_vpd_vnd_28_30),
725 cmocka_unit_test(test_vpd_vnd_27_30),
726 cmocka_unit_test(test_vpd_vnd_26_30),
727 cmocka_unit_test(test_vpd_vnd_25_30),
728 cmocka_unit_test(test_vpd_vnd_24_30),
729 cmocka_unit_test(test_vpd_vnd_23_30),
730 cmocka_unit_test(test_vpd_vnd_24_20),
731 cmocka_unit_test(test_vpd_vnd_23_20),
732 cmocka_unit_test(test_vpd_vnd_22_20),
733 cmocka_unit_test(test_vpd_vnd_21_20),
734 cmocka_unit_test(test_vpd_vnd_20_20),
735 cmocka_unit_test(test_vpd_vnd_19_20),
736 cmocka_unit_test(test_vpd_vnd_20_10),
737 cmocka_unit_test(test_vpd_vnd_10_10),
738 cmocka_unit_test(test_vpd_eui_8_32_1),
739 cmocka_unit_test(test_vpd_eui_12_32_1),
740 cmocka_unit_test(test_vpd_eui_16_40_1),
741 cmocka_unit_test(test_vpd_eui_8_32_0),
742 cmocka_unit_test(test_vpd_eui_8_18_0),
743 cmocka_unit_test(test_vpd_eui_8_17_0),
744 cmocka_unit_test(test_vpd_eui_8_16_0),
745 cmocka_unit_test(test_vpd_eui_8_10_0),
746 cmocka_unit_test(test_vpd_eui_12_32_0),
747 cmocka_unit_test(test_vpd_eui_12_26_0),
748 cmocka_unit_test(test_vpd_eui_12_25_0),
749 cmocka_unit_test(test_vpd_eui_12_20_0),
750 cmocka_unit_test(test_vpd_eui_12_10_0),
751 cmocka_unit_test(test_vpd_eui_16_40_0),
752 cmocka_unit_test(test_vpd_eui_16_34_0),
753 cmocka_unit_test(test_vpd_eui_16_33_0),
754 cmocka_unit_test(test_vpd_eui_16_20_0),
755 cmocka_unit_test(test_vpd_naa_6_40),
756 cmocka_unit_test(test_vpd_naa_6_34),
757 cmocka_unit_test(test_vpd_naa_6_33),
758 cmocka_unit_test(test_vpd_naa_6_32),
759 cmocka_unit_test(test_vpd_naa_6_20),
760 cmocka_unit_test(test_vpd_naa_5_20),
761 cmocka_unit_test(test_vpd_naa_5_18),
762 cmocka_unit_test(test_vpd_naa_5_17),
763 cmocka_unit_test(test_vpd_naa_5_16),
764 cmocka_unit_test(test_vpd_naa_3_20),
765 cmocka_unit_test(test_vpd_naa_3_18),
766 cmocka_unit_test(test_vpd_naa_3_17),
767 cmocka_unit_test(test_vpd_naa_3_16),
768 cmocka_unit_test(test_vpd_naa_2_20),
769 cmocka_unit_test(test_vpd_naa_2_18),
770 cmocka_unit_test(test_vpd_naa_2_17),
771 cmocka_unit_test(test_vpd_naa_2_16),
772 cmocka_unit_test(test_vpd_str_0_20_18),
773 cmocka_unit_test(test_vpd_str_0_20_17),
774 cmocka_unit_test(test_vpd_str_0_20_16),
775 cmocka_unit_test(test_vpd_str_0_20_15),
776 cmocka_unit_test(test_vpd_str_16_20_18),
777 cmocka_unit_test(test_vpd_str_16_20_17),
778 cmocka_unit_test(test_vpd_str_16_20_16),
779 cmocka_unit_test(test_vpd_str_16_20_15),
780 cmocka_unit_test(test_vpd_str_1_20_18),
781 cmocka_unit_test(test_vpd_str_1_20_17),
782 cmocka_unit_test(test_vpd_str_1_20_16),
783 cmocka_unit_test(test_vpd_str_1_20_15),
784 cmocka_unit_test(test_vpd_str_17_20_18),
785 cmocka_unit_test(test_vpd_str_17_20_17),
786 cmocka_unit_test(test_vpd_str_17_20_16),
787 cmocka_unit_test(test_vpd_str_17_20_15),
788 cmocka_unit_test(test_vpd_str_2_20_18),
789 cmocka_unit_test(test_vpd_str_2_20_17),
790 cmocka_unit_test(test_vpd_str_2_20_16),
791 cmocka_unit_test(test_vpd_str_2_20_15),
792 cmocka_unit_test(test_vpd_str_18_20_18),
793 cmocka_unit_test(test_vpd_str_18_20_17),
794 cmocka_unit_test(test_vpd_str_18_20_16),
795 cmocka_unit_test(test_vpd_str_18_20_15),
797 return cmocka_run_group_tests(tests, setup, teardown);