All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix perltidy on Travis CI
@ 2019-09-24 22:17 Paul Moore
  2019-09-24 22:17 ` [PATCH 1/2] audit-testsuite: use our own version of perltidy in the Travis CI tests Paul Moore
  2019-09-24 22:18 ` [PATCH 2/2] audit-testsuite: fix the style according to ./tools/check-syntax Paul Moore
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Moore @ 2019-09-24 22:17 UTC (permalink / raw)
  To: linux-audit

The version of perltidy currently available in Travis CI via
Ubuntu 16.04 LTS doesn't produce the same output as the perltidy
shipped in more modern distros.  This patchset addresses this by
installing perltidy from the upstream sources.

---

Paul Moore (2):
      audit-testsuite: use our own version of perltidy in the Travis CI tests
      audit-testsuite: fix the style according to ./tools/check-syntax


 .travis.yml                                  |   10 +++++++++-
 tests/exec_execve/test                       |    2 +-
 tests/exec_name/test                         |    2 +-
 tests/file_create/test                       |    2 +-
 tests/file_delete/test                       |    2 +-
 tests/file_rename/test                       |    2 +-
 tests/filter_exclude/test                    |    2 +-
 tests/filter_sessionid/test                  |    2 +-
 tests/login_tty/test                         |    2 +-
 tests/lost_reset/test                        |    2 +-
 tests/netfilter_pkt/test                     |    2 +-
 tests/syscall_module/test                    |    2 +-
 tests/syscall_socketcall/test                |    2 +-
 tests/syscalls_file/test                     |    2 +-
 tests/user_msg/test                          |    2 +-
 tests_manual/stress_tree/test                |    2 +-
 tests_manual/syscall_module_path_filter/test |    1 +
 17 files changed, 25 insertions(+), 16 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] audit-testsuite: use our own version of perltidy in the Travis CI tests
  2019-09-24 22:17 [PATCH 0/2] Fix perltidy on Travis CI Paul Moore
@ 2019-09-24 22:17 ` Paul Moore
  2019-09-24 22:18 ` [PATCH 2/2] audit-testsuite: fix the style according to ./tools/check-syntax Paul Moore
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Moore @ 2019-09-24 22:17 UTC (permalink / raw)
  To: linux-audit

From: Paul Moore <paul@paul-moore.com>

Unfortunately the perltidy results differ between moden distros and the
current Travis CI environment.  This patch attempts to address this by
using the current upstream perltidy in the Travis CI tests.

Signed-off-by: Paul Moore <paul@paul-moore.com>
---
 .travis.yml |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 406f4b8..d6eeace 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,10 +6,18 @@ addons:
   apt:
     packages:
       - astyle
-      - perltidy
       - python-pip
       - gcc-multilib
 
+before_install:
+  # FYI: known good with HEAD at 8551fc60fc515cd290ba38ee8c758c1f4df52b56
+  - git clone https://github.com/perltidy/perltidy.git perltidy
+  - |
+    (cd perltidy &&
+     perl Makefile.PL &&
+     make &&
+     sudo make install)
+
 install:
   - sudo pip install yapf
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] audit-testsuite: fix the style according to ./tools/check-syntax
  2019-09-24 22:17 [PATCH 0/2] Fix perltidy on Travis CI Paul Moore
  2019-09-24 22:17 ` [PATCH 1/2] audit-testsuite: use our own version of perltidy in the Travis CI tests Paul Moore
@ 2019-09-24 22:18 ` Paul Moore
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Moore @ 2019-09-24 22:18 UTC (permalink / raw)
  To: linux-audit

From: Paul Moore <paul@paul-moore.com>

Signed-off-by: Paul Moore <paul@paul-moore.com>
---
 tests/exec_execve/test                       |    2 +-
 tests/exec_name/test                         |    2 +-
 tests/file_create/test                       |    2 +-
 tests/file_delete/test                       |    2 +-
 tests/file_rename/test                       |    2 +-
 tests/filter_exclude/test                    |    2 +-
 tests/filter_sessionid/test                  |    2 +-
 tests/login_tty/test                         |    2 +-
 tests/lost_reset/test                        |    2 +-
 tests/netfilter_pkt/test                     |    2 +-
 tests/syscall_module/test                    |    2 +-
 tests/syscall_socketcall/test                |    2 +-
 tests/syscalls_file/test                     |    2 +-
 tests/user_msg/test                          |    2 +-
 tests_manual/stress_tree/test                |    2 +-
 tests_manual/syscall_module_path_filter/test |    1 +
 16 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/tests/exec_execve/test b/tests/exec_execve/test
index 64260e7..7c119b8 100755
--- a/tests/exec_execve/test
+++ b/tests/exec_execve/test
@@ -15,7 +15,7 @@ $basedir =~ s|(.*)/[^/]*|$1|;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/exec_name/test b/tests/exec_name/test
index f6d8ae4..95b0cc7 100755
--- a/tests/exec_name/test
+++ b/tests/exec_name/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/file_create/test b/tests/file_create/test
index df3c293..8a75780 100755
--- a/tests/file_create/test
+++ b/tests/file_create/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempdir tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/file_delete/test b/tests/file_delete/test
index e12b248..3bde29c 100755
--- a/tests/file_delete/test
+++ b/tests/file_delete/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempdir tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/file_rename/test b/tests/file_rename/test
index 3b27abe..651aa3a 100755
--- a/tests/file_rename/test
+++ b/tests/file_rename/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempdir tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/filter_exclude/test b/tests/filter_exclude/test
index fd4b058..c734269 100755
--- a/tests/filter_exclude/test
+++ b/tests/filter_exclude/test
@@ -13,7 +13,7 @@ use Time::HiRes qw(usleep);
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/filter_sessionid/test b/tests/filter_sessionid/test
index 891293b..3c8fa6e 100755
--- a/tests/filter_sessionid/test
+++ b/tests/filter_sessionid/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempdir tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/login_tty/test b/tests/login_tty/test
index 442ee42..4b9cfae 100755
--- a/tests/login_tty/test
+++ b/tests/login_tty/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempdir tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/lost_reset/test b/tests/lost_reset/test
index 08a82c1..ce242e2 100755
--- a/tests/lost_reset/test
+++ b/tests/lost_reset/test
@@ -10,7 +10,7 @@ BEGIN { plan tests => 5 }
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/netfilter_pkt/test b/tests/netfilter_pkt/test
index 8dfe7f4..3efa8da 100755
--- a/tests/netfilter_pkt/test
+++ b/tests/netfilter_pkt/test
@@ -13,7 +13,7 @@ use File::Temp qw/ tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/syscall_module/test b/tests/syscall_module/test
index fe8e482..2ce4f17 100755
--- a/tests/syscall_module/test
+++ b/tests/syscall_module/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/syscall_socketcall/test b/tests/syscall_socketcall/test
index 124d160..d30c7a1 100755
--- a/tests/syscall_socketcall/test
+++ b/tests/syscall_socketcall/test
@@ -15,7 +15,7 @@ $basedir =~ s|(.*)/[^/]*|$1|;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/syscalls_file/test b/tests/syscalls_file/test
index 917449a..8aeadb7 100755
--- a/tests/syscalls_file/test
+++ b/tests/syscalls_file/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempdir tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests/user_msg/test b/tests/user_msg/test
index 3a7cc9f..b0ef84d 100755
--- a/tests/user_msg/test
+++ b/tests/user_msg/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempdir tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests_manual/stress_tree/test b/tests_manual/stress_tree/test
index 1b7c647..1b39d2d 100755
--- a/tests_manual/stress_tree/test
+++ b/tests_manual/stress_tree/test
@@ -12,7 +12,7 @@ use File::Temp qw/ tempdir tempfile /;
 
 sub key_gen {
     my @chars = ( "A" .. "Z", "a" .. "z" );
-    my $key = "testsuite-" . time . "-";
+    my $key   = "testsuite-" . time . "-";
     $key .= $chars[ rand @chars ] for 1 .. 8;
     return $key;
 }
diff --git a/tests_manual/syscall_module_path_filter/test b/tests_manual/syscall_module_path_filter/test
index c27c06b..46881fa 100755
--- a/tests_manual/syscall_module_path_filter/test
+++ b/tests_manual/syscall_module_path_filter/test
@@ -74,6 +74,7 @@ my $msgdate       = "";
 my $line2;
 seek( $fh_out, 0, 0 );
 seek( $fh_err, 0, 0 );
+
 while ( $line = <$fh_out> ) {
 
     # test if we generate any audit records from the filter rule

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-24 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24 22:17 [PATCH 0/2] Fix perltidy on Travis CI Paul Moore
2019-09-24 22:17 ` [PATCH 1/2] audit-testsuite: use our own version of perltidy in the Travis CI tests Paul Moore
2019-09-24 22:18 ` [PATCH 2/2] audit-testsuite: fix the style according to ./tools/check-syntax Paul Moore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.