diff options
author | Joe Conway | 2017-04-09 22:59:02 +0000 |
---|---|---|
committer | Joe Conway | 2017-04-09 22:59:02 +0000 |
commit | 86fa9b2d1b74cf7e3402c7653f7515b075eacc7b (patch) | |
tree | 1090d1164e3c3b299631c86743dfa51e4689e88c | |
parent | 25542d77dd549940468d1a932809feb9959d717d (diff) |
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
-rw-r--r-- | contrib/sepgsql/expected/dml.out | 6 | ||||
-rw-r--r-- | contrib/sepgsql/expected/label.out | 12 | ||||
-rw-r--r-- | contrib/sepgsql/sql/dml.sql | 2 | ||||
-rw-r--r-- | contrib/sepgsql/sql/label.sql | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/contrib/sepgsql/expected/dml.out b/contrib/sepgsql/expected/dml.out index e2d277c9b23..995e425aca1 100644 --- a/contrib/sepgsql/expected/dml.out +++ b/contrib/sepgsql/expected/dml.out @@ -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 diff --git a/contrib/sepgsql/expected/label.out b/contrib/sepgsql/expected/label.out index f46d6f74e99..0300bc6fb45 100644 --- a/contrib/sepgsql/expected/label.out +++ b/contrib/sepgsql/expected/label.out @@ -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) -- diff --git a/contrib/sepgsql/sql/dml.sql b/contrib/sepgsql/sql/dml.sql index 2df70dfb98b..fc318110faf 100644 --- a/contrib/sepgsql/sql/dml.sql +++ b/contrib/sepgsql/sql/dml.sql @@ -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); diff --git a/contrib/sepgsql/sql/label.sql b/contrib/sepgsql/sql/label.sql index 5ceacd1dff8..d19c6edb4ca 100644 --- a/contrib/sepgsql/sql/label.sql +++ b/contrib/sepgsql/sql/label.sql @@ -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 |