]> granicus.if.org Git - strace/commitdiff
tests: do not include <assert.h> unnecessarily
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 18:20:47 +0000 (18:20 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 22:05:57 +0000 (22:05 +0000)
Automatically change tests/*.c files using the following script:

for f in tests/*.c; do
grep -q '\<assert(' "$f" ||
sed -i '/# *include *<assert\.h>/d' "$f"
done

21 files changed:
tests/acct.c
tests/copy_file_range.c
tests/epoll_create1.c
tests/ftruncate.c
tests/ftruncate64.c
tests/llseek.c
tests/lseek.c
tests/mlock2.c
tests/netlink_inet_diag.c
tests/prctl-seccomp-strict.c
tests/rt_tgsigqueueinfo.c
tests/seccomp-filter.c
tests/seccomp-strict.c
tests/splice.c
tests/sync_file_range.c
tests/sync_file_range2.c
tests/tee.c
tests/truncate.c
tests/truncate64.c
tests/userfaultfd.c
tests/xetpgid.c

index 4591fe0f5d1aee2bb8f11677c547fc3d43c640bb..ef11b0bca83e8f98c149e65440d544248c36caec 100644 (file)
@@ -3,7 +3,6 @@
 
 #ifdef __NR_acct
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index 91afc6711fdba53cbb75f504a7e0cf08837d4b9a..0e563d6f363730e35028f5049b91b09adaa58dde 100644 (file)
@@ -32,7 +32,6 @@
 
 #if defined __NR_copy_file_range
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index f646840c2377b99a2a82e079ad73cd2aeee19d2b..d3484924d86c5dbe8c12d5120f154ae252c5a4b0 100644 (file)
@@ -31,7 +31,6 @@
 
 #if defined __NR_epoll_create1 && defined O_CLOEXEC
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index 7f11771cba4d7f67fc01cfbdce0aef6a2a09500e..db8388bcce6b4cd75f7c81aad8b368e2fa65056c 100644 (file)
@@ -30,7 +30,6 @@
 
 #ifdef __NR_ftruncate
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index accc5417b83a21c1b85010d5b57fa06ca7a313ba..0b13eaff178199c058ef50a82710c7616671f9bc 100644 (file)
@@ -30,7 +30,6 @@
 
 #ifdef __NR_ftruncate64
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index 56a73ecce7ea1657f5cc48d4d1cf3d5d0e99cd70..e82535a04fc7a8008edec2caa36cb5c25bdcc3f0 100644 (file)
@@ -30,7 +30,6 @@
 
 #ifdef __NR__llseek
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index c49720210c840f4f9c9acce385f5732b7ca6dde1..e5efaa3b7d968cd494f499c5a3e21bc69c84c673 100644 (file)
@@ -30,7 +30,6 @@
 
 #ifdef __NR_lseek
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 # include "kernel_types.h"
index c1734a41b21d45a5010ea191669f8c46dcb44181..af6391711e43b452719742ea9c2806b4b78d0047 100644 (file)
@@ -30,7 +30,6 @@
 
 #ifdef __NR_mlock2
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index 614a8f15a5b9a45bbf7c107482091f7a2edaa50d..342be072ae45380a808ac8997409b2a4cb0f07c7 100644 (file)
@@ -28,7 +28,6 @@
  */
 
 #include "tests.h"
-#include <assert.h>
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
index ff8d89f203a779fb06d12c49e6da8db6ba039b35..6ff4bdec8b9c2bd19e7fdab4bdd3da14558a6aa4 100644 (file)
@@ -33,7 +33,6 @@
 
 #if defined HAVE_PRCTL && defined PR_SET_SECCOMP && defined __NR_exit
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index ff33f4080f1cab5f069bc1eefe82be8afcb9cd11..0926fb1f0de4deceaf2f27715df8adeb86a1bd67 100644 (file)
@@ -32,7 +32,6 @@
 
 #ifdef __NR_rt_tgsigqueueinfo
 
-# include <assert.h>
 # include <errno.h>
 # include <signal.h>
 # include <stdio.h>
index 664f4627d6f448c960e03076c60e5e9992bdeeed..0326f6e92b8eb4de004dc32b68751031d50942bb 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "tests.h"
 
-#include <assert.h>
 #include <stdio.h>
 #include <sys/syscall.h>
 #include <unistd.h>
index 2578e29e36b9d0b3168e75b8edf957ed18ff2b67..c145567ffb3f2a84e70bcb099050717cbc429e00 100644 (file)
@@ -32,7 +32,6 @@
 
 #if defined __NR_seccomp && defined __NR_exit
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index ee7c6ad82f5c9accef1ca1c453ccf0e64d5d92a4..433cf7fef4e284a7cc80a371f15b543eb4d09769 100644 (file)
@@ -32,7 +32,6 @@
 
 #if defined __NR_splice
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index dc640f403b4c52fa0cfd19dd4091178f23f05b1f..9426e3c5b6c08d57d2cf0a6a825e7b04c89ec914 100644 (file)
@@ -33,7 +33,6 @@
 
 #if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range
 
-# include <assert.h>
 # include <stdio.h>
 
 int
index cf0e97bcf66765f79a57a5ee8fb039a46329c353..d19cf25b1b8b708ea25e925c398599b301580dff 100644 (file)
@@ -33,7 +33,6 @@
 
 #if defined HAVE_SYNC_FILE_RANGE && defined  __NR_sync_file_range2
 
-# include <assert.h>
 # include <stdio.h>
 
 int
index b7a1f166a0bad65df162ced040629bbcf57974cb..f36f92aad9897cd4364ba756464148ec718a5d66 100644 (file)
@@ -32,7 +32,6 @@
 
 #if defined __NR_tee
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index 2599bf2fc5040cddb44976dbb02ca6e359423e19..c3ad2ba7649029673ac71071636154e59de3ec5d 100644 (file)
@@ -30,7 +30,6 @@
 
 #ifdef __NR_truncate
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 # include "kernel_types.h"
index 2e9487e62457660d53e54c7a17e4267ddcebd057..c973c45916369c2a2daa91010228d71204c99967 100644 (file)
@@ -30,7 +30,6 @@
 
 #ifdef __NR_truncate64
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index 6f219ceb2822b60f5cf542a8501023da364f45ee..5747a2a76f02a35c357f32b471e146f060964a01 100644 (file)
@@ -31,7 +31,6 @@
 
 #if defined __NR_userfaultfd && defined O_CLOEXEC
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>
 
index 59f8153d908a1643bff403e568226fc0a241743a..6ce79c1a6838c4afb291e0e283883acf738320ee 100644 (file)
@@ -32,7 +32,6 @@
 
 #if defined __NR_getpgid && defined __NR_setpgid
 
-# include <assert.h>
 # include <stdio.h>
 # include <unistd.h>