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

Re: [PATCH 2/2] tootls/tests: introduce unit tests for rangesets



On Fri, Apr 11, 2025 at 10:21:08AM +0200, Jan Beulich wrote:
> On 11.04.2025 09:55, Roger Pau Monne wrote:
> > --- /dev/null
> > +++ b/tools/tests/rangeset/harness.h
> > @@ -0,0 +1,71 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +/*
> > + * Unit tests for rangesets.
> > + *
> > + * Copyright (C) 2025 Cloud Software Group
> > + */
> > +
> > +#ifndef _TEST_HARNESS_
> > +#define _TEST_HARNESS_
> > +
> > +#include <assert.h>
> > +#include <errno.h>
> > +#include <stdbool.h>
> > +#include <stddef.h>
> > +#include <stdint.h>
> > +#include <stdio.h>
> > +#include <stdlib.h>
> > +#include <string.h>
> > +
> > +#include <xen-tools/common-macros.h>
> > +
> > +#define smp_wmb()
> > +#define __must_check __attribute__((__warn_unused_result__))
> > +#define cf_check
> > +
> > +#define BUG_ON(x) assert(!(x))
> > +#define ASSERT(x) assert(x)
> > +
> > +#include "list.h"
> > +#include "rangeset.h"
> > +
> > +typedef bool rwlock_t;
> > +typedef bool spinlock_t;
> 
> Are spinlocks really required for the rangeset code?

It's noted a bit below in this same file:

/* For rangeset_domain_{initialize,printk}() */

Otherwise rangeset.c won't build.

Will adjust the rest of your comments before commit, thanks!

Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.