Re: [libosinfo PATCH] test-os: Add test_resources_uniqueness()

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

 



On Fri, 2018-11-16 at 14:13 -0500, Cole Robinson wrote:
> On 11/13/2018 06:45 AM, Fabiano Fidêncio wrote:
> > This test enforces that we'll never have more than one resources
> > entry
> > for the very same architecture in an OS entry.
> > 
> > Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
> > ---
> > This patch's been written atop of 
> > https://www.redhat.com/archives/libosinfo/2018-November/msg00108.html
> 
> Reviewed-by: Cole Robinson <crobinso@xxxxxxxxxx>

Patch has been merged with a few changes in the following part:

+    for (GList *l = list; l != NULL; l = l->next) {

Moved this declaration out of the loop as Andrea pointed out to some
old distros complaining about this C99 kind of declaration.

+        OsinfoResources *resources = l->data;
+        const gchar *arch =
osinfo_resources_get_architecture(resources);
+
+        if (g_list_find_custom(list, arch, (GCompareFunc) g_strcmp0)
== NULL) {
+            list = g_list_prepend(list, (gchar *)arch);

list here should be arches.

+            continue;
+        }

> 
> - Cole

Thanks for the review, Cole.

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




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

  Powered by Linux