Commit 8d99c512 authored by Swann Perarnau's avatar Swann Perarnau

Merge branch 'better-flags-for-ci' into 'master'

Better flags for CI

See merge request !65
parents b1b6b9a1 deb5a06d
Pipeline #7969 passed with stages
in 18 minutes and 9 seconds
......@@ -27,6 +27,8 @@ make:generic:
except:
- /^wip.*/
- /^WIP.*/
variables:
CFLAGS: "-std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-but-set-parameter"
script:
- ./autogen.sh
- mkdir build
......@@ -37,6 +39,7 @@ make:generic:
artifacts:
when: on_failure
paths:
- config.log
- tests/*.log
make:knl:
......
......@@ -67,7 +67,7 @@ AC_CHECK_LIB(dl, dlopen)
# add pthread support.
# doc in m4/ax_pthread.m4. Defines automake PTHREAD_CFLAGS and PTHREAD_LIBS
AX_PTHREAD
AX_PTHREAD([],[AC_MSG_ERROR([Cannot find how to compile with pthreads.])])
CC="$PTHREAD_CC"
# NUMA support
......@@ -100,11 +100,6 @@ AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_FILES([Makefile
src/Makefile
src/area/Makefile
src/dma/Makefile
src/tiling/Makefile
src/scratch/Makefile
src/utils/Makefile
include/Makefile
tests/Makefile
doc/Makefile
......
......@@ -28,6 +28,8 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/mman.h>
#include <unistd.h>
......
......@@ -33,7 +33,7 @@ struct aml_dma_linux_par_thread_data {
* A logical identifier of the thread in charge for
* the request progress.
**/
int tid;
size_t tid;
/** The actual thread in charge for the request progress**/
pthread_t thread;
/** The dma containing sequential operations **/
......@@ -70,7 +70,7 @@ struct aml_dma_linux_par_data {
struct aml_dma_linux_par_ops {
void *(*do_thread)(void *thread_data);
int (*do_copy)(struct aml_dma_linux_par_data *data,
struct aml_dma_request_linux_par *request, int tid);
struct aml_dma_request_linux_par *request, size_t tid);
};
/**
......
......@@ -30,10 +30,10 @@ extern int aml_errno;
/**
* Get a string description of an aml error.
* @param errno: the aml error number.
* @param err: the aml error number.
* Returns a static string describing the error.
**/
const char *aml_strerror(const int errno);
const char *aml_strerror(const int err);
/**
* Print error on standard error output.
......
lib_LTLIBRARIES = libaml.la
libaml_la_SOURCES = aml.c
libaml_la_CFLAGS = -I$(top_srcdir)/include
libaml_la_LDFLAGS=$(PTHREAD_CFLAGS)
libaml_la_LIBADD=
SUBDIRS=utils
libaml_la_LIBADD+=$(top_srcdir)/src/utils/libamlutils.la
SUBDIRS+=area
libaml_la_LIBADD+=$(top_srcdir)/src/area/libamlarea.la
SUBDIRS+=dma
libaml_la_LIBADD+=$(top_srcdir)/src/dma/libamldma.la
SUBDIRS+=tiling
libaml_la_LIBADD+=$(top_srcdir)/src/tiling/libamltiling.la
SUBDIRS+=scratch
libaml_la_LIBADD+=$(top_srcdir)/src/scratch/libamlscratch.la
AM_CFLAGS = -I$(top_srcdir)/include $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(PTHREAD_LIBS)
AREA_SOURCES = \
area/area.c \
area/linux.c
DMA_SOURCES = \
dma/dma.c \
dma/dma_linux_par.c \
dma/dma_linux_seq.c
SCRATCH_SOURCES = \
scratch/scratch.c \
scratch/scratch_par.c \
scratch/scratch_seq.c
TILING_SOURCES = \
tiling/tiling.c \
tiling/tiling_1d.c \
tiling/tiling_2d.c
UTILS_SOURCES = \
utils/bitmap.c \
utils/error.c \
utils/vector.c
LIB_SOURCES = \
$(AREA_SOURCES) \
$(DMA_SOURCES) \
$(SCRATCH_SOURCES) \
$(TILING_SOURCES) \
$(UTILS_SOURCES) \
aml.c
lib_LTLIBRARIES = libaml.la
libaml_la_SOURCES = $(LIB_SOURCES)
......@@ -21,6 +21,8 @@ int aml_errno;
int aml_init(int *argc, char **argv[])
{
// disable warnings
(void)argc; (void)argv;
return 0;
}
......
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES = libamlarea.la
libamlarea_la_LDFLAGS = -lnuma
libamlarea_la_CFLAGS = $(AM_CFLAGS)
libamlarea_la_SOURCES = \
area.c \
linux.c
......@@ -47,6 +47,8 @@ aml_area_linux_check_binding(struct aml_area_linux_data *area_data,
{
int err, mode, i;
struct bitmask *nodeset;
// unused parameter
(void)size;
nodeset = numa_allocate_nodemask();
if (nodeset == NULL)
......@@ -209,7 +211,6 @@ int aml_area_linux_init(struct aml_area *area, const int mmap_flags,
const int binding_flags)
{
struct aml_area_linux_data *data;
int err;
if (area == NULL)
return -AML_EINVAL;
......
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamldma.la
libamldma_la_SOURCES=\
dma.c \
dma_linux_par.c \
dma_linux_seq.c
libamldma_la_CFLAGS=$(AM_CFLAGS)
libamldma_la_LDFLAGS=$(AM_CFLAGS)
......@@ -66,7 +66,7 @@ void *aml_dma_linux_par_do_thread(void *arg)
}
int aml_dma_linux_par_do_copy(struct aml_dma_linux_par_data *dma,
struct aml_dma_request_linux_par *req, int tid)
struct aml_dma_request_linux_par *req, size_t tid)
{
assert(dma != NULL);
assert(req != NULL);
......@@ -125,7 +125,7 @@ int aml_dma_linux_par_create_request(struct aml_dma_data *d,
}
pthread_mutex_unlock(&dma->data.lock);
for (int i = 0; i < dma->data.nbthreads; i++) {
for (size_t i = 0; i < dma->data.nbthreads; i++) {
struct aml_dma_linux_par_thread_data *rd = &req->thread_data[i];
rd->req = req;
......@@ -149,7 +149,7 @@ int aml_dma_linux_par_destroy_request(struct aml_dma_data *d,
(struct aml_dma_request_linux_par *)r;
/* we cancel and join, instead of killing, for a cleaner result */
for (int i = 0; i < dma->data.nbthreads; i++) {
for (size_t i = 0; i < dma->data.nbthreads; i++) {
pthread_cancel(req->thread_data[i].thread);
pthread_join(req->thread_data[i].thread, NULL);
}
......@@ -172,7 +172,7 @@ int aml_dma_linux_par_wait_request(struct aml_dma_data *d,
struct aml_dma_request_linux_par *req =
(struct aml_dma_request_linux_par *)r;
for (int i = 0; i < dma->data.nbthreads; i++)
for (size_t i = 0; i < dma->data.nbthreads; i++)
pthread_join(req->thread_data[i].thread, NULL);
/* destroy a completed request */
......@@ -244,7 +244,7 @@ int aml_dma_linux_par_init(struct aml_dma *d, size_t nbreqs,
sizeof(struct aml_dma_request_linux_par),
offsetof(struct aml_dma_request_linux_par, type),
AML_DMA_REQUEST_TYPE_INVALID);
for (int i = 0; i < nbreqs; i++) {
for (size_t i = 0; i < nbreqs; i++) {
struct aml_dma_request_linux_par *req =
aml_vector_get(&dma->data.requests, i);
......@@ -262,7 +262,7 @@ void aml_dma_linux_par_fini(struct aml_dma *d)
if (d == NULL || d->data == NULL)
return;
dma = (struct aml_dma_linux_par *)d->data;
for (int i = 0; i < aml_vector_size(&dma->data.requests); i++) {
for (size_t i = 0; i < aml_vector_size(&dma->data.requests); i++) {
struct aml_dma_request_linux_par *req =
aml_vector_get(&dma->data.requests, i);
......
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamlscratch.la
libamlscratch_la_SOURCES=\
scratch.c \
scratch_seq.c \
scratch_par.c
libamlscratch_la_CFLAGS=$(AM_CFLAGS)
......@@ -58,6 +58,7 @@ void *aml_scratch_par_do_thread(void *arg)
aml_dma_copy(scratch->data.dma, scratch->data.tiling, req->dstptr,
req->dstid, scratch->data.tiling, req->srcptr, req->srcid);
return NULL;
}
struct aml_scratch_par_ops aml_scratch_par_inner_ops = {
......
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamltiling.la
libamltiling_la_SOURCES=\
tiling.c \
tiling_1d.c \
tiling_2d.c
......@@ -62,8 +62,7 @@ struct aml_tiling_iterator_ops aml_tiling_iterator_1d_ops = {
int aml_tiling_1d_tileid(const struct aml_tiling_data *t, va_list ap)
{
const struct aml_tiling_1d_data *data =
(const struct aml_tiling_1d_data *)t;
(void)t;
size_t x = va_arg(ap, size_t);
return x;
}
......@@ -99,7 +98,7 @@ int aml_tiling_1d_ndims(const struct aml_tiling_data *t, va_list ap)
size_t *x = va_arg(ap, size_t *);
*x = data->totalsize/data->blocksize;
if (data->totalsize % data->blocksize != 0)
*x++;
*x += 1;
return 0;
}
......@@ -107,6 +106,7 @@ int aml_tiling_1d_init_iterator(struct aml_tiling_data *t,
struct aml_tiling_iterator *it, int flags)
{
assert(it->data != NULL);
(void)flags;
struct aml_tiling_iterator_1d_data *data =
(struct aml_tiling_iterator_1d_data *)it->data;
......@@ -136,12 +136,15 @@ int aml_tiling_1d_create_iterator(struct aml_tiling_data *t,
int aml_tiling_1d_fini_iterator(struct aml_tiling_data *t,
struct aml_tiling_iterator *it)
{
(void)t;
(void)it;
return 0;
}
int aml_tiling_1d_destroy_iterator(struct aml_tiling_data *t,
struct aml_tiling_iterator **it)
{
(void)t;
free(*it);
return 0;
}
......@@ -197,7 +200,6 @@ int aml_tiling_1d_create(struct aml_tiling **t,
int aml_tiling_1d_init(struct aml_tiling *t,
size_t tilesize, size_t totalsize)
{
int err;
struct aml_tiling_1d_data *data;
if (t == NULL || t->data == NULL)
......@@ -215,6 +217,7 @@ int aml_tiling_1d_init(struct aml_tiling *t,
void aml_tiling_1d_fini(struct aml_tiling *t)
{
/* nothing to do */
(void)t;
}
......
......@@ -92,7 +92,7 @@ size_t aml_tiling_2d_tilesize(const struct aml_tiling_data *t, int tileid)
const struct aml_tiling_2d_data *data =
(const struct aml_tiling_2d_data *)t;
if (tileid < 0 || tileid >= data->ndims[0]*data->ndims[1])
if (tileid < 0 || tileid >= (int)(data->ndims[0]*data->ndims[1]))
return 0;
else
return data->blocksize;
......@@ -105,7 +105,7 @@ void *aml_tiling_2d_tilestart(const struct aml_tiling_data *t,
(const struct aml_tiling_2d_data *)t;
intptr_t p = (intptr_t)ptr;
if (tileid < 0 || tileid >= data->ndims[0]*data->ndims[1])
if (tileid < 0 || tileid >= (int)(data->ndims[0]*data->ndims[1]))
return NULL;
else
return (void *)(p + tileid*data->blocksize);
......@@ -128,6 +128,7 @@ int aml_tiling_2d_init_iterator(struct aml_tiling_data *t,
struct aml_tiling_iterator *it, int flags)
{
assert(it->data != NULL);
(void)flags;
struct aml_tiling_iterator_2d_data *data =
(struct aml_tiling_iterator_2d_data *)it->data;
it->ops = &aml_tiling_iterator_2d_ops;
......@@ -156,12 +157,15 @@ int aml_tiling_2d_create_iterator(struct aml_tiling_data *t,
int aml_tiling_2d_fini_iterator(struct aml_tiling_data *t,
struct aml_tiling_iterator *it)
{
(void)t;
(void)it;
return 0;
}
int aml_tiling_2d_destroy_iterator(struct aml_tiling_data *t,
struct aml_tiling_iterator **it)
{
(void)t;
free(*it);
return 0;
}
......@@ -238,8 +242,8 @@ int aml_tiling_2d_init(struct aml_tiling *t, int type,
size_t tilesize, size_t totalsize,
size_t rowsize, size_t colsize)
{
int err;
struct aml_tiling_2d_data *data;
(void)type;
if (t == NULL || t->data == NULL)
return -AML_EINVAL;
......@@ -258,6 +262,7 @@ int aml_tiling_2d_init(struct aml_tiling *t, int type,
void aml_tiling_2d_fini(struct aml_tiling *t)
{
/* nothing to do */
(void)t;
}
......
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamlutils.la
libamlutils_la_SOURCES=\
vector.c \
bitmap.c \
error.c
libamlutils_la_CFLAGS=$(AM_CFLAGS)
libamlutils_la_LDFLAGS=
......@@ -7,9 +7,8 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
#include "config.h"
#include "aml.h"
#include <string.h>
#define AML_BITMAP_EMPTY (0UL)
#define AML_BITMAP_FULL (~0UL)
......
......@@ -20,11 +20,11 @@ static const char * const aml_error_strings[] = {
[AML_ENOTSUP] = "Operation not supported",
};
const char *aml_strerror(const int errno)
const char *aml_strerror(const int err)
{
if (errno < 0 || errno < AML_ERROR_MAX)
if (err < 0 || err < AML_ERROR_MAX)
return "Unknown error";
return aml_error_strings[errno];
return aml_error_strings[err];
}
void aml_perror(const char *msg)
......
......@@ -29,7 +29,7 @@ int aml_vector_resize(struct aml_vector *vec, size_t newsize)
vec->ptr = realloc(vec->ptr, newsize * vec->sz);
assert(vec->ptr != NULL);
for (int i = vec->nbelems; i < newsize; i++) {
for (size_t i = vec->nbelems; i < newsize; i++) {
int *k = AML_VECTOR_KEY_P(vec, i);
*k = vec->na;
}
......@@ -47,8 +47,13 @@ size_t aml_vector_size(const struct aml_vector *vec)
void *aml_vector_get(struct aml_vector *vec, int id)
{
assert(vec != NULL);
if (id != vec->na && id < vec->nbelems)
return AML_VECTOR_ELT_P(vec, id);
if (id == vec->na || id < 0)
return NULL;
size_t idx = (size_t)id;
if (idx < vec->nbelems)
return AML_VECTOR_ELT_P(vec, idx);
else
return NULL;
}
......@@ -57,7 +62,7 @@ void *aml_vector_get(struct aml_vector *vec, int id)
int aml_vector_find(const struct aml_vector *vec, int key)
{
assert(vec != NULL);
for (int i = 0; i < vec->nbelems; i++) {
for (size_t i = 0; i < vec->nbelems; i++) {
int *k = AML_VECTOR_KEY_P(vec, i);
if (*k == key)
......@@ -135,7 +140,7 @@ int aml_vector_init(struct aml_vector *vec, size_t reserve, size_t size,
vec->na = na;
vec->nbelems = reserve;
vec->ptr = ptr;
for (int i = 0; i < vec->nbelems; i++) {
for (size_t i = 0; i < vec->nbelems; i++) {
int *k = AML_VECTOR_KEY_P(vec, i);
*k = na;
}
......
AM_COLOR_TESTS = yes
# add OpenMP to flags for test programs
AM_CFLAGS = -I$(top_srcdir)/include
AM_LDFLAGS = ../src/libaml.la
AM_CFLAGS = -I$(top_srcdir)/include $(PTHREAD_CFLAGS)
AM_LDFLAGS = ../src/libaml.la $(PTHREAD_LIBS)
# valgrind support
if TEST_VALGRIND
......
......@@ -17,7 +17,6 @@ void test_map(const struct aml_area *area){
assert(area->ops->munmap != NULL);
void *ptr;
int err;
size_t s;
const size_t sizes[4] = {1, 32, 4096, 1<<20};
......
......@@ -7,54 +7,65 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
#include "config.h"
#include "aml.h"
#include "aml/area/linux.h"
#include <assert.h>
#include <string.h>
const size_t sizes[3] = {1, 1<<12, 1<<20};
const size_t sizes[3] = { 1, 1 << 12, 1 << 20 };
const int binding_flags[3] = {
AML_AREA_LINUX_BINDING_FLAG_BIND,
AML_AREA_LINUX_BINDING_FLAG_INTERLEAVE,
AML_AREA_LINUX_BINDING_FLAG_PREFERRED
};
const int mmap_flags[2] = {
AML_AREA_LINUX_MMAP_FLAG_PRIVATE,
AML_AREA_LINUX_MMAP_FLAG_SHARED
};
void test_binding(struct aml_bitmap *bitmap){
void test_binding(struct aml_bitmap *bitmap)
{
void *ptr;
int err;
size_t s;
int bf, mf, i, nnodes, binding_flag, mmap_flag;
int binding_flag, mmap_flag;
struct aml_area *area;
for(bf=0; bf<sizeof(binding_flags)/sizeof(*binding_flags); bf++){
for (unsigned int bf = 0;
bf < sizeof(binding_flags) / sizeof(*binding_flags); bf++) {
binding_flag = binding_flags[bf];
for(mf=0; mf<sizeof(mmap_flags)/sizeof(*mmap_flags); mf++){
for (unsigned int mf = 0;
mf < sizeof(mmap_flags) / sizeof(*mmap_flags); mf++) {
mmap_flag = mmap_flags[mf];
for(s = 0; s<sizeof(sizes)/sizeof(*sizes); s++){
aml_area_linux_create(&area, mmap_flag, bitmap, binding_flag);
for (size_t s = 0;
s < sizeof(sizes) / sizeof(*sizes); s++) {
aml_area_linux_create(&area, mmap_flag, bitmap,
binding_flag);
assert(area != NULL);
ptr = area->ops->mmap((struct aml_area_data*)area->data,
NULL,
sizes[s]);
ptr = area->ops->mmap(
(struct aml_area_data *)area->data,
NULL, sizes[s]);
assert(ptr != NULL);
memset(ptr, 0, sizes[s]);
assert(aml_area_linux_check_binding((struct aml_area_linux_data*)area->data, ptr, sizes[s]) > 0);
assert(area->ops->munmap((struct aml_area_data*)area->data, ptr, sizes[s]) == AML_SUCCESS);
assert(aml_area_linux_check_binding(
(struct aml_area_linux_data *)area->data,
ptr, sizes[s]) > 0);
assert(area->ops->munmap(
(struct aml_area_data *)area->data,
ptr, sizes[s]) == AML_SUCCESS);
aml_area_linux_destroy(&area);
}
}
}
}
void test_bind(){
void test_bind(void)
{
struct bitmask *nodeset;
int i, num_nodes;
int i, num_nodes;
struct aml_bitmap bitmap;
struct aml_area *area;
......@@ -62,24 +73,25 @@ void test_bind(){
num_nodes = numa_bitmask_weight(nodeset);
aml_bitmap_fill(&bitmap);
if(aml_bitmap_last(&bitmap) > num_nodes){
assert(aml_area_linux_create(&area, AML_AREA_LINUX_MMAP_FLAG_PRIVATE,
&bitmap,
AML_AREA_LINUX_BINDING_FLAG_PREFERRED) == -AML_EDOM);
if (aml_bitmap_last(&bitmap) > num_nodes) {
assert(aml_area_linux_create
(&area, AML_AREA_LINUX_MMAP_FLAG_PRIVATE, &bitmap,
AML_AREA_LINUX_BINDING_FLAG_PREFERRED) == -AML_EDOM);
assert(area == NULL);
}
test_binding(NULL);
aml_bitmap_zero(&bitmap);
for(i = 0; i<num_nodes; i++){
for (i = 0; i < num_nodes; i++) {
aml_bitmap_set(&bitmap, i);
test_binding(&bitmap);
aml_bitmap_clear(&bitmap, i);
}
}
int main(int argc, char** argv){
int main(void)
{
test_bind();
return 0;
}
......@@ -36,8 +36,9 @@ int doit(struct aml_tiling *t, struct aml_tiling_iterator *it)
for(i = 0; i < NBTILES; i++)
{
ptr = (intptr_t) aml_tiling_tilestart(t, NULL, i);
assert(ptr == i*TILESIZE);
assert(ptr == (intptr_t)i*TILESIZE);
}
return 0;
}
int main(int argc, char *argv[])
......
......@@ -11,25 +11,12 @@
#include "aml.h"
#include <assert.h>
static const unsigned long is[8] = {
0,
AML_BITMAP_NBITS / 4,
3 * AML_BITMAP_NBITS / 4,
AML_BITMAP_NBITS - 1,
AML_BITMAP_NBITS,
AML_BITMAP_NBITS + AML_BITMAP_NBITS / 4,
AML_BITMAP_NBITS + 3 * AML_BITMAP_NBITS / 4,
AML_BITMAP_NBITS + AML_BITMAP_NBITS - 1
};
static const int nis = sizeof(is) / sizeof(*is);
void test_bitmap_fill(){
unsigned long i;
struct aml_bitmap b;
aml_bitmap_fill(&b);
for(i = 0; i < nis; i++)
assert(aml_bitmap_isset(&b, is[i]));
for(i = 0; i < AML_BITMAP_MAX; i++)
assert(aml_bitmap_isset(&b, i));
assert(aml_bitmap_nset(&b) == AML_BITMAP_MAX);
}
......@@ -37,8 +24,8 @@ void test_bitmap_zero(){
unsigned long i;
struct aml_bitmap b;
aml_bitmap_zero(&b);
for(i = 0; i < nis; i++)
assert(!aml_bitmap_isset(&b, is[i]));
for(i = 0; i < AML_BITMAP_MAX; i++)
assert(!aml_bitmap_isset(&b, i));
assert(aml_bitmap_nset(&b) == 0);
}
......@@ -47,108 +34,37 @@ void test_bitmap_set(){
struct aml_bitmap b;
aml_bitmap_zero(&b);
for(i = 0; i < nis; i++){
aml_bitmap_set(&b, is[i]);
assert(aml_bitmap_isset(&b, is[i]));
for(i = 0; i < AML_BITMAP_MAX; i++){
aml_bitmap_set(&b, i);
assert(aml_bitmap_isset(&b, i));
for(j = 0; j < is[i]; j++)
for(j = 0; j < i; j++)
assert(!aml_bitmap_isset(&b, j));
for(j = is[i]+1; j < AML_BITMAP_MAX; j++)
for(j = i+1; j < AML_BITMAP_MAX; j++)
assert(!aml_bitmap_isset(&b, j));
assert(aml_bitmap_nset(&b) == 1);
aml_bitmap_clear(&b, is[i]);
assert(!aml_bitmap_isset(&b, is[i]));
}
}
void test_bitmap_string_conversion(const char * bitmap_str){
struct aml_bitmap b, c;
char * cstr;
assert(aml_bitmap_from_string(&b, bitmap_str) == 0);
if(bitmap_str == NULL ||
!strcasecmp(bitmap_str, "none") ||
!strcasecmp(bitmap_str, "zero") ||
!strcasecmp(bitmap_str, "empty")){
assert(aml_bitmap_iszero(&b));
}
else if(!strcasecmp(bitmap_str, "all") ||
!strcasecmp(bitmap_str, "full") ||
!strcasecmp(bitmap_str, "fill")){
assert(aml_bitmap_isfull(&b));
}
cstr = aml_bitmap_to_string(&b);
assert(cstr != NULL);
assert(aml_bitmap_from_string(&c, cstr) == 0);
assert(aml_bitmap_isequal(&b,&c));
free(cstr);
}
void test_bitmap_string(){
const size_t int_len = 16;
char *bstr, *next;
int i;