mt_validate(mt);
}
- check_store_range(mt, 8001, 8001, xa_mk_value(8001), 0);
- check_store_range(mt, 8002, 8002, xa_mk_value(8002), 0);
+ val = 8000;
+ for (i = 1; i < 14; i++) {
+ val++;
+ check_store_range(mt, val, val + 1, xa_mk_value(val), 0);
+ mt_validate(mt);
+ }
+
- check_store_range(mt, 8081, 8081, xa_mk_value(8081), 0);
- check_store_range(mt, 8082, 8082, xa_mk_value(8082), 0);
+ check_store_range(mt, 8051, 8051, xa_mk_value(8081), 0);
+ check_store_range(mt, 8052, 8052, xa_mk_value(8082), 0);
check_store_range(mt, 8083, 8083, xa_mk_value(8083), 0);
check_store_range(mt, 8084, 8084, xa_mk_value(8084), 0);
check_store_range(mt, 8085, 8085, xa_mk_value(8085), 0);
rcu_read_unlock();
goto quit;
}
- printk("start is wrong: %lx (%lu) vs expected %lx (%lu)\n", mas.index, mas.index, r_start, r_start);
+ printk("start is wrong: %lx (%lu) vs expected %lx (%lu)\n",
+ mas.index, mas.index, r_start, r_start);
+ RCU_MT_BUG_ON(test, mas.index != r_start);
}
- RCU_MT_BUG_ON(test, mas.index != r_start);
if (mas.last != r_end) {
if (pthread_mutex_trylock(&test->dump) != 0) {
rcu_read_unlock();
goto quit;
}
- printk("last is wrong: %lx (%lu) vs expected %lx (%lu)\n", mas.last, mas.last, r_end, r_end);
+ printk("last is wrong: %lx (%lu) vs expected %lx (%lu)\n",
+ mas.last, mas.last, r_end, r_end);
+ RCU_MT_BUG_ON(test, mas.last != r_end);
}
- RCU_MT_BUG_ON(test, mas.last != r_end);
if (i == reader->flip) {
alt = xa_mk_value(index + i + RCU_RANGE_COUNT);
else if (entry == alt)
toggled = true;
else {
- printk("!!%lu-%lu -> %p not %p or %p\n", mas.index, mas.last, entry, expected, alt);
+ printk("!!%lu-%lu -> %p not %p or %p\n",
+ mas.index, mas.last, entry, expected, alt);
RCU_MT_BUG_ON(test, 1);
}
RCU_RANGE_COUNT);
mt_dump(test->mt, mt_dump_dec);
printk("Error: %p %lu-%lu %p != %lu-%lu %p %p line %d i %d\n",
- mas.node,
- mas.index, mas.last, entry,
- r_start, r_end, expected, alt,
- line, i);
+ mas.node, mas.index, mas.last, entry,
+ r_start, r_end, expected, alt, line, i);
}
RCU_MT_BUG_ON(test, mas.index != r_start);
RCU_MT_BUG_ON(test, mas.last != r_end);
count++;
mas_dfs_preorder(&mas);
} while (!mas_is_none(&mas));
+ /* printk("count %lu\n", count); */
MT_BUG_ON(mt, count != e);
mtree_destroy(mt);
count++;
mas_dfs_preorder(&mas);
} while (!mas_is_none(&mas));
- /*printk("count %lu\n", count); */
+ /* printk("count %lu\n", count); */
MT_BUG_ON(mt, count != e);
mtree_destroy(mt);
count++;
mas_dfs_preorder(&mas);
} while (!mas_is_none(&mas));
- /*printk("count %lu\n", count); */
+ /* printk("count %lu\n", count); */
MT_BUG_ON(mt, count != e);
mtree_destroy(mt);
allocated = mas_allocated(&mas);
height = mas_mt_height(&mas);
vacant_height = get_vacant_height(&wr_mas, ptr);
- MT_BUG_ON(mt, allocated == 0);
- MT_BUG_ON(mt, allocated != 1 + (height - vacant_height) * 3);
+ MAS_BUG_ON(&mas, allocated == 0);
+ MAS_BUG_ON(&mas, allocated != 1 + (height - vacant_height) * 3);
mas_destroy(&mas);
allocated = mas_allocated(&mas);
MT_BUG_ON(mt, allocated != 0);