tests: fix "constant is too large" compilation warnings

alarm.c: In function 'main':
alarm.c:41: warning: integer constant is too large for 'long' type
aio.c: In function 'main':
aio.c:162: warning: integer constant is too large for 'long' type
btrfs.c: In function 'btrfs_test_sync_ioctls':
btrfs.c:202: warning: integer constant is too large for 'long' type
btrfs.c: In function 'btrfs_test_subvol_ioctls':
btrfs.c:289: warning: integer constant is too large for 'long' type
btrfs.c:290: warning: integer constant is too large for 'long' type
dup2.c: In function 'main':
dup2.c:12: warning: integer constant is too large for 'long' type
dup2.c:13: warning: integer constant is too large for 'long' type
dup3.c: In function 'main':
dup3.c:13: warning: integer constant is too large for 'long' type
dup3.c:14: warning: integer constant is too large for 'long' type
epoll_create.c: In function 'main':
epoll_create.c:12: warning: integer constant is too large for 'long' type
epoll_ctl.c: In function 'invoke_syscall':
epoll_ctl.c:14: warning: integer constant is too large for 'long' type
faccessat.c: In function 'main':
faccessat.c:13: warning: integer constant is too large for 'long' type
fchdir.c: In function 'main':
fchdir.c:12: warning: integer constant is too large for 'long' type
struct_flock.c: In function 'invoke_test_syscall':
struct_flock.c:48: warning: integer constant is too large for 'long' type
struct_flock.c: In function 'test_flock_einval':
struct_flock.c:58: warning: integer constant is too large for 'long' type
struct_flock.c:59: warning: integer constant is too large for 'long' type
fcntl64.c: In function 'test_flock64_einval':
fcntl64.c:44: warning: integer constant is too large for 'long' type
fcntl64.c:45: warning: integer constant is too large for 'long' type
fcntl.c: In function 'test_flock64_einval':
fcntl.c:44: warning: integer constant is too large for 'long' type
fcntl.c:45: warning: integer constant is too large for 'long' type
fdatasync.c: In function 'main':
fdatasync.c:12: warning: integer constant is too large for 'long' type
flock.c: In function 'main':
flock.c:13: warning: integer constant is too large for 'long' type
xstatx.c: In function 'main':
xstatx.c:255: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatfsx.c: In function 'main':
xstatfsx.c:113: warning: integer constant is too large for 'long' type
fsync.c: In function 'main':
fsync.c:12: warning: integer constant is too large for 'long' type
ftruncate64.c: In function 'main':
ftruncate64.c:39: warning: integer constant is too large for 'long' type
futimesat.c: In function 'main':
futimesat.c:52: warning: integer constant is too large for 'long' type
futimesat.c:59: warning: integer constant is too large for 'long' type
get_mempolicy.c: In function 'main':
get_mempolicy.c:83: warning: integer constant is too large for 'long' type
get_mempolicy.c:84: warning: integer constant is too large for 'long' type
get_mempolicy.c:85: warning: integer constant is too large for 'long' type
get_mempolicy.c:86: warning: integer constant is too large for 'long' type
getdents.c: In function 'main':
getdents.c:109: warning: integer constant is too large for 'long' type
getdents.c:110: warning: integer constant is too large for 'long' type
getdents.c:114: warning: integer constant is too large for 'long' type
getdents64.c: In function 'main':
getdents64.c:114: warning: integer constant is too large for 'long' type
getdents64.c:115: warning: integer constant is too large for 'long' type
getdents64.c:119: warning: integer constant is too large for 'long' type
xgetrlimit.c: In function 'main':
xgetrlimit.c:71: warning: integer constant is too large for 'long' type
ioctl_block.c:44: warning: integer constant is too large for 'long' type
ioctl_block.c: In function 'main':
ioctl_block.c:136: warning: integer constant is too large for 'long' type
ioctl_block.c:137: warning: integer constant is too large for 'long' type
ioctl_block.c:161: warning: integer constant is too large for 'long' type
ioctl_block.c:170: warning: integer constant is too large for 'long' type
ioctl_block.c:171: warning: integer constant is too large for 'long' type
ioctl_evdev.c:42: warning: integer constant is too large for 'long' type
ioctl_mtd.c:46: warning: integer constant is too large for 'long' type
ioctl_rtc.c:40: warning: integer constant is too large for 'long' type
ioperm.c: In function 'main':
ioperm.c:12: warning: integer constant is too large for 'long' type
ioctl_v4l2.c: In function 'main':
ioctl_v4l2.c:409: warning: integer constant is too large for 'long' type
ipc.c: In function 'ipc_call':
ipc.c:52: warning: integer constant is too large for 'long' type
kill.c: In function 'main':
kill.c:59: warning: integer constant is too large for 'long' type
kill.c:62: warning: integer constant is too large for 'long' type
kill.c:63: warning: integer constant is too large for 'long' type
kill.c:68: warning: integer constant is too large for 'long' type
linkat.c: In function 'main':
linkat.c:14: warning: integer constant is too large for 'long' type
linkat.c:15: warning: integer constant is too large for 'long' type
mbind.c: In function 'main':
mbind.c:41: warning: integer constant is too large for 'long' type
mbind.c:43: warning: integer constant is too large for 'long' type
mbind.c:44: warning: integer constant is too large for 'long' type
migrate_pages.c: In function 'main':
migrate_pages.c:41: warning: integer constant is too large for 'long' type
In file included from mkdirat.c:10:
umode_t.c: In function 'test_syscall':
umode_t.c:47: warning: integer constant is too large for 'long' type
mknod.c: In function 'call_mknod':
mknod.c:16: warning: integer constant is too large for 'long' type
mknod.c: In function 'main':
mknod.c:23: warning: integer constant is too large for 'long' type
mknod.c:49: warning: integer constant is too large for 'long' type
mknod.c:56: warning: integer constant is too large for 'long' type
mknodat.c:12: warning: integer constant is too large for 'long' type
mknodat.c: In function 'call_mknodat':
mknodat.c:17: warning: integer constant is too large for 'long' type
mknodat.c: In function 'main':
mknodat.c:24: warning: integer constant is too large for 'long' type
mknodat.c:50: warning: integer constant is too large for 'long' type
mknodat.c:57: warning: integer constant is too large for 'long' type
mmap.c: In function 'main':
mmap.c:51: warning: integer constant is too large for 'long' type
move_pages.c: In function 'print_stat_pages':
move_pages.c:139: warning: integer constant is too large for 'long' type
move_pages.c: In function 'print_move_pages':
move_pages.c:166: warning: integer constant is too large for 'long' type
move_pages.c: In function 'main':
move_pages.c:188: warning: integer constant is too large for 'long' type
mq_sendrecv.c: In function 'main':
mq_sendrecv.c:238: warning: integer constant is too large for 'long' type
mq_sendrecv.c:401: warning: integer constant is too large for 'long' type
mq_sendrecv.c:403: warning: integer constant is too large for 'long' type
nsyscalls.c: In function 'test_syscall':
nsyscalls.c:64: warning: integer constant is too large for 'long' type
nsyscalls.c:65: warning: integer constant is too large for 'long' type
nsyscalls.c:66: warning: integer constant is too large for 'long' type
nsyscalls.c:67: warning: integer constant is too large for 'long' type
nsyscalls.c:68: warning: integer constant is too large for 'long' type
nsyscalls.c:69: warning: integer constant is too large for 'long' type
preadv-pwritev.c: In function 'main':
preadv-pwritev.c:162: warning: comparison between signed and unsigned
prlimit64.c: In function 'main':
prlimit64.c:65: warning: integer constant is too large for 'long' type
prlimit64.c:70: warning: integer constant is too large for 'long' type
remap_file_pages.c: In function 'main':
remap_file_pages.c:42: warning: integer constant is too large for 'long' type
remap_file_pages.c:43: warning: integer constant is too large for 'long' type
remap_file_pages.c:45: warning: integer constant is too large for 'long' type
renameat.c: In function 'main':
renameat.c:15: warning: integer constant is too large for 'long' type
renameat.c:16: warning: integer constant is too large for 'long' type
rt_sigqueueinfo.c: In function 'main':
rt_sigqueueinfo.c:41: warning: integer constant is too large for 'long' type
rt_tgsigqueueinfo.c: In function 'k_tgsigqueueinfo':
rt_tgsigqueueinfo.c:45: warning: integer constant is too large for 'long' type
rt_tgsigqueueinfo.c:46: warning: integer constant is too large for 'long' type
rt_tgsigqueueinfo.c:47: warning: integer constant is too large for 'long' type
rt_tgsigqueueinfo.c: In function 'main':
rt_tgsigqueueinfo.c:67: warning: integer constant is too large for 'long' type
sendfile.c: In function 'main':
sendfile.c:110: warning: integer constant is too large for 'long' type
sendfile64.c: In function 'main':
sendfile64.c💯 warning: integer constant is too large for 'long' type
set_mempolicy.c: In function 'main':
set_mempolicy.c:129: warning: integer constant is too large for 'long' type
set_mempolicy.c:130: warning: integer constant is too large for 'long' type
setrlimit.c: In function 'main':
setrlimit.c:44: warning: integer constant is too large for 'long' type
socketcall.c: In function 'test_socketcall':
socketcall.c:58: warning: integer constant is too large for 'long' type
splice.c: In function 'main':
splice.c:41: warning: integer constant is too large for 'long' type
splice.c:42: warning: integer constant is too large for 'long' type
splice.c:45: warning: integer constant is too large for 'long' type
splice.c:46: warning: integer constant is too large for 'long' type
symlinkat.c: In function 'main':
symlinkat.c:12: warning: integer constant is too large for 'long' type
sync_file_range.c: In function 'main':
sync_file_range.c:42: warning: integer constant is too large for 'long' type
sync_file_range.c:43: warning: integer constant is too large for 'long' type
syslog.c: In function 'main':
syslog.c:14: warning: integer constant is too large for 'long' type
tee.c: In function 'main':
tee.c:41: warning: integer constant is too large for 'long' type
tee.c:42: warning: integer constant is too large for 'long' type
timer_create.c: In function 'main':
timer_create.c:52: warning: integer constant is too large for 'long' type
timer_create.c:84: warning: integer constant is too large for 'long' type
timer_create.c:85: warning: integer constant is too large for 'long' type
truncate64.c: In function 'main':
truncate64.c:41: warning: integer constant is too large for 'long' type
xgetrlimit.c: In function 'main':
xgetrlimit.c:71: warning: integer constant is too large for 'long' type
umode_t.c: In function 'test_syscall':
umode_t.c:46: warning: integer constant is too large for 'long' type
unlinkat.c: In function 'main':
unlinkat.c:13: warning: integer constant is too large for 'long' type
waitpid.c: In function 'main':
waitpid.c:43: warning: integer constant is too large for 'long' type
waitid.c: In function 'poison':
waitid.c:141: warning: integer constant is too large for 'long' type
xetpriority.c: In function 'main':
xetpriority.c:15: warning: integer constant is too large for 'long' type
xetpriority.c:19: warning: integer constant is too large for 'long' type
xetpriority.c:20: warning: integer constant is too large for 'long' type
xetpgid.c: In function 'main':
xetpgid.c:43: warning: integer constant is too large for 'long' type
xetpgid.c:47: warning: integer constant is too large for 'long' type
xetpgid.c:48: warning: integer constant is too large for 'long' type

(SLES 11SP4, i386)

* tests/alarm.c (main): Add proper suffix to integer constant.
* tests/aio.c (main): Likewise.
* tests/btrfs.c (btrfs_test_sync_ioctls, btrfs_test_subvol_ioctls): Likewise.
* tests/dup2.c (main): Likewise.
* tests/dup3.c (main): Likewise.
* tests/epoll_create.c (main): Likewise.
* tests/epoll_ctl.c (invoke_syscall): Likewise.
* tests/faccessat.c (main): Likewise.
* tests/fchdir.c (main): Likewise.
* tests/fcntl.c (test_flock64_einval): Likewise.
* tests/fcntl64.c (test_flock64_einval): Likewise.
* tests/fdatasync.c (main): Likewise.
* tests/flock.c (main): Likewise.
* tests/fstat64.c (SAMPLE_SIZE): Likewise.
* tests/fstat.c (SAMPLE_SIZE): Likewise.
* tests/fsync.c (main): Likewise.
* tests/ftruncate64.c (main): Likewise.
* tests/futimesat.c (main): Likewise.
* tests/get_mempolicy.c (main): Likewise.
* tests/getdents.c (main): Likewise.
* tests/getdents64.c (main): Likewise.
* tests/ioctl_block.c (lmagic, main): Likewise.
* tests/ioctl_evdev.c (lmagic): Likewise.
* tests/ioctl_mtd.c (lmagic): Likewise.
* tests/ioctl_rtc.c (lmagic): Likewise.
* tests/ioctl_v4l2.c (main): Likewise.
* tests/ioperm.c (main): Likewise.
* tests/ipc.c (ipc_call): Likewise.
* tests/kill.c (main): Likewise.
* tests/linkat.c (main): Likewise.
* tests/lstat64.c (SAMPLE_SIZE): Likewise.
* tests/lstat.c (SAMPLE_SIZE): Likewise.
* tests/mbind.c (main): Likewise.
* tests/migrate_pages.c (main): Likewise.
* tests/mkdirat.c (TEST_SYSCALL_PREFIX_ARGS): Likewise.
* tests/mknod.c (call_mknod, main): Likewise.
* tests/mknodat.c (fd, call_mknodat, main): Likewise.
* tests/mmap.c (main): Likewise.
* tests/move_pages.c (print_stat_pages, print_move_pages): Likewise.
* tests/mq_sendrecv.c (main): Likewise.
* tests/nsyscalls.c (test_syscall): Likewise.
* tests/prlimit64.c (main): Likewise.
* tests/remap_file_pages.c (main): Likewise.
* tests/renameat.c (main): Likewise.
* tests/rt_sigqueueinfo.c (main): Likewise.
* tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo, main): Likewise.
* tests/sendfile.c (main): Likewise.
* tests/sendfile64.c (main): Likewise.
* tests/set_mempolicy.c (main): Likewise.
* tests/setrlimit.c (main): Likewise.
* tests/socketcall.c (test_socketcall): Likewise.
* tests/splice.c (main): Likewise.
* tests/stat64.c (SAMPLE_SIZE): Likewise.
* tests/stat.c (SAMPLE_SIZE): Likewise.
* tests/struct_flock.c (invoke_test_syscall, test_flock_einval): Likewise.
* tests/symlinkat.c (main): Likewise.
* tests/sync_file_range.c (main): Likewise.
* tests/syslog.c (main): Likewise.
* tests/tee.c (main): Likewise.
* tests/timer_create.c (main): Likewise.
* tests/truncate64.c (main): Likewise.
* tests/umode_t.c (test_syscall): Likewise.
* tests/unlinkat.c (main): Likewise.
* tests/waitid.c (main): Likewise.
* tests/waitpid.c (main): Likewise.
* tests/xetpgid.c (main): Likewise.
* tests/xetpriority.c (main): Likewise.
* tests/xgetrlimit.c (main): Likewise.
* tests/xstatfsx.c (main) [CHECK_ODD_SIZE]: Likewise.
* tests/xstatx.c (main): Likewise.
This commit is contained in:
Eugene Syromyatnikov 2016-11-13 19:14:46 +03:00 committed by Dmitry V. Levin
parent 35126cda20
commit 13c467bf69
70 changed files with 136 additions and 132 deletions

View File

@ -159,7 +159,7 @@ main(void)
.aio_fildes = 0xdefaced1,
.aio_buf = (unsigned long)data2,
.aio_nbytes = sizeof(data2),
.aio_offset = 0xdeadda7abadc0ded,
.aio_offset = 0xdeadda7abadc0dedULL,
},
{
.aio_data = 0,

View File

@ -38,7 +38,7 @@
int
main(void)
{
int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002a);
int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002aULL);
printf("alarm(%u) = %d\n", 42, rc);
puts("+++ exited with 0 +++");

View File

@ -199,7 +199,7 @@ btrfs_test_trans_ioctls(void)
static void
btrfs_test_sync_ioctls(void)
{
uint64_t u64val = 0xdeadbeefbadc0ded;
uint64_t u64val = 0xdeadbeefbadc0dedULL;
ioctl(-1, BTRFS_IOC_SYNC, NULL);
printf("ioctl(-1, BTRFS_IOC_SYNC) = -1 EBADF (%m)\n");
@ -286,8 +286,8 @@ btrfs_test_subvol_ioctls(void)
{
const char *subvol_name = "subvol-name";
char *long_subvol_name;
void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeed;
uint64_t u64val = 0xdeadbeefbadc0ded;
void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeedULL;
uint64_t u64val = 0xdeadbeefbadc0dedULL;
struct btrfs_ioctl_vol_args vol_args = {};
struct btrfs_ioctl_vol_args_v2 vol_args_v2 = {
.fd = 2,

View File

@ -9,8 +9,8 @@
int
main(void)
{
const long int fd_old = (long int) 0xdeadbeefffffffff;
const long int fd_new = (long int) 0xdeadbeeffffffffe;
const long int fd_old = (long int) 0xdeadbeefffffffffULL;
const long int fd_new = (long int) 0xdeadbeeffffffffeULL;
long rc = syscall(__NR_dup2, fd_old, fd_new);
printf("dup2(%d, %d) = %ld %s (%m)\n",

View File

@ -10,8 +10,8 @@
int
main(void)
{
const long int fd_old = (long int) 0xdeadbeefffffffff;
const long int fd_new = (long int) 0xdeadbeeffffffffe;
const long int fd_old = (long int) 0xdeadbeefffffffffULL;
const long int fd_new = (long int) 0xdeadbeeffffffffeULL;
long rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC);
printf("dup3(%d, %d, O_CLOEXEC) = %ld %s (%m)\n",

View File

@ -9,7 +9,7 @@
int
main(void)
{
const long int size = (long int) 0xdeadbeefffffffff;
const long int size = (long int) 0xdeadbeefffffffffULL;
long rc = syscall(__NR_epoll_create, size);
printf("epoll_create(%d) = %ld %s (%m)\n",

View File

@ -11,7 +11,7 @@
static long
invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev)
{
op |= (unsigned long) 0xffffffff00000000;
op |= (unsigned long) 0xffffffff00000000ULL;
return syscall(__NR_epoll_ctl, epfd, op, fd, (unsigned long) ev);
}

View File

@ -10,7 +10,7 @@ int
main(void)
{
static const char sample[] = "faccessat.sample";
const long int fd = (long int) 0xdeadbeefffffffff;
const long int fd = (long int) 0xdeadbeefffffffffULL;
long rc = syscall(__NR_faccessat, fd, sample, F_OK);
printf("faccessat(%d, \"%s\", F_OK) = %ld %s (%m)\n",

View File

@ -9,7 +9,7 @@
int
main(void)
{
const long int fd = (long int) 0xdeadbeefffffffff;
const long int fd = (long int) 0xdeadbeefffffffffULL;
long rc = syscall(__NR_fchdir, fd);
printf("fchdir(%d) = %ld %s (%m)\n",

View File

@ -41,8 +41,8 @@ test_flock64_einval(const int cmd, const char *name)
{
struct_kernel_flock64 fl = {
.l_type = F_RDLCK,
.l_start = 0xdefaced1facefeed,
.l_len = 0xdefaced2cafef00d
.l_start = 0xdefaced1facefeedULL,
.l_len = 0xdefaced2cafef00dULL
};
invoke_test_syscall(cmd, &fl);
printf("%s(0, %s, %p) = %s\n",

View File

@ -41,8 +41,8 @@ test_flock64_einval(const int cmd, const char *name)
{
struct_kernel_flock64 fl = {
.l_type = F_RDLCK,
.l_start = 0xdefaced1facefeed,
.l_len = 0xdefaced2cafef00d
.l_start = 0xdefaced1facefeedULL,
.l_len = 0xdefaced2cafef00dULL
};
invoke_test_syscall(cmd, &fl);
printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET"

View File

@ -9,7 +9,7 @@
int
main(void)
{
const long int fd = (long int) 0xdeadbeefffffffff;
const long int fd = (long int) 0xdeadbeefffffffffULL;
long rc = syscall(__NR_fdatasync, fd);
printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name());

View File

@ -10,7 +10,7 @@
int
main(void)
{
const unsigned long fd = (long int) 0xdeadbeefffffffff;
const unsigned long fd = (long int) 0xdeadbeefffffffffULL;
long rc = syscall(__NR_flock, fd, LOCK_SH);
printf("flock(%d, LOCK_SH) = %ld %s (%m)\n",

View File

@ -32,7 +32,7 @@
# define TEST_SYSCALL_NR __NR_fstat
# define TEST_SYSCALL_STR "fstat"
# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418)
# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418ULL)
# include "fstatx.c"
#else

View File

@ -35,7 +35,7 @@
# define STRUCT_STAT struct stat64
# define STRUCT_STAT_STR "struct stat64"
# define STRUCT_STAT_IS_STAT64 1
# define SAMPLE_SIZE ((libc_off_t) 43147718418)
# define SAMPLE_SIZE ((libc_off_t) 43147718418ULL)
# include "fstatx.c"
#else

View File

@ -9,7 +9,7 @@
int
main(void)
{
const long int fd = (long int) 0xdeadbeefffffffff;
const long int fd = (long int) 0xdeadbeefffffffffULL;
long rc = syscall(__NR_fsync, fd);
printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name());

View File

@ -36,7 +36,7 @@
int
main(void)
{
const off_t len = 0xdefaceddeadbeef;
const off_t len = 0xdefaceddeadbeefULL;
int rc = ftruncate(-1, len);
printf("ftruncate64(-1, %llu) = %d %s (%m)\n",

View File

@ -49,14 +49,14 @@ main(void)
perror_msg_and_fail("gettimeofday");
static const char sample[] = "futimesat_sample";
unsigned long dirfd = (unsigned long) 0xdeadbeef00000000 | -100U;
unsigned long dirfd = (unsigned long) 0xdeadbeef00000000ULL | -100U;
long rc = syscall(__NR_futimesat, dirfd, sample, 0);
printf("futimesat(AT_FDCWD, \"%s\", NULL) = %ld %s (%m)\n",
sample, rc, errno2name());
struct timeval *const ts = tail_alloc(sizeof(*ts) * 2);
dirfd = (unsigned long) 0xdeadbeefffffffff;
dirfd = (unsigned long) 0xdeadbeefffffffffULL;
rc = syscall(__NR_futimesat, dirfd, 0, ts + 1);
printf("futimesat(%d, NULL, %p) = %ld %s (%m)\n",

View File

@ -81,9 +81,9 @@ main(void)
puts("get_mempolicy(NULL, NULL, 0, NULL, 0) = 0");
int *mode = (void *) 0xdefaced1baddeed2;
unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded;
const unsigned long *nodemask = (void *) 0xfacedad3bebefed4;
const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef;
unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL;
const unsigned long *nodemask = (void *) 0xfacedad3bebefed4ULL;
const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL;
const unsigned long flags = -1U;
rc = syscall(__NR_get_mempolicy, mode, nodemask, maxnode, addr, flags);
printf("get_mempolicy(%p, %p, %lu, %#lx, %s|%#lx) = %ld %s (%m)\n",

View File

@ -106,12 +106,13 @@ main(int ac, const char **av)
assert(!close(0));
assert(!open(".", O_RDONLY | O_DIRECTORY));
unsigned long count = (unsigned long) 0xfacefeeddeadbeef;
long rc = syscall(__NR_getdents, (long) 0xdefacedffffffff, NULL, count);
unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL;
long rc = syscall(__NR_getdents, (long) 0xdefacedffffffffULL, NULL,
count);
printf("getdents(-1, NULL, %u) = %ld %s (%m)\n",
(unsigned) count, rc, errno2name());
count = (unsigned long) 0xfacefeed00000000 | sizeof(buf);
count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf);
while ((rc = syscall(__NR_getdents, 0, buf, count))) {
kernel_dirent *d;
long i;

View File

@ -111,12 +111,13 @@ main(int ac, const char **av)
assert(!close(0));
assert(!open(".", O_RDONLY | O_DIRECTORY));
unsigned long count = (unsigned long) 0xfacefeeddeadbeef;
long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffff, NULL, count);
unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL;
long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffffULL, NULL,
count);
printf("getdents64(-1, NULL, %u) = %ld %s (%m)\n",
(unsigned) count, rc, errno2name());
count = (unsigned long) 0xfacefeed00000000 | sizeof(buf);
count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf);
while ((rc = syscall(__NR_getdents64, 0, buf, count))) {
kernel_dirent64 *d;
long i;

View File

@ -41,7 +41,7 @@
#include "xlat.h"
static const unsigned int magic = 0xdeadbeef;
static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded;
static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL;
static void
init_magic(void *addr, const unsigned int size)
@ -133,8 +133,8 @@ main(void)
printf("ioctl(-1, BLKBSZSET, [%d]) = -1 EBADF (%m)\n", *val_int);
uint64_t *pair_int64 = tail_alloc(sizeof(*pair_int64) * 2);
pair_int64[0] = 0xdeadbeefbadc0ded;
pair_int64[1] = 0xfacefeedcafef00d;
pair_int64[0] = 0xdeadbeefbadc0dedULL;
pair_int64[1] = 0xfacefeedcafef00dULL;
#ifdef BLKDISCARD
ioctl(-1, BLKDISCARD, pair_int64);
@ -158,7 +158,7 @@ main(void)
blkpg->op = 3;
blkpg->flags = 0xdeadbeef;
blkpg->datalen = 0xbadc0ded;
blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeed;
blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeedULL;
ioctl(-1, BLKPG, blkpg);
printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d"
@ -167,8 +167,8 @@ main(void)
(unsigned long) blkpg->data);
struct blkpg_partition *const bp = tail_alloc(sizeof(*bp));
bp->start = 0xfac1fed2dad3bef4;
bp->length = 0xfac5fed6dad7bef8;
bp->start = 0xfac1fed2dad3bef4ULL;
bp->length = 0xfac5fed6dad7bef8ULL;
bp->pno = magic;
memset(bp->devname, 'A', sizeof(bp->devname));
memset(bp->volname, 'B', sizeof(bp->volname));

View File

@ -39,7 +39,7 @@
# include <linux/input.h>
static const unsigned int magic = 0xdeadbeef;
static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded;
static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL;
static void
init_magic(void *addr, const unsigned int size)

View File

@ -43,7 +43,7 @@
#endif
static const unsigned int magic = 0xdeadbeef;
static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded;
static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL;
static void
init_magic(void *addr, const unsigned int size)

View File

@ -37,7 +37,7 @@
#include "xlat.h"
static const unsigned int magic = 0xdeadbeef;
static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded;
static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL;
static void
init_magic(void *addr, const unsigned int size)

View File

@ -406,7 +406,7 @@ main(void )
tail_alloc(sizeof(*p_ext_controls->controls) * p_ext_controls->count);
p_ext_controls->controls[0].id = V4L2_CID_BRIGHTNESS;
p_ext_controls->controls[0].size = 0;
p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeef;
p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeefULL;
p_ext_controls->controls[1].id = V4L2_CID_CONTRAST;
p_ext_controls->controls[1].size = 2;
p_ext_controls->controls[1].string =

View File

@ -9,7 +9,7 @@
int
main(void)
{
const unsigned long port = (unsigned long) 0xdeafbeefffffffff;
const unsigned long port = (unsigned long) 0xdeafbeefffffffffULL;
long rc = syscall(__NR_ioperm, port, 1, 0);
printf("ioperm(%#lx, %#lx, %d) = %ld %s (%m)\n",

View File

@ -49,7 +49,7 @@ ipc_call(const unsigned short version, const unsigned short call,
long a1, long a2, long a3, long a4, long a5)
{
const unsigned long val =
(unsigned long) 0xfacefeed00000000 |
(unsigned long) 0xfacefeed00000000ULL |
(unsigned int) version << 16 |
call;

View File

@ -56,16 +56,16 @@ main(void)
perror_msg_and_fail("sigprocmask");
const int pid = getpid();
long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000 | SIGALRM);
long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000ULL | SIGALRM);
printf("kill(%d, SIGALRM) = %ld\n", pid, rc);
const long big_pid = (long) 0xfacefeedbadc0ded;
const long big_sig = (long) 0xdeadbeefcafef00d;
const long big_pid = (long) 0xfacefeedbadc0dedULL;
const long big_sig = (long) 0xdeadbeefcafef00dULL;
rc = syscall(__NR_kill, big_pid, big_sig);
printf("kill(%d, %d) = %ld %s (%m)\n",
(int) big_pid, (int) big_sig, rc, errno2name());
rc = syscall(__NR_kill, (long) 0xdefaced00000000 | pid, 0);
rc = syscall(__NR_kill, (long) 0xdefaced00000000ULL | pid, 0);
printf("kill(%d, SIG_0) = %ld\n", pid, rc);
puts("+++ exited with 0 +++");

View File

@ -11,8 +11,8 @@ main(void)
{
static const char sample_1[] = "linkat_sample_old";
static const char sample_2[] = "linkat_sample_new";
const long fd_old = (long) 0xdeadbeefffffffff;
const long fd_new = (long) 0xdeadbeeffffffffe;
const long fd_old = (long) 0xdeadbeefffffffffULL;
const long fd_new = (long) 0xdeadbeeffffffffeULL;
long rc = syscall(__NR_linkat, fd_old, sample_1, fd_new, sample_2, 0);
printf("linkat(%d, \"%s\", %d, \"%s\", 0) = %ld %s (%m)\n",

View File

@ -32,7 +32,7 @@
# define TEST_SYSCALL_NR __NR_lstat
# define TEST_SYSCALL_STR "lstat"
# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418)
# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418ULL)
# include "lstatx.c"
#else

View File

@ -35,7 +35,7 @@
# define STRUCT_STAT struct stat64
# define STRUCT_STAT_STR "struct stat64"
# define STRUCT_STAT_IS_STAT64 1
# define SAMPLE_SIZE ((libc_off_t) 43147718418)
# define SAMPLE_SIZE ((libc_off_t) 43147718418ULL)
# include "lstatx.c"
#else

View File

@ -38,10 +38,10 @@
int
main(void)
{
const unsigned long len = (unsigned long) 0xcafef00dbadc0ded;
const unsigned long len = (unsigned long) 0xcafef00dbadc0dedULL;
const unsigned long mode = 3;
const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1;
const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2;
const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1ULL;
const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2ULL;
const unsigned long flags = -1UL;
long rc = syscall(__NR_mbind, 0, len, mode, nodemask, maxnode, flags);

View File

@ -38,7 +38,7 @@
int
main(void)
{
const long pid = (long) 0xfacefeedffffffff;
const long pid = (long) 0xfacefeedffffffffULL;
long rc = syscall(__NR_migrate_pages, pid, 0, 0, 0);
printf("migrate_pages(%d, 0, NULL, NULL) = %ld %s (%m)\n",
(int) pid, rc, errno2name());

View File

@ -5,7 +5,7 @@
# define TEST_SYSCALL_NR __NR_mkdirat
# define TEST_SYSCALL_STR "mkdirat"
# define TEST_SYSCALL_PREFIX_ARGS (long int) 0xdeadbeefffffffff,
# define TEST_SYSCALL_PREFIX_ARGS (long int) 0xdeadbeefffffffffULL,
# define TEST_SYSCALL_PREFIX_STR "-1, "
# include "umode_t.c"

View File

@ -13,14 +13,14 @@ static const char sample[] = "mknod";
static long
call_mknod(unsigned short mode, unsigned long dev)
{
unsigned long lmode = (unsigned long) 0xffffffffffff0000 | mode;
unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode;
return syscall(__NR_mknod, sample, lmode, dev);
}
int
main(void)
{
unsigned long dev = (unsigned long) 0xdeadbeefbadc0ded;
unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL;
long rc = call_mknod(0, dev);
printf("mknod(\"%s\", 000) = %ld %s (%m)\n",
@ -46,14 +46,14 @@ main(void)
printf("mknod(\"%s\", S_IFIFO|0600) = %ld %s (%m)\n",
sample, rc, errno2name());
dev = (unsigned long) 0xdeadbeef00000000 | makedev(1, 7);
dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7);
rc = call_mknod(S_IFCHR | 024, dev);
printf("mknod(\"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n",
sample, rc, errno2name());
const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK;
dev = (unsigned long) 0xdeadbeefbadc0ded;
dev = (unsigned long) 0xdeadbeefbadc0dedULL;
rc = call_mknod(mode, dev);
printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho"

View File

@ -9,19 +9,19 @@
# include <unistd.h>
static const char sample[] = "mknodat_sample";
static const long int fd = (long int) 0xdeadbeefffffffff;
static const long int fd = (long int) 0xdeadbeefffffffffULL;
static long
call_mknodat(unsigned short mode, unsigned long dev)
{
unsigned long lmode = (unsigned long) 0xffffffffffff0000 | mode;
unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode;
return syscall(__NR_mknodat, fd, sample, lmode, dev);
}
int
main(void)
{
unsigned long dev = (unsigned long) 0xdeadbeefbadc0ded;
unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL;
long rc = call_mknodat(0, dev);
printf("mknodat(-1, \"%s\", 000) = %ld %s (%m)\n",
@ -47,14 +47,14 @@ main(void)
printf("mknodat(-1, \"%s\", S_IFIFO|0600) = %ld %s (%m)\n",
sample, rc, errno2name());
dev = (unsigned long) 0xdeadbeef00000000 | makedev(1, 7);
dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7);
rc = call_mknodat(S_IFCHR | 024, dev);
printf("mknodat(-1, \"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n",
sample, rc, errno2name());
const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK;
dev = (unsigned long) 0xdeadbeefbadc0ded;
dev = (unsigned long) 0xdeadbeefbadc0dedULL;
rc = call_mknodat(mode, dev);
printf("mknodat(-1, \"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho"

View File

@ -45,10 +45,10 @@ main(int ac, char **av)
void *addr, *p;
#if ULONG_MAX > 4294967295UL
offset = 0xcafedeadbeef000 & -pagesize;
offset = 0xcafedeadbeef000ULL & -pagesize;
addr = (void *) (uintmax_t) (0xfacefeed000 & -pagesize);
#else
offset = 0xdeadbeef000 & -pagesize;
offset = 0xdeadbeef000ULL & -pagesize;
addr = (void *) (unsigned int) (0xfaced000 & -pagesize);
#endif
const uintmax_t uoffset =

View File

@ -136,7 +136,7 @@ static void
print_stat_pages(const unsigned long pid, const unsigned long count,
const void **const pages, int *const status)
{
const unsigned long flags = (unsigned long) 0xfacefeed00000002;
const unsigned long flags = (unsigned long) 0xfacefeed00000002ULL;
long rc = syscall(__NR_move_pages,
pid, count, pages, NULL, status, flags);
@ -163,7 +163,7 @@ print_move_pages(const unsigned long pid,
int *const nodes,
int *const status)
{
const unsigned long flags = (unsigned long) 0xfacefeed00000004;
const unsigned long flags = (unsigned long) 0xfacefeed00000004ULL;
count += offset;
long rc = syscall(__NR_move_pages,
@ -185,7 +185,7 @@ int
main(void)
{
const unsigned long pid =
(unsigned long) 0xfacefeed00000000 | getpid();
(unsigned long) 0xfacefeed00000000ULL | getpid();
unsigned long count = 1;
const unsigned page_size = get_page_size();
const void *const page = tail_alloc(page_size);

View File

@ -235,7 +235,7 @@ main(void)
struct_sigevent bogus_sev_data = {
.sigev_notify = 0xdefaced,
.sigev_signo = 0xfacefeed,
.sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0ded
.sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL
};
const char *errstr;
@ -398,9 +398,9 @@ main(void)
/* SIGEV_THREAD */
bogus_sev->sigev_notify = SIGEV_THREAD;
bogus_sev->sigev_un.sigev_thread.function =
(unsigned long) 0xdeadbeefbadc0ded;
(unsigned long) 0xdeadbeefbadc0dedULL;
bogus_sev->sigev_un.sigev_thread.attribute =
(unsigned long) 0xcafef00dfacefeed;
(unsigned long) 0xcafef00dfacefeedULL;
rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}, "
"sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD, "

View File

@ -61,12 +61,12 @@ static void
test_syscall(const unsigned long nr)
{
static const kernel_ulong_t a[] = {
(kernel_ulong_t) 0xface0fedbadc0ded,
(kernel_ulong_t) 0xface1fedbadc1ded,
(kernel_ulong_t) 0xface2fedbadc2ded,
(kernel_ulong_t) 0xface3fedbadc3ded,
(kernel_ulong_t) 0xface4fedbadc4ded,
(kernel_ulong_t) 0xface5fedbadc5ded
(kernel_ulong_t) 0xface0fedbadc0dedULL,
(kernel_ulong_t) 0xface1fedbadc1dedULL,
(kernel_ulong_t) 0xface2fedbadc2dedULL,
(kernel_ulong_t) 0xface3fedbadc3dedULL,
(kernel_ulong_t) 0xface4fedbadc4dedULL,
(kernel_ulong_t) 0xface5fedbadc5dedULL
};
long rc = syscall(nr | SYSCALL_BIT,

View File

@ -62,12 +62,12 @@ int
main(void)
{
unsigned long pid =
(unsigned long) 0xdefaced00000000 | (unsigned) getpid();
(unsigned long) 0xdefaced00000000ULL | (unsigned) getpid();
uint64_t *const rlimit = tail_alloc(sizeof(*rlimit) * 2);
const struct xlat *xlat;
for (xlat = resources; xlat->str; ++xlat) {
unsigned long res = 0xfacefeed00000000 | xlat->val;
unsigned long res = 0xfacefeed00000000ULL | xlat->val;
long rc = syscall(__NR_prlimit64, pid, res, 0, rlimit);
if (rc)
printf("prlimit64(%d, %s, NULL, %p) = %ld %s (%m)\n",

View File

@ -39,10 +39,10 @@
int
main(void)
{
const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef;
const unsigned long size = (unsigned long) 0xdefaced1bad2f00d;
const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL;
const unsigned long size = (unsigned long) 0xdefaced1bad2f00dULL;
const unsigned long prot = PROT_READ|PROT_WRITE|PROT_EXEC;
const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deed;
const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deedULL;
const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS;
long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags);

View File

@ -12,8 +12,8 @@
int
main(void)
{
const long int fd_old = (long int) 0xdeadbeefffffffff;
const long int fd_new = (long int) 0xdeadbeeffffffffe;
const long int fd_old = (long int) 0xdeadbeefffffffffULL;
const long int fd_new = (long int) 0xdeadbeeffffffffeULL;
long rc = syscall(__NR_renameat, fd_old, OLD_FILE, fd_new, NEW_FILE);
printf("renameat(%d, \"%s\", %d, \"%s\") = %ld %s (%m)\n",

View File

@ -38,7 +38,7 @@ main (void)
.sa_handler = SIG_IGN
};
union sigval value = {
.sival_ptr = (void *) (unsigned long) 0xdeadbeefbadc0ded
.sival_ptr = (void *) (unsigned long) 0xdeadbeefbadc0dedULL
};
pid_t pid = getpid();

View File

@ -42,9 +42,9 @@ static long
k_tgsigqueueinfo(const pid_t pid, const int sig, const void const *info)
{
return syscall(__NR_rt_tgsigqueueinfo,
(unsigned long) 0xffffffff00000000 | pid,
(unsigned long) 0xffffffff00000000 | pid,
(unsigned long) 0xffffffff00000000 | sig,
(unsigned long) 0xffffffff00000000ULL | pid,
(unsigned long) 0xffffffff00000000ULL | pid,
(unsigned long) 0xffffffff00000000ULL | sig,
info);
}
@ -64,7 +64,7 @@ main (void)
info->si_code = SI_QUEUE;
info->si_pid = getpid();
info->si_uid = getuid();
info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeed;
info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeedULL;
if (k_tgsigqueueinfo(info->si_pid, SIGUSR1, info))
(errno == ENOSYS ? perror_msg_and_skip : perror_msg_and_fail)(

View File

@ -107,7 +107,7 @@ main(int ac, const char **av)
if (p_off != p) {
uint64_t *p_off64 = (uint64_t *) p_off;
*p_off64 = 0xcafef00dfacefeed;
*p_off64 = 0xcafef00dfacefeedULL;
assert(syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1) == -1);
printf("sendfile(%d, %d, [14627392582579060461], 1)"
" = -1 EINVAL (%m)\n", sv[1], reg_in);

View File

@ -97,7 +97,7 @@ main(int ac, const char **av)
(unsigned long) stb.st_size + 1,
(unsigned long) blen);
*p_off = 0xcafef00dfacefeed;
*p_off = 0xcafef00dfacefeedULL;
assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == -1);
printf("sendfile64(%d, %d, [14627392582579060461], 1)"
" = -1 EINVAL (%m)\n", sv[1], reg_in);

View File

@ -126,8 +126,8 @@ main(void)
perror_msg_and_skip("set_mempolicy");
puts("set_mempolicy(MPOL_DEFAULT, NULL, 0) = 0");
const unsigned long *nodemask = (void *) 0xfacefeedfffffffe;
const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded;
const unsigned long *nodemask = (void *) 0xfacefeedfffffffeULL;
const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL;
long rc = syscall(__NR_set_mempolicy, 1, nodemask, maxnode);
printf("set_mempolicy(MPOL_PREFERRED, %p, %lu) = %s\n",
nodemask, maxnode, sprintrc(rc));

View File

@ -41,7 +41,7 @@ main(void)
const struct xlat *xlat;
for (xlat = resources; xlat->str; ++xlat) {
unsigned long res = 0xfacefeed00000000 | xlat->val;
unsigned long res = 0xfacefeed00000000ULL | xlat->val;
long rc = syscall(__NR_setrlimit, res, 0);
printf("setrlimit(%s, NULL) = %s\n", xlat->str, sprintrc(rc));

View File

@ -55,7 +55,7 @@ static void
test_socketcall(const int i, const void *const addr)
{
const unsigned long call =
(unsigned long) 0xfacefeed00000000 | (unsigned int) i;
(unsigned long) 0xfacefeed00000000ULL | (unsigned int) i;
long rc = syscall(__NR_socketcall, call, addr);

View File

@ -38,12 +38,12 @@
int
main(void)
{
const long int fd_in = (long int) 0xdeadbeefffffffff;
const long int fd_out = (long int) 0xdeadbeeffffffffe;
const long int fd_in = (long int) 0xdeadbeefffffffffULL;
const long int fd_out = (long int) 0xdeadbeeffffffffeULL;
long long int *const off_in = tail_alloc(sizeof(*off_in));
long long int *const off_out = tail_alloc(sizeof(*off_out));
*off_in = 0xdeadbef1facefed1;
*off_out = 0xdeadbef2facefed2;
*off_in = 0xdeadbef1facefed1ULL;
*off_out = 0xdeadbef2facefed2ULL;
const size_t len = (size_t) 0xdeadbef3facefed3ULL;
const unsigned int flags = 15;

View File

@ -32,7 +32,7 @@
# define TEST_SYSCALL_NR __NR_stat
# define TEST_SYSCALL_STR "stat"
# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418)
# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418ULL)
# include "lstatx.c"
#else

View File

@ -35,7 +35,7 @@
# define STRUCT_STAT struct stat64
# define STRUCT_STAT_STR "struct stat64"
# define STRUCT_STAT_IS_STAT64 1
# define SAMPLE_SIZE ((libc_off_t) 43147718418)
# define SAMPLE_SIZE ((libc_off_t) 43147718418ULL)
# include "lstatx.c"
#else

View File

@ -45,7 +45,7 @@
static long
invoke_test_syscall(const unsigned int cmd, void *const p)
{
const unsigned long op = (unsigned long) 0xffffffff00000000 | cmd;
const unsigned long op = (unsigned long) 0xffffffff00000000ULL | cmd;
return syscall(TEST_SYSCALL_NR, 0, op, (unsigned long) p);
}
@ -55,8 +55,8 @@ test_flock_einval(const int cmd, const char *name)
{
struct_kernel_flock fl = {
.l_type = F_RDLCK,
.l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeed,
.l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00d
.l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeedULL,
.l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00dULL
};
invoke_test_syscall(cmd, &fl);
printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET"

View File

@ -9,7 +9,7 @@
int
main(void)
{
const long int fd = (long int) 0xdeadbeefffffffff;
const long int fd = (long int) 0xdeadbeefffffffffULL;
static const char oldpath[] = "symlink_old";
static const char newpath[] = "symlink_new";

View File

@ -39,8 +39,8 @@ int
main(void)
{
const int fd = -1;
const off64_t offset = 0xdeadbeefbadc0ded;
const off64_t nbytes = 0xfacefeedcafef00d;
const off64_t offset = 0xdeadbeefbadc0dedULL;
const off64_t nbytes = 0xfacefeedcafef00dULL;
const unsigned int flags = -1;
int rc = sync_file_range(fd, offset, nbytes, flags);

View File

@ -11,7 +11,7 @@
int
main(void)
{
const long addr = (long) 0xfacefeeddeadbeef;
const long addr = (long) 0xfacefeeddeadbeefULL;
int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1);
printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n",
addr, rc, errno2name());

View File

@ -38,8 +38,8 @@
int
main(void)
{
const long int fd_in = (long int) 0xdeadbeefffffffff;
const long int fd_out = (long int) 0xdeadbeeffffffffe;
const long int fd_in = (long int) 0xdeadbeefffffffffULL;
const long int fd_out = (long int) 0xdeadbeeffffffffeULL;
const size_t len = (size_t) 0xdeadbef3facefed3ULL;
const unsigned int flags = 15;

View File

@ -49,7 +49,7 @@ main(void)
struct_sigevent sev = {
.sigev_notify = 0xdefaced,
.sigev_signo = 0xfacefeed,
.sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0ded
.sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL
};
syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL);
@ -81,8 +81,10 @@ main(void)
sev.sigev_value.sival_ptr, tid[1]);
sev.sigev_notify = SIGEV_THREAD;
sev.sigev_un.sigev_thread.function = (unsigned long) 0xdeadbeefbadc0ded;
sev.sigev_un.sigev_thread.attribute = (unsigned long) 0xcafef00dfacefeed;
sev.sigev_un.sigev_thread.function =
(unsigned long) 0xdeadbeefbadc0dedULL;
sev.sigev_un.sigev_thread.attribute =
(unsigned long) 0xcafef00dfacefeedULL;
if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2]))
perror_msg_and_skip("timer_create CLOCK_REALTIME");
printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}"

View File

@ -38,7 +38,7 @@ main(void)
{
static const char fname[] = "truncate64\nfilename";
static const char qname[] = "truncate64\\nfilename";
const off_t len = 0xdefaceddeadbeef;
const off_t len = 0xdefaceddeadbeefULL;
int rc = truncate(fname, len);
printf("truncate64(\"%s\", %llu) = %d %s (%m)\n",

View File

@ -43,7 +43,7 @@ static const char sample[] = TEST_SYSCALL_STR;
static void
test_syscall(unsigned short mode)
{
unsigned long lmode = (unsigned long) 0xffffffffffff0000 | mode;
unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode;
long rc = syscall(TEST_SYSCALL_NR, TEST_SYSCALL_PREFIX_ARGS
sample, lmode);

View File

@ -10,7 +10,7 @@ int
main(void)
{
static const char sample[] = "unlinkat_sample";
const long fd = (long) 0xdeadbeefffffffff;
const long fd = (long) 0xdeadbeefffffffffULL;
long rc = syscall(__NR_unlinkat, fd, sample, 0);
printf("unlinkat(%d, \"%s\", 0) = %ld %s (%m)\n",

View File

@ -138,7 +138,7 @@ sprint_siginfo(const siginfo_t *const si, const char *const status_text)
static unsigned long
poison(unsigned int v)
{
return (unsigned long) 0xfacefeed00000000 | v;
return (unsigned long) 0xfacefeed00000000ULL | v;
}
static long

View File

@ -40,7 +40,7 @@ int
main(void)
{
unsigned long pid =
(unsigned long) 0xdefaced00000000 | (unsigned) getpid();
(unsigned long) 0xdefaced00000000ULL | (unsigned) getpid();
long rc = syscall(__NR_waitpid, pid, 0L, (unsigned long) WNOHANG);
printf("waitpid(%d, NULL, WNOHANG) = %ld %s (%m)\n",
(int) pid, rc, errno2name());

View File

@ -40,12 +40,12 @@ main(void)
{
const int pid = getpid();
long rc = syscall(__NR_getpgid,
(unsigned long) 0xffffffff00000000 | pid);
(unsigned long) 0xffffffff00000000ULL | pid);
printf("getpgid(%d) = %ld\n", pid, rc);
rc = syscall(__NR_setpgid,
(unsigned long) 0xffffffff00000000,
(unsigned long) 0xffffffff00000000 | pid);
(unsigned long) 0xffffffff00000000ULL,
(unsigned long) 0xffffffff00000000ULL | pid);
printf("setpgid(0, %d) = %ld\n", pid, rc);
puts("+++ exited with 0 +++");

View File

@ -12,12 +12,12 @@ main(void)
{
const int pid = getpid();
long rc = syscall(__NR_getpriority, PRIO_PROCESS,
(unsigned long) 0xffffffff00000000 | pid);
(unsigned long) 0xffffffff00000000ULL | pid);
printf("getpriority(PRIO_PROCESS, %d) = %ld\n", pid, rc);
rc = syscall(__NR_setpriority, PRIO_PROCESS,
(unsigned long) 0xffffffff00000000 | pid,
(unsigned long) 0xffffffff00000000);
(unsigned long) 0xffffffff00000000ULL | pid,
(unsigned long) 0xffffffff00000000ULL);
printf("setpriority(PRIO_PROCESS, %d, 0) = %s\n", pid, sprintrc(rc));
puts("+++ exited with 0 +++");

View File

@ -68,7 +68,7 @@ main(void)
const struct xlat *xlat;
for (xlat = resources; xlat->str; ++xlat) {
unsigned long res = 0xfacefeed00000000 | xlat->val;
unsigned long res = 0xfacefeed00000000ULL | xlat->val;
long rc = syscall(NR_GETRLIMIT, res, 0);
if (rc && ENOSYS == errno)
perror_msg_and_skip(STR_GETRLIMIT);

View File

@ -110,7 +110,7 @@ main(void)
printf("NULL) = %s\n", errstr);
#ifdef CHECK_ODD_SIZE
const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef;
const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL;
rc = SYSCALL_INVOKE("", -1, addr, sizeof(STRUCT_STATFS) + 1);
errstr = sprintrc(rc);
PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS) + 1);

View File

@ -71,7 +71,7 @@ print_time(const time_t t)
# define STRUCT_STAT_IS_STAT64 0
# endif
# ifndef SAMPLE_SIZE
# define SAMPLE_SIZE 43147718418
# define SAMPLE_SIZE 43147718418ULL
# endif
typedef off_t libc_off_t;