diff --git a/test/zdtm/static/autofs.c b/test/zdtm/static/autofs.c index 8d75b6e68..6a9282652 100644 --- a/test/zdtm/static/autofs.c +++ b/test/zdtm/static/autofs.c @@ -188,9 +188,10 @@ static int check_fd(struct autofs_params *p) } if (st.st_dev != p->fd_stat.st_dev) { - skip("%s: st_dev differs: %lu != %lu " + skip("%s: st_dev differs: %llu != %llu " "(waiting for \"device namespaces\")", p->mountpoint, - st.st_dev, p->fd_stat.st_dev); + (long long unsigned)st.st_dev, + (long long unsigned)p->fd_stat.st_dev); // ret++; } if (st.st_mode != p->fd_stat.st_mode) { @@ -200,7 +201,7 @@ static int check_fd(struct autofs_params *p) } if (st.st_nlink != p->fd_stat.st_nlink) { pr_err("%s: st_nlink differs: %ld != %ld\n", p->mountpoint, - st.st_nlink, p->fd_stat.st_nlink); + (long)st.st_nlink, (long)p->fd_stat.st_nlink); ret++; } if (st.st_uid != p->fd_stat.st_uid) { @@ -214,8 +215,9 @@ static int check_fd(struct autofs_params *p) ret++; } if (st.st_rdev != p->fd_stat.st_rdev) { - pr_err("%s: st_rdev differs: %ld != %ld\n", p->mountpoint, - st.st_rdev, p->fd_stat.st_rdev); + pr_err("%s: st_rdev differs: %lld != %lld\n", p->mountpoint, + (long long)st.st_rdev, + (long long)p->fd_stat.st_rdev); ret++; } if (st.st_size != p->fd_stat.st_size) { @@ -484,7 +486,7 @@ static int automountd_loop(int pipe, const char *mountpoint, struct autofs_param return -EINVAL; } if (bytes != sizeof(*packet)) { - pr_err("read less than expected: %ld\n", bytes); + pr_err("read less than expected: %zd\n", bytes); return -EINVAL; } err = automountd_serve(mountpoint, param, packet); diff --git a/test/zdtm/static/cow01.c b/test/zdtm/static/cow01.c index 895dd9005..9ccd6500e 100644 --- a/test/zdtm/static/cow01.c +++ b/test/zdtm/static/cow01.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -285,7 +286,7 @@ static int parent_check(struct test_cases *test_cases, int fd) if (is_cow_ret == 1) { errno = 0; fail("%s[%#x]: %p is not COW-ed (pagemap of " - "child=[%#08lx], parent=[%#08lx])", + "child=[%"PRIx64"], parent=[%"PRIx64"])", test_cases->tname, i, addr + i * PAGE_SIZE, map_child, map_parent); } diff --git a/test/zdtm/static/deleted_dev.c b/test/zdtm/static/deleted_dev.c index 6c95c6189..285451965 100644 --- a/test/zdtm/static/deleted_dev.c +++ b/test/zdtm/static/deleted_dev.c @@ -50,8 +50,10 @@ int main(int argc, char **argv) if (st.st_mode != mode || st.st_rdev != dev) { fail("%s is no longer the device file we had", filename); - test_msg("mode %x want %x, dev %lx want %lx\n", - st.st_mode, mode, st.st_rdev, dev); + test_msg("mode %x want %x, dev %llx want %llx\n", + st.st_mode, mode, + (long long unsigned)st.st_rdev, + (long long unsigned)dev); goto out; } diff --git a/test/zdtm/static/eventfs00.c b/test/zdtm/static/eventfs00.c index 69fc88186..e05f514c4 100644 --- a/test/zdtm/static/eventfs00.c +++ b/test/zdtm/static/eventfs00.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "zdtmtst.h" @@ -65,7 +66,7 @@ int main(int argc, char *argv[]) exit(1); } - test_msg("created eventfd with %lx\n", v); + test_msg("created eventfd with %"PRIu64"\n", v); ret = write(efd, &v, sizeof(v)); if (ret != sizeof(v)) { diff --git a/test/zdtm/static/inotify_system.c b/test/zdtm/static/inotify_system.c index 360779be5..684119940 100644 --- a/test/zdtm/static/inotify_system.c +++ b/test/zdtm/static/inotify_system.c @@ -297,7 +297,7 @@ int read_set(int inot_fd, char *event_set) { int len; if ((len = read(inot_fd, event_set, EVENT_BUF_LEN)) < 0) { pr_perror("read(%d, buf, %lu) Failed, errno=%d", - inot_fd, EVENT_BUF_LEN, errno); + inot_fd, (unsigned long)EVENT_BUF_LEN, errno); return -1; } return len; diff --git a/test/zdtm/static/inotify_system_nodel.c b/test/zdtm/static/inotify_system_nodel.c index af1370b66..4633f7c16 100644 --- a/test/zdtm/static/inotify_system_nodel.c +++ b/test/zdtm/static/inotify_system_nodel.c @@ -296,7 +296,8 @@ next_event: int read_set(int inot_fd, char *event_set) { int len; if ((len = read(inot_fd, event_set, EVENT_BUF_LEN)) < 0) { - pr_perror("read(%d, buf, %lu) Failed", inot_fd, EVENT_BUF_LEN); + pr_perror("read(%d, buf, %lu) Failed", + inot_fd, (unsigned long)EVENT_BUF_LEN); return -1; } return len; diff --git a/test/zdtm/static/mntns_link_remap.c b/test/zdtm/static/mntns_link_remap.c index dac89e601..a148a9e0c 100644 --- a/test/zdtm/static/mntns_link_remap.c +++ b/test/zdtm/static/mntns_link_remap.c @@ -118,7 +118,8 @@ int ns_child(void *_arg) #else if (st1.st_nlink != 0) { #endif - pr_perror("Wrong number of links: %lu", st1.st_nlink); + pr_perror("Wrong number of links: %lu", + (long unsigned)st1.st_nlink); exit(1); } diff --git a/test/zdtm/static/unlink_largefile.c b/test/zdtm/static/unlink_largefile.c index 8f0bd8749..f47391238 100644 --- a/test/zdtm/static/unlink_largefile.c +++ b/test/zdtm/static/unlink_largefile.c @@ -28,7 +28,8 @@ int main(int argc, char ** argv) } if (lseek64(fd, offset, SEEK_SET) < 0) { - pr_perror("can't lseek %s, offset= %lx", filename, offset); + pr_perror("can't lseek %s, offset= %llx", filename, + (long long unsigned)offset); goto failed; }