summaryrefslogtreecommitdiffstats
path: root/test/test_sql_search_table.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:01:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:01:36 +0000
commit62e4c68907d8d33709c2c1f92a161dff00b3d5f2 (patch)
treeadbbaf3acf88ea08f6eeec4b75ee98ad3b07fbdc /test/test_sql_search_table.sh
parentInitial commit. (diff)
downloadlnav-upstream/0.11.2.tar.xz
lnav-upstream/0.11.2.zip
Adding upstream version 0.11.2.upstream/0.11.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/test_sql_search_table.sh')
-rw-r--r--test/test_sql_search_table.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/test_sql_search_table.sh b/test/test_sql_search_table.sh
new file mode 100644
index 0000000..bf5e71b
--- /dev/null
+++ b/test/test_sql_search_table.sh
@@ -0,0 +1,28 @@
+#! /bin/bash
+
+export YES_COLOR=1
+
+run_cap_test ${lnav_test} -n \
+ -c ';SELECT * FROM procstate_procs' \
+ ${test_dir}/logfile_procstate.0
+
+run_cap_test ${lnav_test} -n \
+ -c ';SELECT *,log_body FROM vpx_lro_begin' \
+ ${test_dir}/logfile_vpxd.0
+
+run_cap_test ${lnav_test} -n \
+ -c ";select * from vpx_lro_begin where log_line > 3 and lro_id = 'lro-846064'" \
+ -c ";select * from vpx_lro_begin where lro_id = 'lro-846064'" \
+ ${test_dir}/logfile_vpxd.0
+
+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
+
+touch -t 202211030923 ${test_dir}/logfile_syslog.3
+
+run_cap_test ${lnav_test} -n \
+ -c ':create-search-table asl_mod ASL Module "(?<name>[^"]+)"' \
+ -c ';SELECT * FROM asl_mod' \
+ ${test_dir}/logfile_syslog.3