From 70ce6baf18081b7134e5b8edda634161beb71e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 25 Apr 2018 16:26:48 +0200 Subject: [PATCH 1/9] XML: regression.sh: fix thinko preventing -B running through actual diff --- xml/regression.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml/regression.sh b/xml/regression.sh index 15bb5925ab1..cd4f0729904 100755 --- a/xml/regression.sh +++ b/xml/regression.sh @@ -178,7 +178,10 @@ test_runner_upgrade() { EOF fi - if test "$((_tru_mode ^ (1 << 2)))" -ne $((1 << 2)); then + # only respond with the flags except for "-B", i.e., when both: + # - _tru_mode non-zero + # - "-B" in _tru_mode is zero (hence non-zero when flipped with XOR) + if test "$((_tru_mode * ((_tru_mode ^ (1 << 2)) & (1 << 2))))" -ne 0; then if test $((_tru_mode & (1 << 0))) -ne 0; then cp -a "${_tru_target}" "${_tru_ref}" cp -a "${_tru_target_err}" "${_tru_ref_err}" From a012a9b8fd86eee00578c594d0756567170131f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 27 Apr 2018 23:09:58 +0200 Subject: [PATCH 2/9] XML: upgrade-2.10.xsl: fix out-of-date dependency tracking This in particular should have been updated as of 123849236. --- xml/upgrade-2.10.xsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml/upgrade-2.10.xsl b/xml/upgrade-2.10.xsl index 7cb87b95a3f..311d824953b 100644 --- a/xml/upgrade-2.10.xsl +++ b/xml/upgrade-2.10.xsl @@ -819,7 +819,8 @@ Source ctxt: (primitive|template)/operations/op/meta_attributes Target ctxt: (primitive|template)/operations/op/meta_attributes Target-inv ctxt:(primitive|template)/meta_attributes - Dependencies: N/A + Dependencies: ProcessAttrOpMetaAttributes + ProcessNonattrOpMetaAttributes --> From 59bb085b7822318377ee07ae730eb2fb7ae11853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 27 Apr 2018 19:57:45 +0200 Subject: [PATCH 3/9] XML: upgrade-2.10.xsl: fix thinko in multi-match-clash prevention --- xml/upgrade-2.10.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/upgrade-2.10.xsl b/xml/upgrade-2.10.xsl index 311d824953b..5405e15698e 100644 --- a/xml/upgrade-2.10.xsl +++ b/xml/upgrade-2.10.xsl @@ -1314,7 +1314,7 @@ not(@in-case-of) and not( - $MapClusterProperties/cibtr:replace[ + $MapClusterNode/cibtr:replace[ @what = current()/@name and @in-case-of From e50c79c344c9d806ca2ec2fb2c9d1cddf4d62dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 27 Apr 2018 22:03:49 +0200 Subject: [PATCH 4/9] XML: upgrade-2.10.xsl: ProcessClusterProperties' InverseMode not binary Beside false(), it can also be a string or a selected tree. --- xml/upgrade-2.10.xsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xml/upgrade-2.10.xsl b/xml/upgrade-2.10.xsl index 5405e15698e..f016f6485a2 100644 --- a/xml/upgrade-2.10.xsl +++ b/xml/upgrade-2.10.xsl @@ -518,7 +518,9 @@ ) ) ]"/> - + From ee8017bdddae979c29b74473be8e81a70880ef26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Mon, 23 Apr 2018 13:41:25 +0200 Subject: [PATCH 5/9] XML: upgrade-2.10.xsl: space 1/4: prevent the first batch Related to 5adb83735, but is not the panacea there, presence of superfluous "marking" spaces (thus, extra text nodes in the internal representation of CIB) needs to be addressed gradually, in subsequent three patches. --- xml/test-2/020-rsc-requires-inline.ref | 2 +- xml/test-2/024-rsc-requires-no-selfclash.ref | 4 ++-- xml/upgrade-2.10.xsl | 10 ++++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/xml/test-2/020-rsc-requires-inline.ref b/xml/test-2/020-rsc-requires-inline.ref index 574071b8aaa..6be2417df53 100644 --- a/xml/test-2/020-rsc-requires-inline.ref +++ b/xml/test-2/020-rsc-requires-inline.ref @@ -20,7 +20,7 @@ - + diff --git a/xml/test-2/024-rsc-requires-no-selfclash.ref b/xml/test-2/024-rsc-requires-no-selfclash.ref index 0ea8203e913..5aabac39bad 100644 --- a/xml/test-2/024-rsc-requires-no-selfclash.ref +++ b/xml/test-2/024-rsc-requires-no-selfclash.ref @@ -48,7 +48,7 @@ - + - + + @@ -795,6 +800,7 @@ + @@ -989,6 +995,7 @@ + From bab4add316ca464fbde73096456ce4baf4da25f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 27 Apr 2018 15:45:35 +0200 Subject: [PATCH 7/9] XML: upgrade-2.10.xsl: space 3/4: refactor InnerPass as a passable var. Depending on the context, this can allow for optimizations (cf. passing already computed "simulation" value from ProcessNonattrOpMetaAttributes to the same template called without that flag) within ProcessAttrOpMetaAttributes) or to discern cases when a template is entered in an InnerSimulation mode directly from cases when it happens privately (indicated with INNER-RECURSION value that is, in parallel, getting introduced as a new convention here). --- xml/upgrade-2.10.xsl | 49 +++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/xml/upgrade-2.10.xsl b/xml/upgrade-2.10.xsl index 86a54ef21c9..3754e30c540 100644 --- a/xml/upgrade-2.10.xsl +++ b/xml/upgrade-2.10.xsl @@ -439,6 +439,16 @@ moved) at this other part of the tree" contexts; for such cases, there's usually InverseMode parameter to be assigned true() (implicit default) and false(), respectively + E. the common idiom that emerges is: evaluate simulation value, + depending on the presence of the "success mark" (cf. A.), + possibly emit non-simulation value; since it would (likely) + re-evaluate the simulation anew (wastefully) or perhaps + this sort of dependency injection can just come handy, + common transformation helpers below offer InnerPass + parameter to be optionally passed, either as a string (when + no-denormalized-space is an internal criterium for the template) + or, conventionally, the result tree fragment representing the + output of the template at hand called with a simulation flag --> @@ -453,8 +463,7 @@ - - + @@ -464,10 +473,11 @@ + - + @@ -645,8 +655,7 @@ - - + + - + @@ -834,10 +844,7 @@ - - - - + + - + + + @@ -1023,10 +1033,7 @@ - - - - + @@ -1036,10 +1043,13 @@ + - + + + - + + + + + + From 13a370436f9f18309e0100ca0a4bb2e947a9b817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 27 Apr 2018 18:44:04 +0200 Subject: [PATCH 8/9] XML: upgrade-2.10.xsl: space 4/4: prevent the cluster properties. batch This replaces previous inflexible static variables based scheme with the simulation backed approach already used at other places. The ultimate impact is that the respective superfluous "marking" spaces get tackled there as well. --- xml/upgrade-2.10.xsl | 359 +++++++++++++++++++++++++------------------ 1 file changed, 208 insertions(+), 151 deletions(-) diff --git a/xml/upgrade-2.10.xsl b/xml/upgrade-2.10.xsl index 3754e30c540..fdcf1c8dcb2 100644 --- a/xml/upgrade-2.10.xsl +++ b/xml/upgrade-2.10.xsl @@ -531,7 +531,9 @@ ]"/> + $InnerSimulation + and + $InnerPass = 'INNER-RECURSION'"> @@ -571,7 +573,7 @@ )"> - + @@ -600,7 +602,7 @@ - + @@ -627,7 +629,7 @@ - + @@ -666,7 +668,6 @@ - @@ -774,7 +775,7 @@ - + @@ -810,7 +811,7 @@ - + @@ -846,9 +847,7 @@ - + @@ -915,7 +914,7 @@ ) ) ]"/> - + @@ -1005,7 +1004,7 @@ - + @@ -1043,7 +1042,6 @@ - @@ -1228,7 +1226,7 @@ - + @@ -1256,6 +1254,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1418,12 +1541,9 @@ - - - - - - + + + @@ -1437,6 +1557,7 @@ + @@ -1444,7 +1565,11 @@ != $ProcessedRscInstanceAttributes"> - + + + + + @@ -1510,122 +1635,34 @@ + - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - + + + + + @@ -1655,28 +1692,36 @@ ) ]"> - - - - - + + + + + - - - - - + + + + + @@ -1704,10 +1749,16 @@ - + + + + - + + + + @@ -1724,10 +1775,16 @@ - + + + + - + + + + From 224e03bb1a842db796283054eb27eee6f00f1a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 27 Apr 2018 23:19:22 +0200 Subject: [PATCH 9/9] Low: schema upgrade: suppress temporary fix to avoid "mark space" crash Preceding XML commits try hard to avoid that from the actual output, so this is a midstep towards removing the "temporary fix" fully. --- lib/common/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/Makefile.am b/lib/common/Makefile.am index 7546fe9fc1f..9eb17531ef1 100644 --- a/lib/common/Makefile.am +++ b/lib/common/Makefile.am @@ -6,7 +6,7 @@ # include $(top_srcdir)/Makefile.common -AM_CPPFLAGS += -I$(top_builddir)/lib/gnu -I$(top_srcdir)/lib/gnu +AM_CPPFLAGS += -I$(top_builddir)/lib/gnu -I$(top_srcdir)/lib/gnu -DPCMK_SCHEMAS_EMERGENCY_XSLT=0 ## libraries lib_LTLIBRARIES = libcrmcommon.la