buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE,
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE,
buf_size + buf2_size + buf3_size, &res);
test_sum(buf_ptr, buf_size, buf_sum, FALSE, &res);
buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE, EINVAL, &res);
test_sum(buf_ptr, buf_size, buf_sum, TRUE, &res);
test_sum(buf2_ptr, buf2_size, buf2_sum, TRUE, &res);
memcpy(iov, iovt, sizeof(iovt));
iov[1].iov_size = (vir_bytes) LONG_MAX + 1;
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE, EINVAL, &res);
test_sum(buf_ptr, buf_size, buf_sum, TRUE, &res);
test_sum(buf2_ptr, buf2_size, buf2_sum, TRUE, &res);
iov[0].iov_size = LONG_MAX / 2 - 1;
iov[1].iov_size = LONG_MAX / 2 - 1;
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE, EINVAL, &res);
test_sum(buf_ptr, buf_size, buf_sum, TRUE, &res);
test_sum(buf2_ptr, buf2_size, buf2_sum, TRUE, &res);
iov[0].iov_size = LONG_MAX - 1;
iov[1].iov_size = LONG_MAX - 1;
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE, EINVAL, &res);
test_sum(buf_ptr, buf_size, buf_sum, TRUE, &res);
test_sum(buf2_ptr, buf2_size, buf2_sum, TRUE, &res);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
c1 = buf2_ptr[buf2_size - 1];
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE, BUF_SIZE * 3 - 1,
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE, BUF_SIZE * 3 - 1,
&res);
if (accept_result(&res, RESULT_BADSTATUS, EINVAL)) {
buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE, EINVAL, &res);
/* Do not test the first buffer, as it may contain a partial result. */
test_sum(buf2_ptr, buf2_size, buf2_sum, TRUE, &res);
buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE, EINVAL, &res);
accept_result(&res, RESULT_BADSTATUS, EPERM);
buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE, EINVAL, &res);
accept_result(&res, RESULT_BADSTATUS, EPERM);
c1 = buf2_ptr[0];
c2 = buf2_ptr[buf2_size - 1];
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE, BUF_SIZE * 3 - 2,
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE, BUF_SIZE * 3 - 2,
&res);
if (accept_result(&res, RESULT_BADSTATUS, EINVAL)) {
buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(1), iov, 3, FALSE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(1)), iov, 3, FALSE, EINVAL, &res);
test_sum(buf_ptr, buf_size, buf_sum, TRUE, &res);
test_sum(buf2_ptr, buf2_size, buf2_sum, TRUE, &res);
buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(0), iov, 3, FALSE,
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, FALSE,
buf_size + buf2_size + buf3_size, &res);
test_sum(buf_ptr, buf_size, buf_sum, FALSE, &res);
buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(SECTOR_UNALIGN), iov, 3, TRUE, EINVAL,
+ raw_xfer(driver_minor, ((u64_t)(SECTOR_UNALIGN)), iov, 3, TRUE, EINVAL,
&res);
test_sum(buf_ptr, buf_size, buf_sum, TRUE, &res);
buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(0), iov, 3, TRUE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, TRUE, EINVAL, &res);
test_sum(buf_ptr, buf_size, buf_sum, TRUE, &res);
test_sum(buf2_ptr, buf2_size, buf2_sum, TRUE, &res);
buf2_sum = fill_rand(buf2_ptr, buf2_size);
buf3_sum = fill_rand(buf3_ptr, buf3_size);
- raw_xfer(driver_minor, cvu64(0), iov, 3, TRUE, EINVAL, &res);
+ raw_xfer(driver_minor, ((u64_t)(0)), iov, 3, TRUE, EINVAL, &res);
accept_result(&res, RESULT_BADSTATUS, EPERM);
result_t res;
int i;
- base_pos = cvu64(sector_size);
+ base_pos = ((u64_t)(sector_size));
large_size = small_size * NR_IOREQS;
/* Read one sector up to the partition limit. */
fill_rand(buf_ptr, buf_size);
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size)), buf_ptr,
sector_size, FALSE, sector_size, &res);
sum = get_sum(buf_ptr, sector_size);
/* Read three sectors up to the partition limit. */
fill_rand(buf_ptr, buf_size);
- simple_xfer(sub0_minor, cvu64(sub_size - buf_size), buf_ptr, buf_size,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - buf_size)), buf_ptr, buf_size,
FALSE, buf_size, &res);
test_sum(buf_ptr + sector_size * 2, sector_size, sum, TRUE, &res);
fill_rand(buf_ptr, buf_size);
sum3 = get_sum(buf_ptr + sector_size * 2, sector_size);
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size * 2), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size * 2)), buf_ptr,
buf_size, FALSE, sector_size * 2, &res);
test_sum(buf_ptr, sector_size * 2, sum2, TRUE, &res);
fill_rand(buf_ptr, buf_size);
sum2 = get_sum(buf_ptr + sector_size, sector_size * 2);
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size)), buf_ptr,
buf_size, FALSE, sector_size, &res);
test_sum(buf_ptr, sector_size, sum, TRUE, &res);
sum = fill_rand(buf_ptr, buf_size);
sum2 = get_sum(buf_ptr, sector_size);
- simple_xfer(sub0_minor, cvu64(sub_size), buf_ptr, sector_size, FALSE,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size)), buf_ptr, sector_size, FALSE,
0, &res);
test_sum(buf_ptr, sector_size, sum2, TRUE, &res);
got_result(&res, "one sector read at partition end");
/* Read three sectors starting at the partition end. */
- simple_xfer(sub0_minor, cvu64(sub_size), buf_ptr, buf_size, FALSE, 0,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size)), buf_ptr, buf_size, FALSE, 0,
&res);
test_sum(buf_ptr, buf_size, sum, TRUE, &res);
got_result(&res, "multisector read at partition end");
/* Read one sector beyond the partition end. */
- simple_xfer(sub0_minor, cvu64(sub_size + sector_size), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size + sector_size)), buf_ptr,
buf_size, FALSE, 0, &res);
test_sum(buf_ptr, sector_size, sum2, TRUE, &res);
*/
sub1_sum = fill_rand(buf_ptr, buf_size);
- simple_xfer(sub1_minor, cvu64(0), buf_ptr, buf_size, TRUE, buf_size,
+ simple_xfer(sub1_minor, ((u64_t)(0)), buf_ptr, buf_size, TRUE, buf_size,
&res);
got_result(&res, "write to second subpartition");
/* Write one sector, up to the partition limit. */
sum = fill_rand(buf_ptr, sector_size);
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size)), buf_ptr,
sector_size, TRUE, sector_size, &res);
got_result(&res, "write up to partition end");
/* Read back to make sure the results have persisted. */
fill_rand(buf_ptr, sector_size * 2);
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size * 2), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size * 2)), buf_ptr,
sector_size * 2, FALSE, sector_size * 2, &res);
test_sum(buf_ptr + sector_size, sector_size, sum, TRUE, &res);
sum = get_sum(buf_ptr + sector_size, sector_size);
sum3 = get_sum(buf_ptr, sector_size);
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size * 2), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size * 2)), buf_ptr,
buf_size, TRUE, sector_size * 2, &res);
got_result(&res, "write somewhat across partition end");
fill_rand(buf_ptr, buf_size);
sum2 = get_sum(buf_ptr + sector_size, sector_size * 2);
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size)), buf_ptr,
buf_size, FALSE, sector_size, &res);
test_sum(buf_ptr, sector_size, sum, TRUE, &res);
fill_rand(buf_ptr, buf_size);
sum = get_sum(buf_ptr, sector_size);
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size)), buf_ptr,
buf_size, TRUE, sector_size, &res);
got_result(&res, "write mostly across partition end");
fill_rand(buf_ptr, buf_size);
sum2 = get_sum(buf_ptr + sector_size * 2, sector_size);
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size * 2), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size * 2)), buf_ptr,
buf_size, FALSE, sector_size * 2, &res);
test_sum(buf_ptr, sector_size, sum3, TRUE, &res);
/* Write one sector at the end of the partition. */
fill_rand(buf_ptr, sector_size);
- simple_xfer(sub0_minor, cvu64(sub_size), buf_ptr, sector_size, TRUE, 0,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size)), buf_ptr, sector_size, TRUE, 0,
&res);
got_result(&res, "write at partition end");
/* Write one sector beyond the end of the partition. */
- simple_xfer(sub0_minor, cvu64(sub_size + sector_size), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size + sector_size)), buf_ptr,
sector_size, TRUE, 0, &res);
got_result(&res, "write beyond partition end");
*/
fill_rand(buf_ptr, buf_size);
- simple_xfer(sub1_minor, cvu64(0), buf_ptr, buf_size, FALSE, buf_size,
+ simple_xfer(sub1_minor, ((u64_t)(0)), buf_ptr, buf_size, FALSE, buf_size,
&res);
test_sum(buf_ptr, buf_size, sub1_sum, TRUE, &res);
/* If the last request erroneously succeeded, it would have overwritten
* the last sector of the first subpartition.
*/
- simple_xfer(sub0_minor, cvu64(sub_size - sector_size), buf_ptr,
+ simple_xfer(sub0_minor, ((u64_t)(sub_size - sector_size)), buf_ptr,
sector_size, FALSE, sector_size, &res);
test_sum(buf_ptr, sector_size, sum, TRUE, &res);
/* Set, and check, the size of the first subpartition. */
subpart = part;
- subpart.size = cvu64(sub_size);
+ subpart.size = ((u64_t)(sub_size));
vir_ioctl(sub0_minor, DIOCSETP, &subpart, OK, &res);
/* Set, and check, the base and size of the second subpartition. */
subpart = part;
subpart.base = add64u(subpart.base, sub_size);
- subpart.size = cvu64(sub_size);
+ subpart.size = ((u64_t)(sub_size));
vir_ioctl(sub1_minor, DIOCSETP, &subpart, OK, &res);
memset(buf_ptr, 0, buf_size);
/* Write an invalid partition table. */
- simple_xfer(driver_minor, cvu64(0), buf_ptr, buf_size, TRUE, buf_size,
+ simple_xfer(driver_minor, ((u64_t)(0)), buf_ptr, buf_size, TRUE, buf_size,
&res);
got_result(&res, "write of invalid partition table");
buf_ptr[510] = 0x55;
buf_ptr[511] = 0xAA;
- simple_xfer(driver_minor, cvu64(0), buf_ptr, buf_size, TRUE, buf_size,
+ simple_xfer(driver_minor, ((u64_t)(0)), buf_ptr, buf_size, TRUE, buf_size,
&res);
got_result(&res, "write of valid partition table");
*/
buf_size = sector_size * 5;
- base_pos = cvu64(sector_size * 2);
+ base_pos = ((u64_t)(sector_size * 2));
if ((buf_ptr = alloc_contig(buf_size, 0, NULL)) == NULL)
panic("unable to allocate memory");
*/
buf_size = buf2_size = sector_size * 3;
- base_pos = cvu64(sector_size * 3);
+ base_pos = ((u64_t)(sector_size * 3));
if ((buf_ptr = alloc_contig(buf_size, 0, NULL)) == NULL)
panic("unable to allocate memory");
buf_size = buf2_size = max_size + sector_size;
- base_pos = cvu64(sector_size * 3);
+ base_pos = ((u64_t)(sector_size * 3));
if ((buf_ptr = alloc_contig(buf_size, 0, NULL)) == NULL)
panic("unable to allocate memory");
if (may_write) {
sum = fill_rand(buf_ptr, buf_size);
- simple_xfer(driver_minor, cvu64(0), buf_ptr, buf_size,
+ simple_xfer(driver_minor, ((u64_t)(0)), buf_ptr, buf_size,
TRUE, buf_size, &res);
got_result(&res, "write integrity zone");
fill_rand(buf_ptr, buf_size);
- simple_xfer(driver_minor, cvu64(0), buf_ptr, buf_size, FALSE,
+ simple_xfer(driver_minor, ((u64_t)(0)), buf_ptr, buf_size, FALSE,
buf_size, &res);
if (may_write)
if (check_integ) {
fill_rand(buf_ptr, buf_size);
- simple_xfer(driver_minor, cvu64(0), buf_ptr, buf_size, FALSE,
+ simple_xfer(driver_minor, ((u64_t)(0)), buf_ptr, buf_size, FALSE,
buf_size, &res);
test_sum(buf_ptr, buf_size, sum, TRUE, &res);
test_group("basic area sweep", TRUE);
- sweep_area(cvu64(sector_size));
+ sweep_area(((u64_t)(sector_size)));
}
static void high_disk_pos(void)