Skip to content

Commit

Permalink
XArray tests: Correct some 64-bit assumptions
Browse files Browse the repository at this point in the history
The test-suite caught these two mistakes when compiled for 32-bit.
I had only been running the test-suite in 64-bit mode.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
  • Loading branch information
Matthew Wilcox committed Nov 16, 2018
1 parent 44a4a66 commit 5404a7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/test_xarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ static noinline void check_multi_store(struct xarray *xa)
rcu_read_unlock();

/* We can erase multiple values with a single store */
xa_store_order(xa, 0, 63, NULL, GFP_KERNEL);
xa_store_order(xa, 0, BITS_PER_LONG - 1, NULL, GFP_KERNEL);
XA_BUG_ON(xa, !xa_empty(xa));

/* Even when the first slot is empty but the others aren't */
Expand Down Expand Up @@ -1101,7 +1101,7 @@ static noinline void check_store_range(struct xarray *xa)
__check_store_range(xa, 4095 + i, 4095 + j);
__check_store_range(xa, 4096 + i, 4096 + j);
__check_store_range(xa, 123456 + i, 123456 + j);
__check_store_range(xa, UINT_MAX + i, UINT_MAX + j);
__check_store_range(xa, (1 << 24) + i, (1 << 24) + j);
}
}
}
Expand Down

0 comments on commit 5404a7f

Please sign in to comment.