~ubuntu-branches/ubuntu/vivid/numactl/vivid-updates

« back to all changes in this revision

Viewing changes to test/tbitmap.c

  • Committer: Package Import Robot
  • Author(s): Ian Wienand
  • Date: 2014-09-09 21:33:32 UTC
  • mfrom: (1.3.12)
  • Revision ID: package-import@ubuntu.com-20140909213332-ph3qt0yq2ffozuky
Tags: 2.0.10~rc2-1
* Upgrade to 2.0.10-rc2
* Remove 001_no_numa.patch; fixed upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#include <stdlib.h>
8
8
#include <ctype.h>
9
9
#include "numa.h"
 
10
#include "util.h"
 
11
 
 
12
/* For util.c. Fixme. */
 
13
void usage(void)
 
14
{
 
15
        exit(1);
 
16
}
10
17
 
11
18
#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
12
19
 
81
88
                numa_bitmask_clearall(mask);
82
89
                numa_bitmask_clearall(mask2);
83
90
                numa_bitmask_setbit(mask, i);
 
91
                assert(find_first(mask) == i);
84
92
                bitmap_scnprintf(buf, sizeof(buf), mask);
85
93
                strcat(buf,"\n");
86
94
                if (numa_parse_bitmap(buf, mask2) < 0)
87
95
                        assert(0);
88
 
                if (memcmp(mask, mask2, sizeof(mask))) { 
 
96
                if (memcmp(mask->maskp, mask2->maskp, numa_bitmask_nbytes(mask))) {
89
97
                        bitmap_scnprintf(buf, sizeof(buf), mask2);
90
98
                        printf("mask2 differs: %s\n", buf);
91
99
                        assert(0);