移除无效用例

This commit is contained in:
wuyuechuan
2024-02-27 15:55:58 +08:00
parent d8857d3816
commit 0f421b2b5b
15 changed files with 3 additions and 273 deletions

View File

@ -1,13 +0,0 @@
-- 设置guc参数
\! /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc reload -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c "audit_rotation_interval=1"
The gs_guc run with the following arguments: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c audit_rotation_interval=1 reload ].
expected instance path: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
gs_guc reload: audit_rotation_interval=1: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
server signaled
Total instances: 1. Failed instances: 0.
Success to perform gs_guc!
-- 间隔60s 获取pg_audit 中最新adt文件编号 查看是否增加了1
\! num1=`expr $(echo $(ls /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/pg_audit -lt | head -n 2 | awk '{print $9}')| tr -cd "[0-9]") + 1` && sleep 1m && num2=$(echo $(ls /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/pg_audit -lt | head -n 2 | awk '{print $9}')| tr -cd "[0-9]") && [[ $num1 == $num2 ]] && echo 'add a new log after interval-- 60 seconds' || echo 'fail to add new logs'
add a new log after interval-- 60 seconds

View File

@ -1,42 +0,0 @@
-- 设置guc参数
\! /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc reload -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c "audit_rotation_size=2048"
The gs_guc run with the following arguments: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c audit_rotation_size=2048 reload ].
expected instance path: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
gs_guc reload: audit_rotation_size=2048: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
server signaled
Total instances: 1. Failed instances: 0.
Success to perform gs_guc!
\! /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc reload -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c "audit_dml_state=1"
The gs_guc run with the following arguments: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c audit_dml_state=1 reload ].
expected instance path: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
gs_guc reload: audit_dml_state=1: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
server signaled
Total instances: 1. Failed instances: 0.
Success to perform gs_guc!
-- 产生dml_action 审计日志
CREATE TABLE T_TEST_ROTATION_SIZE
(
COL1 int4 DEFAULT 1,
COL2 VARCHAR(1024) DEFAULT 'test_rotation_size');
CREATE OR REPLACE PROCEDURE TRANSACTION_TEST_ROTATION_SIZE()
AS
BEGIN
FOR i IN 0..1000000 LOOP
INSERT INTO T_TEST_ROTATION_SIZE(COL1, COL2) VALUES (i, 'test_time');
COMMIT;
END LOOP;
END;
/
CALL TRANSACTION_TEST_ROTATION_SIZE();
transaction_test_rotation_size
--------------------------------
(1 row)
-- 提取新生成的文件大小 与2.1M比较 全部小于2.1M 为执行成功
\! flag=0 && for i in $(find /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/pg_audit -newermt $(date -d "-75 seconds" +%H:%M:%S) -name "*_adt"); do size=$(du -h --exclude=index_table_new $i | grep -oP '\d*\.\d+M'); if [[ $size > '2.1M' ]]; then flag=1; echo $size; echo $i; fi; done && [[ "$flag" == 0 ]] && echo 'all the logs are less than 2.1M' || echo 'error -- some logs exceed limit'
all the logs are less than 2.1M

View File

@ -1,57 +0,0 @@
-- 修改guc参数
\! /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc reload -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c "audit_resource_policy = 1"
The gs_guc run with the following arguments: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c audit_resource_policy = 1 reload ].
expected instance path: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
gs_guc reload: audit_resource_policy=1: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
server signaled
Total instances: 1. Failed instances: 0.
Success to perform gs_guc!
\! /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc reload -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c "audit_space_limit = 512MB"
The gs_guc run with the following arguments: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c audit_space_limit = 512MB reload ].
expected instance path: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
gs_guc reload: audit_space_limit=512MB: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
server signaled
Total instances: 1. Failed instances: 0.
Success to perform gs_guc!
\! /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc reload -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c "audit_dml_state =1"
The gs_guc run with the following arguments: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/install//data6/zhoutl/GaussDB_test/install/bin/gs_guc -Z datanode -D /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/ -c audit_dml_state =1 reload ].
expected instance path: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
gs_guc reload: audit_dml_state=1: [/data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/postgresql.conf]
server signaled
Total instances: 1. Failed instances: 0.
Success to perform gs_guc!
-- 获取pg_audit 中最早建立的adt文件编号
\! echo $(echo $(ls /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/pg_audit -tr | head -2 | xargs) | tr -cd "[0-9]")
-- 生成 dml_action 审计日志
CREATE TABLE T_TEST_SPACE
(
COL1 int4 DEFAULT 1,
COL2 VARCHAR(1024) DEFAULT 'test_space');
CREATE OR REPLACE PROCEDURE TRANSACTION_TEST_SPACE()
AS
BEGIN
FOR i IN 0..3500000 LOOP
INSERT INTO T_TEST_SPACE(COL1, COL2) VALUES (i, 'a');
COMMIT;
END LOOP;
END;
/
CALL TRANSACTION_TEST_SPACE();
transaction_test_space
------------------------
(1 row)
-- 获取 pg_audit 中最早建立的adt文件编号 与原编号 0_adt 比较 观察是否删除了最早的日志文件
\! [[ $(echo $(ls /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/pg_audit -tr | head -2 | xargs) | tr -cd "[0-9]") > 1 ]] && echo 'delete oldest files' || echo 'fail to delete oldest files'
delete oldest files
-- 查看pg_audit 文件总大小 是否超过设置的512M
\! [[ $(du -h --exclude=done /data6/zhoutl/GaussDB_test/GaussDBKernel-server/opengauss/src/test/regress/tmp_check/datanode1/pg_audit | grep -oP '\d*M') > '530M' ]] && echo 'size of total logs exceeds upper limit' || echo 'size of total logs not exceeds upper limit'
size of total logs not exceeds upper limit

File diff suppressed because one or more lines are too long

View File

@ -1,41 +0,0 @@
create database gb18030 encoding='gb18030' LC_COLLATE='zh_CN.GB18030' LC_CTYPE ='zh_CN.GB18030' TEMPLATE=template0;
\c gb18030
show server_encoding;
server_encoding
-----------------
GB18030
(1 row)
create table tb_test(id int, content text);
insert into tb_test values(1, 'abcdefghigkABCDEFGHIJK');
insert into tb_test values(2, '�1�2');
insert into tb_test values(3, '�����');
insert into tb_test values(4, '�0�1�9�8�0�8');
insert into tb_test values(5, '�9�4 �9�5 �9�2 �9�4 �9�7 �9�8 �9�9 �9�0');
insert into tb_test values(5, '�2�5');
select * from tb_test order by id;
id | content
----+-------------------------
1 | abcdefghigkABCDEFGHIJK
2 | �1�2
3 | �����
4 | �0�1�9�8�0�8
5 | �9�4 �9�5 �9�2 �9�4 �9�7 �9�8 �9�9 �9�0
5 | �2�5
(6 rows)
select convert_to(content, 'utf8') from tb_test order by id;
convert_to
----------------------------------------------------------------------------------
\x616263646566676869676b4142434445464748494a4b
\xdc90
\xe4b8ade69687e6b189e5ad97
\xf09f98adf09f9882f09f98a0
\xf0ab9d8620f0ab9daf20f0ab9da220f0ab9e8c20f0ab9e8f20f0ab9da820f0ab9da920f0ab9daa
\xe0bc81
(6 rows)
drop table tb_test;
\c regression
clean connection to all force for database gb18030;
drop database gb18030;

View File

@ -657,10 +657,10 @@ test: vec_delete_part1 vec_delete_part2
# test for vec sonic hash
test: vec_sonic_hashjoin_number_prepare vec_sonic_hashjoin_date_prepare vec_sonic_hashjoin_string_prepare
test: vec_sonic_hashjoin_number_nospill vec_sonic_hashjoin_date_nospill vec_sonic_hashjoin_string_nospill vec_sonic_hashjoin_othertype vec_sonic_hashjoin_explain
test: vec_sonic_hashjoin_number_nospill vec_sonic_hashjoin_date_nospill_sql vec_sonic_hashjoin_string_nospill_sql vec_sonic_hashjoin_othertype vec_sonic_hashjoin_explain
test: vec_sonic_hashjoin_number_spill
test: vec_sonic_hashjoin_date_spill
test: vec_sonic_hashjoin_string_spill
test: vec_sonic_hashjoin_date_spill_sql
test: vec_sonic_hashjoin_string_spill_sql
test: vec_sonic_agg_spill
test: vec_sonic_hashjoin_end