mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Make sepgsql regression tests robust vs. collation differences
In commit 25542d77
, regression test coverage was added to sepgsql
for partitioned tables. Unfortunately it was not robust in the face
of collation differences, per the buildfarm. Force "C" collation
in order to fix that.
Discussion: https://postgr.es/m/flat/623bcaae-112e-ced0-8c22-a84f75ae0c53%40joeconway.com
This commit is contained in:
@ -55,18 +55,18 @@ SELECT objtype, objname, label FROM pg_seclabels
|
||||
't1p', 't1p.o', 't1p.p', 't1p.q',
|
||||
't1p_ones', 't1p_ones.o', 't1p_ones.p', 't1p_ones.q',
|
||||
't1p_tens', 't1p_tens.o', 't1p_tens.p', 't1p_tens.q')
|
||||
ORDER BY objname;
|
||||
ORDER BY objname COLLATE "C";
|
||||
objtype | objname | label
|
||||
---------+------------+---------------------------------------------
|
||||
table | t1 | system_u:object_r:sepgsql_table_t:s0
|
||||
table | t1p | system_u:object_r:sepgsql_table_t:s0
|
||||
column | t1p.o | system_u:object_r:sepgsql_table_t:s0
|
||||
column | t1p.p | system_u:object_r:sepgsql_ro_table_t:s0
|
||||
column | t1p.q | system_u:object_r:sepgsql_secret_table_t:s0
|
||||
table | t1p_ones | unconfined_u:object_r:sepgsql_table_t:s0
|
||||
column | t1p_ones.o | system_u:object_r:sepgsql_table_t:s0
|
||||
column | t1p_ones.p | system_u:object_r:sepgsql_ro_table_t:s0
|
||||
column | t1p_ones.q | system_u:object_r:sepgsql_secret_table_t:s0
|
||||
column | t1p.p | system_u:object_r:sepgsql_ro_table_t:s0
|
||||
column | t1p.q | system_u:object_r:sepgsql_secret_table_t:s0
|
||||
table | t1p_tens | unconfined_u:object_r:sepgsql_table_t:s0
|
||||
column | t1p_tens.o | system_u:object_r:sepgsql_table_t:s0
|
||||
column | t1p_tens.p | system_u:object_r:sepgsql_ro_table_t:s0
|
||||
|
@ -107,7 +107,7 @@ SELECT objtype, objname, label FROM pg_seclabels
|
||||
'tpart',
|
||||
'tpart_ones',
|
||||
'tpart_tens')
|
||||
ORDER BY objname ASC;
|
||||
ORDER BY objname COLLATE "C" ASC;
|
||||
objtype | objname | label
|
||||
---------+------------+-----------------------------------------------
|
||||
table | t1 | unconfined_u:object_r:sepgsql_table_t:s0
|
||||
@ -124,7 +124,7 @@ SELECT objtype, objname, label FROM pg_seclabels
|
||||
OR objname like 'tpart.%'
|
||||
OR objname like 'tpart_ones.%'
|
||||
OR objname like 'tpart_tens.%')
|
||||
ORDER BY objname ASC;
|
||||
ORDER BY objname COLLATE "C" ASC;
|
||||
objtype | objname | label
|
||||
---------+---------------------+-----------------------------------------------
|
||||
column | t3.cmax | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
@ -147,6 +147,10 @@ SELECT objtype, objname, label FROM pg_seclabels
|
||||
column | tpart.cmin | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart.ctid | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart.o | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart.p | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart.tableoid | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart.xmax | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart.xmin | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart_ones.cmax | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart_ones.cmin | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart_ones.ctid | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
@ -155,8 +159,6 @@ SELECT objtype, objname, label FROM pg_seclabels
|
||||
column | tpart_ones.tableoid | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart_ones.xmax | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart_ones.xmin | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart.p | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart.tableoid | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart_tens.cmax | unconfined_u:object_r:sepgsql_sysobj_t:s0
|
||||
column | tpart_tens.cmin | unconfined_u:object_r:sepgsql_sysobj_t:s0
|
||||
column | tpart_tens.ctid | unconfined_u:object_r:sepgsql_sysobj_t:s0
|
||||
@ -165,8 +167,6 @@ SELECT objtype, objname, label FROM pg_seclabels
|
||||
column | tpart_tens.tableoid | unconfined_u:object_r:sepgsql_sysobj_t:s0
|
||||
column | tpart_tens.xmax | unconfined_u:object_r:sepgsql_sysobj_t:s0
|
||||
column | tpart_tens.xmin | unconfined_u:object_r:sepgsql_sysobj_t:s0
|
||||
column | tpart.xmax | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
column | tpart.xmin | unconfined_u:object_r:user_sepgsql_table_t:s0
|
||||
(40 rows)
|
||||
|
||||
--
|
||||
|
@ -65,7 +65,7 @@ SELECT objtype, objname, label FROM pg_seclabels
|
||||
't1p', 't1p.o', 't1p.p', 't1p.q',
|
||||
't1p_ones', 't1p_ones.o', 't1p_ones.p', 't1p_ones.q',
|
||||
't1p_tens', 't1p_tens.o', 't1p_tens.p', 't1p_tens.q')
|
||||
ORDER BY objname;
|
||||
ORDER BY objname COLLATE "C";
|
||||
|
||||
CREATE SCHEMA my_schema_1;
|
||||
CREATE TABLE my_schema_1.ts1 (a int, b text);
|
||||
|
@ -107,14 +107,14 @@ SELECT objtype, objname, label FROM pg_seclabels
|
||||
'tpart',
|
||||
'tpart_ones',
|
||||
'tpart_tens')
|
||||
ORDER BY objname ASC;
|
||||
ORDER BY objname COLLATE "C" ASC;
|
||||
SELECT objtype, objname, label FROM pg_seclabels
|
||||
WHERE provider = 'selinux' AND objtype = 'column' AND (objname like 't3.%'
|
||||
OR objname like 't4.%'
|
||||
OR objname like 'tpart.%'
|
||||
OR objname like 'tpart_ones.%'
|
||||
OR objname like 'tpart_tens.%')
|
||||
ORDER BY objname ASC;
|
||||
ORDER BY objname COLLATE "C" ASC;
|
||||
|
||||
--
|
||||
-- Tests for SECURITY LABEL
|
||||
|
Reference in New Issue
Block a user