diff --git a/test/Makefile.am b/test/Makefile.am index 07afe2d5..ced0adcb 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -312,6 +312,7 @@ dist_noinst_DATA = \ logfile_syslog.0 \ logfile_syslog.1 \ logfile_syslog.2 \ + logfile_syslog.3 \ logfile_syslog_fr.0 \ logfile_syslog_with_access_log.0 \ logfile_syslog_with_header.0 \ diff --git a/test/expected/expected.am b/test/expected/expected.am index d2005569..a8e8204a 100644 --- a/test/expected/expected.am +++ b/test/expected/expected.am @@ -736,6 +736,8 @@ EXPECTED_FILES = \ $(srcdir)/%reldir%/test_sql_json_func.sh_f34f5dfa938a1ac7721f924beb16bbceec127a1b.out \ $(srcdir)/%reldir%/test_sql_search_table.sh_1a0d872ebc492fcecb2e79a0993170d5fc771a5b.err \ $(srcdir)/%reldir%/test_sql_search_table.sh_1a0d872ebc492fcecb2e79a0993170d5fc771a5b.out \ + $(srcdir)/%reldir%/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.err \ + $(srcdir)/%reldir%/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.out \ $(srcdir)/%reldir%/test_sql_search_table.sh_5aaae556ecb1661602f176215e28f661d3404032.err \ $(srcdir)/%reldir%/test_sql_search_table.sh_5aaae556ecb1661602f176215e28f661d3404032.out \ $(srcdir)/%reldir%/test_sql_search_table.sh_df0fd242f57a96d40f466493938cda0789a094fa.err \ diff --git a/test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.err b/test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.err new file mode 100644 index 00000000..e69de29b diff --git a/test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.out b/test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.out new file mode 100644 index 00000000..c92cf49d --- /dev/null +++ b/test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.out @@ -0,0 +1,12 @@ +log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters match_index  name  + 2   2022-08-16 00:32:15.000  199000 info   0        0 com.apple.cdscheduler  + 5 2022-08-16 00:32:15.000 0 info 0 0 com.apple.install + 8  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  0 com.apple.authd  + 8 2022-08-16 00:32:15.000 0 info 0 1 com.apple.asl + 8  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  2 com.apple.asl  + 8 2022-08-16 00:32:15.000 0 info 0 3 com.apple.authd + 11  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  0 com.apple.authd  + 11 2022-08-16 00:32:15.000 0 info 0 1 com.apple.asl + 11  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  2 com.apple.asl  + 11 2022-08-16 00:32:15.000 0 info 0 3 com.apple.authd + 14  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  0 com.apple.authd  diff --git a/test/logfile_syslog.3 b/test/logfile_syslog.3 new file mode 100644 index 00000000..05d1a0bf --- /dev/null +++ b/test/logfile_syslog.3 @@ -0,0 +1,17 @@ +Aug 16 00:10:45 Tims-Air syslogd[314]: ASL Sender Statistics +Aug 16 00:28:56 Tims-Air syslogd[314]: ASL Sender Statistics +Aug 16 00:32:15 Tims-Air syslogd[314]: Configuration Notice: + ASL Module "com.apple.cdscheduler" claims selected messages. + Those messages may not appear in standard system log files or in the ASL database. +Aug 16 00:32:15 Tims-Air syslogd[314]: Configuration Notice: + ASL Module "com.apple.install" claims selected messages. + Those messages may not appear in standard system log files or in the ASL database. +Aug 16 00:32:15 Tims-Air syslogd[314]: Configuration Notice: + ASL Module "com.apple.authd" sharing output destination "/var/log/asl" with ASL Module "com.apple.asl". + Output parameters from ASL Module "com.apple.asl" override any specified in ASL Module "com.apple.authd". +Aug 16 00:32:15 Tims-Air syslogd[314]: Configuration Notice: + ASL Module "com.apple.authd" sharing output destination "/var/log/system.log" with ASL Module "com.apple.asl". + Output parameters from ASL Module "com.apple.asl" override any specified in ASL Module "com.apple.authd". +Aug 16 00:32:15 Tims-Air syslogd[314]: Configuration Notice: + ASL Module "com.apple.authd" claims selected messages. + Those messages may not appear in standard system log files or in the ASL database. diff --git a/test/test_sql_search_table.sh b/test/test_sql_search_table.sh index 0673005f..4976286d 100644 --- a/test/test_sql_search_table.sh +++ b/test/test_sql_search_table.sh @@ -19,3 +19,8 @@ run_cap_test ${lnav_test} -n \ -c ";select * from procstate_procs where cmd_name = '[kthreadd]'" \ -c ";select * from procstate_procs where cmd_name = '[kthreadd]'" \ ${test_dir}/logfile_procstate.0 + +run_cap_test ${lnav_test} -n \ + -c ':create-search-table asl_mod ASL Module "(?[^"]+)"' \ + -c ';SELECT * FROM asl_mod' \ + ${test_dir}/logfile_syslog.3