Re: [libvirt PATCH v6 07/30] nodedev: add ability to parse mdevs from mdevctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 26, 2021 at 11:48:03AM -0500, Jonathon Jongsma wrote:
> This function will parse the list of mediated devices that are returned
> by mdevctl and convert it into our internal node device representation.
> 
> Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> ---

...

> @@ -265,13 +312,13 @@ mymain(void)
>      }
>  
>  #define DO_TEST_FULL(desc, func, info) \
> -    if (virTestRun(desc, func, &info) < 0) \
> +    if (virTestRun(desc, func, info) < 0) \
>          ret = -1;
>  
>  #define DO_TEST_START_FULL(virt_type, create, filename) \
>      do { \
>          struct startTestInfo info = { virt_type, create, filename }; \
> -        DO_TEST_FULL("mdevctl start " filename, testMdevctlStartHelper, info); \
> +        DO_TEST_FULL("mdevctl start " filename, testMdevctlStartHelper, &info); \
>         } \
>      while (0)

^This IMO deserves a trivial standalone patch.

As for the rest of the code - per the discussion that happened in v4:
Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>

>  
> @@ -281,6 +328,9 @@ mymain(void)
>  #define DO_TEST_STOP(uuid) \
>      DO_TEST_FULL("mdevctl stop " uuid, testMdevctlStop, uuid)
>  
> +#define DO_TEST_PARSE_JSON(filename) \
> +    DO_TEST_FULL("parse mdevctl json " filename, testMdevctlParse, filename)
> +
>      /* Test mdevctl start commands */
>      DO_TEST_START("mdev_d069d019_36ea_4111_8f0a_8c9a70e21366");
>      DO_TEST_START("mdev_fedc4916_1ca8_49ac_b176_871d16c13076");
> @@ -289,6 +339,8 @@ mymain(void)
>      /* Test mdevctl stop command, pass an arbitrary uuid */
>      DO_TEST_STOP("e2451f73-c95b-4124-b900-e008af37c576");
>  
> +    DO_TEST_PARSE_JSON("mdevctl-list-multiple");
> +
>   done:
>      nodedevTestDriverFree(driver);
>  
> -- 
> 2.26.3
> 




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux