From 6181f75e3f1b73708eaef7e22364ed0e9a1c482e Mon Sep 17 00:00:00 2001 From: Fred-Barclay Date: Sun, 17 Feb 2019 17:04:02 -0600 Subject: Housekeeping Make sure all files end with a newline Strip extra newlines and trailing whitespace from files --- test/apps/apps.sh | 1 - test/filters/memwrexe.c | 13 ++++++------- test/fnetfilter/test1.net | 1 - test/fnetfilter/test2.net | 3 +-- test/hidepid-howto | 2 -- test/network/tcpserver.c | 6 +++--- test/profiles/profiles.sh | 1 - test/profiles/test3.profile | 2 +- test/root/option_tmpfs.exp | 1 - test/utils/caps2.profile | 2 +- 10 files changed, 12 insertions(+), 20 deletions(-) (limited to 'test') diff --git a/test/apps/apps.sh b/test/apps/apps.sh index 01546d104..c239ed8b8 100755 --- a/test/apps/apps.sh +++ b/test/apps/apps.sh @@ -19,4 +19,3 @@ for app in $LIST; do echo "TESTING SKIP: $app not found" fi done - diff --git a/test/filters/memwrexe.c b/test/filters/memwrexe.c index 7e14aa23d..b43b232d1 100644 --- a/test/filters/memwrexe.c +++ b/test/filters/memwrexe.c @@ -20,7 +20,7 @@ int main(int argc, char **argv) { usage(); return 1; } - + if (strcmp(argv[1], "mmap") == 0) { // open some file int fd = open("memwrexe.c", O_RDONLY); @@ -28,13 +28,13 @@ int main(int argc, char **argv) { fprintf(stderr, "TESTING ERROR: file not found, cannot run mmap test\n"); return 1; } - + int size = lseek(fd, 0, SEEK_END); if (size == -1) { fprintf(stderr, "TESTING ERROR: file not found, cannot run mmap test\n"); return 1; } - + void *p = mmap (0, size, PROT_WRITE|PROT_READ|PROT_EXEC, MAP_SHARED, fd, 0); printf("mmap successful\n"); @@ -51,19 +51,19 @@ int main(int argc, char **argv) { fprintf(stderr, "TESTING ERROR: file not found, cannot run mmap test\n"); return 1; } - + int size = lseek(fd, 0, SEEK_END); if (size == -1) { fprintf(stderr, "TESTING ERROR: file not found, cannot run mmap test\n"); return 1; } - + void *p = mmap (0, size, PROT_READ, MAP_SHARED, fd, 0); if (!p) { fprintf(stderr, "TESTING ERROR: cannot map file for mprotect test\n"); return 1; } - + mprotect(p, size, PROT_READ|PROT_WRITE|PROT_EXEC); printf("mprotect successful\n"); @@ -73,4 +73,3 @@ int main(int argc, char **argv) { return 0; } } - \ No newline at end of file diff --git a/test/fnetfilter/test1.net b/test/fnetfilter/test1.net index e60127373..ce21f20c2 100644 --- a/test/fnetfilter/test1.net +++ b/test/fnetfilter/test1.net @@ -16,4 +16,3 @@ -A OUTPUT -p tcp --dport 3478 -j DROP -A OUTPUT -p tcp --dport 3479 -j DROP COMMIT - diff --git a/test/fnetfilter/test2.net b/test/fnetfilter/test2.net index a02785413..f389cd16d 100644 --- a/test/fnetfilter/test2.net +++ b/test/fnetfilter/test2.net @@ -9,11 +9,10 @@ #-A INPUT -p icmp --$ARG1 echo-reply -j ACCEPT -A INPUT -p icmp --$ARG1 $ARG2 -j ACCEPT -A INPUT -p icmp --$ARG1 $ARG3 -j ACCEPT --A INPUT -p icmp --$ARG1 $ARG4 -j ACCEPT +-A INPUT -p icmp --$ARG1 $ARG4 -j ACCEPT # disable STUN -A OUTPUT -p udp --dport $ARG5 -j DROP -A OUTPUT -p udp --dport $ARG6 -j DROP -A OUTPUT -p tcp --dport $ARG5 -j DROP -A OUTPUT -p tcp --dport $ARG6 -j DROP COMMIT - diff --git a/test/hidepid-howto b/test/hidepid-howto index f207c9109..0fa1e5d86 100644 --- a/test/hidepid-howto +++ b/test/hidepid-howto @@ -23,5 +23,3 @@ $ cat /proc/mounts | grep proc proc /proc proc rw,nosuid,nodev,noexec,relatime,gid=618,hidepid=2 0 0 3. Test "firejail --list", "firejail --top", "firejail --tree", "firejail --netstats" - - diff --git a/test/network/tcpserver.c b/test/network/tcpserver.c index e8f89b097..9de965858 100644 --- a/test/network/tcpserver.c +++ b/test/network/tcpserver.c @@ -35,7 +35,7 @@ int main(int argc, char **argv) { return 1; } int portno = atoi(argv[1]); - + // init socket fd = socket(AF_INET, SOCK_STREAM, 0); if (fd < 0) { @@ -82,7 +82,7 @@ int main(int argc, char **argv) { if (pid == 0) { // child close(fd); -#define MAXBUF 4096 +#define MAXBUF 4096 char buf[MAXBUF]; memset(buf, 0, MAXBUF); @@ -103,6 +103,6 @@ int main(int argc, char **argv) { else close(newfd); } - + return 0; } diff --git a/test/profiles/profiles.sh b/test/profiles/profiles.sh index 46662cef5..85e5c1c13 100755 --- a/test/profiles/profiles.sh +++ b/test/profiles/profiles.sh @@ -43,4 +43,3 @@ do echo "TESTING: $PROFILE" ./test-profile.exp $PROFILE done - diff --git a/test/profiles/test3.profile b/test/profiles/test3.profile index c28ddadb5..5a70bd829 100644 --- a/test/profiles/test3.profile +++ b/test/profiles/test3.profile @@ -1 +1 @@ -include test3.profile \ No newline at end of file +include test3.profile diff --git a/test/root/option_tmpfs.exp b/test/root/option_tmpfs.exp index 3d492dfdb..cac692cb2 100755 --- a/test/root/option_tmpfs.exp +++ b/test/root/option_tmpfs.exp @@ -37,4 +37,3 @@ after 100 puts "\nall done\n" - diff --git a/test/utils/caps2.profile b/test/utils/caps2.profile index cb2258c52..e760d4cb5 100644 --- a/test/utils/caps2.profile +++ b/test/utils/caps2.profile @@ -1 +1 @@ -caps.keep chown,kill \ No newline at end of file +caps.keep chown,kill -- cgit v1.2.3-70-g09d2