]> granicus.if.org Git - strace/commitdiff
tests: change SAMPLE_SIZE type to libc_off_t
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 13 Jan 2017 19:31:30 +0000 (19:31 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 13 Jan 2017 19:31:30 +0000 (19:31 +0000)
As ftruncate libc function and our create_sample function that calls
ftruncate both take size argument of type libc_off_t, change the type
of SAMPLE_SIZE constant to libc_off_t.

* tests/fstat.c (SAMPLE_SIZE): Cast to libc_off_t.
* tests/lstat.c (SAMPLE_SIZE): Likewise.
* tests/oldfstat.c (SAMPLE_SIZE): Likewise.
* tests/oldlstat.c (SAMPLE_SIZE): Likewise.
* tests/oldstat.c (SAMPLE_SIZE): Likewise.
* tests/stat.c (SAMPLE_SIZE): Likewise.
* tests/xstatx.c (SAMPLE_SIZE): Likewise.

tests/fstat.c
tests/lstat.c
tests/oldfstat.c
tests/oldlstat.c
tests/oldstat.c
tests/stat.c
tests/xstatx.c

index 8a6c85313e9b4ffcac71979ce666cf925a9e1630..12df3e19ba75f47bd06ab989dfddbcf6f802f2c8 100644 (file)
@@ -32,7 +32,7 @@
 
 # define TEST_SYSCALL_NR __NR_fstat
 # define TEST_SYSCALL_STR "fstat"
-# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418ULL)
+# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL)
 # include "fstatx.c"
 
 #else
index 34a0e1d87cc7fcc10f1343f250b508d1e6612530..3754f766cdf6adedea20569feeb722acd77848c7 100644 (file)
@@ -32,7 +32,7 @@
 
 # define TEST_SYSCALL_NR __NR_lstat
 # define TEST_SYSCALL_STR "lstat"
-# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418ULL)
+# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL)
 # include "lstatx.c"
 
 #else
index 18d48f73069d005c8413935cf5630e0f5c83802b..f5a94416cfb4988e8e3e8588e9ad099e2fe9be9a 100644 (file)
@@ -39,7 +39,7 @@
 # define STRUCT_STAT struct __old_kernel_stat
 # define STRUCT_STAT_STR "struct __old_kernel_stat"
 # define STRUCT_STAT_IS_STAT64 0
-# define SAMPLE_SIZE ((kernel_ulong_t) 23147718418U)
+# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 23147718418U)
 # include "fstatx.c"
 
 #else
index 9d3cb59f21e1558038d712c8f89a74a6e505a1f5..66132370196ebb803925d1f94fe5e8f93ea779d7 100644 (file)
@@ -39,7 +39,7 @@
 # define STRUCT_STAT struct __old_kernel_stat
 # define STRUCT_STAT_STR "struct __old_kernel_stat"
 # define STRUCT_STAT_IS_STAT64 0
-# define SAMPLE_SIZE ((kernel_ulong_t) 23147718418U)
+# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 23147718418U)
 # include "lstatx.c"
 
 #else
index 37da4809701f68c9c1881aca81d6474d853b4f2f..d06e2bc64562b68c81ae4bba08726450f9e6b515 100644 (file)
@@ -39,7 +39,7 @@
 # define STRUCT_STAT struct __old_kernel_stat
 # define STRUCT_STAT_STR "struct __old_kernel_stat"
 # define STRUCT_STAT_IS_STAT64 0
-# define SAMPLE_SIZE ((kernel_ulong_t) 131478418U)
+# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 131478418U)
 # include "lstatx.c"
 
 #else
index 332a66fadac737c802304a54ef11ed83495dbbd8..d4ca7b0b97653bb4f2105ccc20a8438d8dc46179 100644 (file)
@@ -32,7 +32,7 @@
 
 # define TEST_SYSCALL_NR __NR_stat
 # define TEST_SYSCALL_STR "stat"
-# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418ULL)
+# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL)
 # include "lstatx.c"
 
 #else
index 23f11e5ca1e4b33c3e03fdf33ca53a787e2b8cf7..53381066dc4d65e971ed495809959f6b1cfba2af 100644 (file)
@@ -74,7 +74,7 @@ print_time(const time_t t)
 #  define STRUCT_STAT_IS_STAT64 0
 # endif
 # ifndef SAMPLE_SIZE
-#  define SAMPLE_SIZE 43147718418ULL
+#  define SAMPLE_SIZE ((libc_off_t) 43147718418ULL)
 # endif
 
 typedef off_t libc_off_t;