diff --git a/.gitignore b/.gitignore index e35033bfbf..d87fcf7898 100644 --- a/.gitignore +++ b/.gitignore @@ -1,352 +1,352 @@ # # Copyright 2011-2023 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # # Common conventions for files that should be ignored *~ *.bz2 *.diff *.orig *.patch *.rej *.sed *.swp *.tar.gz *.tgz \#* .\#* logs # libtool artifacts *.la *.lo .libs libltdl libtool libtool.m4 ltdl.m4 /m4/argz.m4 /m4/ltargz.m4 /m4/ltoptions.m4 /m4/ltsugar.m4 /m4/ltversion.m4 /m4/lt~obsolete.m4 # autotools artifacts .deps .dirstamp Makefile Makefile.in aclocal.m4 autoconf autoheader autom4te.cache/ automake /confdefs.h config.log config.status configure /conftest* # gettext artifacts /ABOUT-NLS /m4/codeset.m4 /m4/fcntl-o.m4 /m4/gettext.m4 /m4/glibc2.m4 /m4/glibc21.m4 /m4/iconv.m4 /m4/intdiv0.m4 /m4/intl.m4 /m4/intldir.m4 /m4/intlmacosx.m4 /m4/intmax.m4 /m4/inttypes-pri.m4 /m4/inttypes_h.m4 /m4/lcmessage.m4 /m4/lib-ld.m4 /m4/lib-link.m4 /m4/lib-prefix.m4 /m4/lock.m4 /m4/longlong.m4 /m4/nls.m4 /m4/po.m4 /m4/printf-posix.m4 /m4/progtest.m4 /m4/size_max.m4 /m4/stdint_h.m4 /m4/threadlib.m4 /m4/uintmax_t.m4 /m4/visibility.m4 /m4/wchar_t.m4 /m4/wint_t.m4 /m4/xsize.m4 /po/*.gmo /po/*.header /po/*.pot /po/*.sin /po/Makefile.in.in /po/Makevars.template /po/POTFILES /po/Rules-quot /po/stamp-po # configure targets /agents/ocf/ClusterMon /agents/ocf/Dummy /agents/ocf/HealthCPU /agents/ocf/HealthIOWait /agents/ocf/HealthSMART /agents/ocf/Stateful /agents/ocf/SysInfo /agents/ocf/attribute /agents/ocf/controld /agents/ocf/ifspeed /agents/ocf/ping /agents/ocf/remote /agents/stonith/fence_legacy /agents/stonith/fence_watchdog /cts/benchmark/clubench /cts/cluster_test /cts/cts /cts/cts-attrd /cts/cts-cli /cts/cts-exec /cts/cts-fencing /cts/cts-lab /cts/cts-regression /cts/cts-scheduler /cts/cts-schemas /cts/lab/CTS.py /cts/support/LSBDummy /cts/support/cts-support /cts/support/fence_dummy /cts/support/pacemaker-cts-dummyd /cts/support/pacemaker-cts-dummyd@.service /daemons/execd/pacemaker_remote /daemons/execd/pacemaker_remote.service /daemons/fenced/fence_legacy /daemons/fenced/fence_watchdog /daemons/pacemakerd/pacemaker.combined.upstart /daemons/pacemakerd/pacemaker.service /daemons/pacemakerd/pacemaker.upstart /doc/Doxyfile /etc/init.d/pacemaker /etc/logrotate.d/pacemaker /etc/sysconfig/pacemaker /include/config.h /include/config.h.in /include/crm_config.h /maint/bumplibs /python/pacemaker/buildoptions.py /python/setup.py /tools/cluster-clean /tools/cluster-helper /tools/cluster-init /tools/cibsecret /tools/crm_error /tools/crm_failcount /tools/crm_master /tools/crm_mon.service /tools/crm_mon.upstart /tools/crm_report /tools/crm_rule /tools/crm_standby /tools/pcmk_simtimes /tools/report.collector /tools/report.common /xml/rng-helper # Compiled targets and intermediary files *.o *.pc *.pyc /daemons/attrd/pacemaker-attrd /daemons/based/pacemaker-based /daemons/controld/pacemaker-controld /daemons/execd/cts-exec-helper /daemons/execd/pacemaker-execd /daemons/execd/pacemaker-remoted /daemons/fenced/cts-fence-helper /daemons/fenced/pacemaker-fenced /daemons/pacemakerd/pacemakerd /daemons/schedulerd/pacemaker-schedulerd /devel/scratch /lib/gnu/stdalign.h /tools/attrd_updater /tools/cibadmin /tools/crmadmin /tools/crm_attribute /tools/crm_diff /tools/crm_mon /tools/crm_node /tools/crm_resource /tools/crm_shadow /tools/crm_simulate /tools/crm_ticket /tools/crm_verify /tools/iso8601 /tools/stonith_admin # Generated XML schema files /xml/crm_mon.rng /xml/pacemaker*.rng /xml/versions.rng /xml/api/api-result*.rng # Working directories for make dist and make export /pacemaker-[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9] # Documentation build targets and intermediary files *.7 *.7.xml *.7.html *.8 *.8.xml *.8.html GPATH GRTAGS GTAGS TAGS /daemons/fenced/pacemaker-fenced.xml /daemons/schedulerd/pacemaker-schedulerd.xml /doc/.ABI-build /doc/HTML /doc/abi_dumps /doc/abi-check /doc/api/ /doc/compat_reports /doc/crm_fencing.html /doc/sphinx/*/_build /doc/sphinx/*/conf.py /doc/sphinx/*/generated /doc/sphinx/build-2.1.txt /doc/sphinx/shared/images/*.png # Test artifacts (from unit tests, regression tests, static analysis, etc.) *.coverity *.gcda *.gcno coverity-* pacemaker_*.info /coverage /cppcheck.out /cts/scheduler/bug-rh-1097457.log /cts/scheduler/bug-rh-1097457.trs /cts/scheduler/shadow.* -/cts/schemas/test-*/*.up -/cts/schemas/test-*/*.up.err +/cts/schemas/test-*/ref/*.up +/cts/schemas/test-*/ref.err/*.up.err /cts/test-suite.log /lib/*/tests/*/*.log /lib/*/tests/*/*_test /lib/*/tests/*/*.trs /lib/common/tests/schemas/schemas /test/_test_file.c # Packaging artifacts *.rpm /pacemaker.spec /rpm/[A-LN-Z]* /rpm/build.counter /rpm/mock # Project maintainer artifacts /maint/gnulib /maint/mocked/based /maint/testcc_helper.cc /maint/testcc_*_h # Formerly built files (helps when jumping back and forth in checkout) /.ABI-build /Doxyfile /HTML /abi_dumps /abi-check /agents/ocf/o2cb /build.counter /compat_reports /compile /cts/.regression.failed.diff /attrd /cib /config.guess /config.sub /coverage.sh /crmd /cts/CTS.py /cts/CTSlab.py /cts/CTSvars.py /cts/HBDummy /cts/LSBDummy /cts/OCFIPraTest.py /cts/cts-coverage /cts/cts-log-watcher /cts/cts-support /cts/fence_dummy /cts/lab/CTSlab.py /cts/lab/CTSvars.py /cts/lab/OCFIPraTest.py /cts/lab/cluster_test /cts/lab/cts /cts/lab/cts-log-watcher /cts/lxc_autogen.sh /cts/pacemaker-cts-dummyd /cts/pacemaker-cts-dummyd@.service /daemons/based/cibmon /daemons/fenced/fence_legacy /daemons/fenced/fence_watchdog /daemons/pacemakerd/pacemaker /depcomp /doc/*.build /doc/*/en-US/Ap-*.xml /doc/*/en-US/Ch-*.xml /doc/*/publican.cfg /doc/*/publish /doc/*/tmp/** /doc/Clusters_from_Scratch.txt /doc/Pacemaker_Explained.txt /doc/acls.html /doc/publican-catalog* /doc/shared/en-US/*.xml /doc/shared/en-US/images/pcmk-*.png /doc/shared/en-US/images/Policy-Engine-*.png /extra/*/* /fencing /include/stamp-* /install-sh /lib/common/md5.c /lib/common/tests/flags/pcmk__clear_flags_as /lib/common/tests/flags/pcmk__set_flags_as /lib/common/tests/flags/pcmk_all_flags_set /lib/common/tests/flags/pcmk_any_flags_set /lib/common/tests/operations/parse_op_key /lib/common/tests/strings/pcmk__btoa /lib/common/tests/strings/pcmk__parse_ll_range /lib/common/tests/strings/pcmk__scan_double /lib/common/tests/strings/pcmk__str_any_of /lib/common/tests/strings/pcmk__strcmp /lib/common/tests/strings/pcmk__char_in_any_str /lib/common/tests/utils/pcmk_str_is_infinity /lib/common/tests/utils/pcmk_str_is_minus_infinity /lib/gnu/libgnu.a /lib/pengine/tests/rules/ /lrmd /ltmain.sh /mcp /missing /mock /pacemaker-*.spec /pengine /py-compile /scratch /tools/cluster-init /test-driver /xml/assets /xml/crm.dtd /xml/version-diff.sh ylwrap diff --git a/cts/Makefile.am b/cts/Makefile.am index c2ce308c85..8c721ad865 100644 --- a/cts/Makefile.am +++ b/cts/Makefile.am @@ -1,78 +1,78 @@ # # Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # include $(top_srcdir)/mk/python.mk MAINTAINERCLEANFILES = Makefile.in # Test commands and globally applicable test files should be in $(testdir), # and command-specific test data should be in a command-specific subdirectory. testdir = $(datadir)/$(PACKAGE)/tests test_SCRIPTS = cts-attrd \ cts-cli \ cts-exec \ cts-fencing \ cts-lab \ cts-regression \ cts-scheduler \ cts-schemas dist_test_DATA = README.md \ valgrind-pcmk.suppressions clidir = $(testdir)/cli dist_cli_DATA = $(wildcard cli/*.xml cli/*.exp) ctsdir = $(datadir)/$(PACKAGE)/tests/cts cts_SCRIPTS = cts schemasdir = $(testdir)/schemas -dist_schemas_DATA = $(wildcard schemas/*/*.ref) \ - $(wildcard schemas/*/*.ref.err) \ - $(wildcard schemas/*/*.xml) +dist_schemas_DATA = $(wildcard schemas/*/ref/*.ref) \ + $(wildcard schemas/*/ref.err/*.ref.err) \ + $(wildcard schemas/*/xml/*.xml) noinst_SCRIPTS = cluster_test .PHONY: scheduler-list scheduler-list: @for T in "$(srcdir)"/scheduler/xml/*.xml; do \ echo $$(basename $$T .xml); \ done CLEANFILES = $(builddir)/.regression.failed.diff .PHONY: clean-local clean-local: rm -f scheduler/*/*.pe rm -f schemas/*/*.up{,.err} SUBDIRS = benchmark \ scheduler \ support .PHONY: cts-support-install cts-support-install: $(MAKE) $(AM_MAKEFLAGS) -C support cts-support $(builddir)/support/cts-support install .PHONY: cts-support-uninstall cts-support-uninstall: $(MAKE) $(AM_MAKEFLAGS) -C support cts-support $(builddir)/support/cts-support uninstall # Everything listed here is a python script, typically generated from a .in file # (though that is not a requirement). We want to run pylint on all of these # things after they've been built. python_files = cts-attrd \ cts-exec \ cts-fencing \ cts-lab \ cts-regression \ cts-scheduler PYCHECKFILES ?= $(python_files) diff --git a/cts/cts-schemas.in b/cts/cts-schemas.in index 6abb4cb198..e71f528909 100755 --- a/cts/cts-schemas.in +++ b/cts/cts-schemas.in @@ -1,571 +1,587 @@ #!@BASH_PATH@ # # Copyright 2018-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # Note on portable usage of sed: GNU/POSIX/*BSD sed have a limited subset of # compatible functionality. Do not use the -i option, alternation (\|), # \0, or character sequences such as \n or \s. # Exit immediately if a command fails, with some exceptions (for example, when # part of an if or while condition). Treat unset variables as errors during # expansion. See bash(1) man page for details. set -eu # If readlink supports -e, use it readlink -e / >/dev/null 2>/dev/null if [ $? -eq 0 ]; then test_home=$(dirname "$(readlink -e "$0")") else test_home=$(dirname "$0") fi suites_dir="$test_home/schemas" src_dir=$(dirname "$test_home") if [ -d "$src_dir/xml" ]; then export PCMK_schema_directory="$src_dir/xml" echo "Using local schemas from: $PCMK_schema_directory" else export PCMK_schema_directory=@CRM_SCHEMA_DIRECTORY@ fi DIFF="diff -u" DIFF_PAGER="less -LRX" RNG_VALIDATOR="xmllint --noout --relaxng" XSLT_PROCESSOR="xsltproc --nonet" # Available test suites tests="test2to3" # # commons # emit_result() { _er_howmany=${1:?} # how many errors (0/anything else incl. strings) _er_subject=${2:?} _er_prefix=${3-} if [ -n "$_er_prefix" ]; then _er_prefix="${_er_prefix}: " fi if [ "$_er_howmany" = "0" ]; then printf "%s%s finished OK\n" "${_er_prefix}" "${_er_subject}" else printf "%s%s encountered ${_er_howmany} errors\n" \ "${_er_prefix}" "${_er_subject}" fi } emit_error() { _ee_msg=${1:?} printf "%s\n" "${_ee_msg}" >&2 } # returns 1 + floor of base 2 logaritm for _lo0r_i in 1...255, # or 0 for _lo0r_i = 0 log2_or_0_return() { _lo0r_i=${1:?} return $(((!(_lo0r_i >> 1) && _lo0r_i) * 1 \ + (!(_lo0r_i >> 2) && _lo0r_i & (1 << 1)) * 2 \ + (!(_lo0r_i >> 3) && _lo0r_i & (1 << 2)) * 3 \ + (!(_lo0r_i >> 4) && _lo0r_i & (1 << 3)) * 4 \ + (!(_lo0r_i >> 5) && _lo0r_i & (1 << 4)) * 5 \ + (!(_lo0r_i >> 6) && _lo0r_i & (1 << 5)) * 6 \ + (!(_lo0r_i >> 7) && _lo0r_i & (1 << 6)) * 7 \ + !!(_lo0r_i >> 7) * 7 )) } # rough addition of two base 2 logarithms log2_or_0_add() { _lo0a_op1=${1:?} _lo0a_op2=${2:?} if [ "$_lo0a_op1" -gt "$_lo0a_op2" ]; then return ${_lo0a_op1} elif [ "$_lo0a_op2" -gt "$_lo0a_op1" ]; then return ${_lo0a_op2} elif [ "$_lo0a_op1" -gt 0 ]; then return $((_lo0a_op1 + 1)) else return ${_lo0a_op1} fi } # # test phases # # stdin: input file per line test_cleaner() { - while read _tc_origin; do - _tc_origin=${_tc_origin%.*} - rm -f "${_tc_origin}.up" "${_tc_origin}.up.err" - rm -f "$(dirname "${_tc_origin}")/.$(basename "${_tc_origin}").up" + while read _tc_source; do + _tc_source_dir=$(dirname "$_tc_source") + _tc_ref_dir="${_tc_source_dir/%xml/ref}" + _tc_ref_err_dir="${_tc_source_dir/%xml/ref.err}" + + _tc_source_basename=$(basename "$_tc_source") + _tc_up_basename="${_tc_source_basename%.*}.up" + _tc_up_err_basename="${_tc_source_basename%.*}.up.err" + + _tc_up="$_tc_ref_dir/$_tc_up_basename" + _tc_up_err="$_tc_ref_err_dir/$_tc_up_err_basename" + + rm -f "$_tc_up" "$_tc_up_err" done } test_explanation() { _tsc_template= while [ $# -gt 0 ]; do case "$1" in -o=*) _tsc_template="$PCMK_schema_directory/upgrade-${1#-o=}.xsl";; esac shift done $XSLT_PROCESSOR "$PCMK_schema_directory/upgrade-detail.xsl" "$_tsc_template" } cleanup_module_error() { # Work around a libxml2 bug. At least as of libxslt-1.1.41 and # libxml2-2.10.4, if the stylesheet contains a user-defined top-level # element (that is, one with a namespace other than the XSL namespace), # libxslt tries to load the namespace URI as an XML module. If this fails, # libxml2 logs a "module error: failed to open ..." message. # # This appears to be fixed in libxml2 v2.13 with commit ecb4c9fb. sed "/module error/d" "$1" > "$1.new" mv -- "$1.new" "$1" } # stdout: filename of the transformed file test_runner_upgrade() { _tru_template=${1:?} _tru_source=${2:?} # filename _tru_mode=${3:?} # extra modes wrt. "referential" outcome, see below - _tru_ref="${_tru_source%.*}.ref" + _tru_source_dir=$(dirname "$_tru_source") + _tru_ref_dir="${_tru_source_dir/%xml/ref}" + _tru_ref_err_dir="${_tru_source_dir/%xml/ref.err}" - if [ "$((_tru_mode & (1 << 0)))" -ne 0 ] || [ -f "${_tru_ref}.err" ]; then - _tru_ref_err="${_tru_ref}.err" - else + _tru_source_basename=$(basename "$_tru_source") + _tru_ref_basename="${_tru_source_basename%.*}.ref" + _tru_ref_err_basename="${_tru_source_basename%.*}.ref.err" + + _tru_ref="$_tru_ref_dir/$_tru_ref_basename" + _tru_ref_err="$_tru_ref_err_dir/$_tru_ref_err_basename" + + if ! [ "$((_tru_mode & (1 << 0)))" -ne 0 ] && ! [ -f "${_tru_ref_err}" ]; then _tru_ref_err=/dev/null fi _tru_proc_rc=0 _tru_diff_rc=0 - _tru_target="${_tru_source%.*}.up" - _tru_target_err="${_tru_target}.err" + _tru_target="${_tru_ref/%.ref/.up}" + _tru_target_err="${_tru_ref_err/%.ref.err/.up.err}" _tru_transforms=$(ls "$PCMK_schema_directory"/upgrade-$_tru_template-*.xsl \ | sort -n) _tru_input=$(mktemp) cp "$_tru_source" "$_tru_input" # Zero the error file before we append to it > "$_tru_target_err" if [ "$((_tru_mode & (1 << 2)))" -eq 0 ]; then for transform in $_tru_transforms; do $XSLT_PROCESSOR "$transform" "$_tru_input" \ > "$_tru_target" 2>> "$_tru_target_err" \ || _tru_proc_rc=$? cp "$_tru_target" "$_tru_input" if [ "$_tru_proc_rc" -ne 0 ]; then break; fi done rm -f "$_tru_input" cleanup_module_error "$_tru_target_err" if [ "$_tru_proc_rc" -ne 0 ]; then echo "$_tru_target_err" return "$_tru_proc_rc" fi else # when -B (deblanked outcomes handling) requested, we: # - drop blanks from the source XML # (effectively emulating pacemaker handling) # - re-drop blanks from the XSLT outcome, # which is compared with referential outcome # processed with even greedier custom deblanking # (extraneous inter-element whitespace like blank # lines will not get removed otherwise, see lower) for transform in $_tru_transforms; do xmllint --noblanks "$_tru_input" \ | $XSLT_PROCESSOR "$transform" - \ > "$_tru_target" 2>> "$_tru_target_err" \ || _tru_proc_rc=$? cp "$_tru_target" "$_tru_input" if [ "$_tru_proc_rc" -ne 0 ]; then break; fi done rm -f "$_tru_input" cleanup_module_error "$_tru_target_err" if [ "$_tru_proc_rc" -ne 0 ]; then echo "$_tru_target_err" return "$_tru_proc_rc" fi # reusing variable no longer needed _tru_template="$(dirname "${_tru_target}")" _tru_template="${_tru_template}/.$(basename "${_tru_target}")" mv "${_tru_target}" "${_tru_template}" ${XSLT_PROCESSOR} - "${_tru_template}" > "${_tru_target}" < EOF fi # 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 [ "$((_tru_mode * ((_tru_mode ^ (1 << 2)) & (1 << 2))))" -ne 0 ]; then if [ "$((_tru_mode & (1 << 0)))" -ne 0 ]; then cp -a "${_tru_target}" "${_tru_ref}" cp -a "${_tru_target_err}" "${_tru_ref_err}" fi if [ "$((_tru_mode & (1 << 1)))" -ne 0 ]; then { ${DIFF} "${_tru_source}" "${_tru_ref}" \ && printf '\n(files match)\n'; } | ${DIFF_PAGER} >&2 if [ $? -ne 0 ]; then printf "\npager failure\n" >&2 return 1 fi printf '\nIs comparison OK? ' >&2 if read _tru_answer &2; return 1;; esac else return 1 fi fi elif [ -f "$_tru_ref" ] && [ -e "$_tru_ref_err" ]; then if [ "$((_tru_mode & (1 << 2)))" -eq 0 ]; then _output=$(cat "$_tru_ref") else _output=$($XSLT_PROCESSOR - "$_tru_ref" < EOF ) fi echo "$_output" | $DIFF - "$_tru_target" >&2 || _tru_diff_rc=$? if [ "$_tru_diff_rc" -eq 0 ]; then $DIFF "$_tru_ref_err" "$_tru_target_err" >&2 || _tru_diff_rc=$? fi if [ "$_tru_diff_rc" -ne 0 ]; then emit_error "Outputs differ from referential ones" echo "/dev/null" return 1 fi else emit_error "Referential file(s) missing: ${_tru_ref}" echo "/dev/null" return 1 fi echo "${_tru_target}" } test_runner_validate() { _trv_schema=${1:?} _trv_target=${2:?} # filename if ! ${RNG_VALIDATOR} "${_trv_schema}" "${_trv_target}" \ 2>/dev/null; then ${RNG_VALIDATOR} "${_trv_schema}" "${_trv_target}" fi } # -o= ... which conventional version to deem as the transform origin # -t= ... which conventional version to deem as the transform target # -B # -D # -G ... see usage # stdin: input file per line test_runner() { _tr_mode=0 _tr_ret=0 _tr_schema_o= _tr_schema_t= _tr_target= _tr_template= while [ $# -gt 0 ]; do case "$1" in -o=*) _tr_template="${1#-o=}" _tr_schema_o="$PCMK_schema_directory/pacemaker-${1#-o=}.rng";; -t=*) _tr_schema_t="$PCMK_schema_directory/pacemaker-${1#-t=}.rng";; -G) _tr_mode=$((_tr_mode | (1 << 0)));; -D) _tr_mode=$((_tr_mode | (1 << 1)));; -B) _tr_mode=$((_tr_mode | (1 << 2)));; esac shift done if [ ! -f "${_tr_schema_o:?}" ] || [ ! -f "${_tr_schema_t:?}" ]; then emit_error "Origin and/or target schema missing, rerun make" return 1 fi while read _tr_origin; do printf '%-60s' "${_tr_origin}... " # pre-validate if ! test_runner_validate "${_tr_schema_o}" "${_tr_origin}"; then _tr_ret=$((_tr_ret + 1)); echo "E:pre-validate"; continue fi # upgrade if ! _tr_target=$(test_runner_upgrade "${_tr_template}" \ "${_tr_origin}" "${_tr_mode}"); then _tr_ret=$((_tr_ret + 1)); if [ -z "$_tr_target" ]; then break fi echo "E:upgrade" if [ -s "$_tr_target" ]; then echo --- cat "$_tr_target" || : echo --- fi continue fi # post-validate if ! test_runner_validate "${_tr_schema_t}" "${_tr_target}"; then _tr_ret=$((_tr_ret + 1)); echo "E:post-validate"; continue fi echo "OK" echo "$_tr_origin" | test_cleaner done log2_or_0_return ${_tr_ret} } # # particular test variations # -C # -X # stdin: granular test specification(s) if any # test2to3() { _t23_pattern= while read _t23_spec; do _t23_spec=${_t23_spec%.xml} _t23_spec=${_t23_spec%\*} _t23_pattern="${_t23_pattern} -name ${_t23_spec}*.xml -o" done if [ -n "$_t23_pattern" ]; then _t23_pattern="( ${_t23_pattern%-o} )" fi - find "$suites_dir/test-2" -name test-2 -o -type d -prune \ + find "$suites_dir/test-2/xml" -name xml -o -type d -prune \ -o -name '*.xml' ${_t23_pattern} -print \ | env LC_ALL=C sort \ | { case " $* " in *\ -C\ *) test_cleaner;; *\ -X\ *) test_explanation -o=2.10;; *) test_runner -o=2.10 -t=3.0 "$@" || return $?;; esac; } } # # "framework" # # option-likes ... options to be passed down # argument-likes ... drives a test selection test_suite() { _ts_pass= _ts_select= _ts_select_full= _ts_test_specs= _ts_global_ret=0 _ts_ret=0 while [ $# -gt 0 ]; do case "$1" in -) printf '%s\n' 'waiting for tests specified at stdin...'; while read _ts_spec; do _ts_select="${_ts_spec}@$1" done;; -*) _ts_pass="${_ts_pass} $1";; *) _ts_select_full="${_ts_select_full}@$1" _ts_select="${_ts_select}@${1%%/*}";; esac shift done # _ts_select contains a '@'-delimited list of test suite names from CLI _ts_select="${_ts_select}@" # _ts_select_full contains a '@'-delimited list of test names _ts_select_full="${_ts_select_full}@" for _ts_test in ${tests}; do _ts_test_specs= while true; do case "${_ts_select}" in *@${_ts_test}@*) # A known test suite _ts_test was found in the list of # requested test suites _ts_select. Strip it out of # _ts_select. # # The purpose of this seems to be to prevent the later # _ts_select_full loop from selecting specific tests from # this suite, if the user also requested the entire suite. _ts_test_specs="${_ts_select%%@${_ts_test}@*}"\ "@${_ts_select#*@${_ts_test}@}" if [ "$_ts_test_specs" = "@" ]; then _ts_select= # nothing left else _ts_select="$_ts_test_specs" fi continue ;; @) case "${_ts_test}" in test*) break;; esac # filter ;; esac if [ -n "$_ts_test_specs" ]; then break fi continue 2 # move on to matching with next local test done _ts_test_specs= while true; do case "${_ts_select_full}" in *@${_ts_test}/*) # A test was requested from a known test suite. This does # not mean the requested test actually exists, but rather # that it was requested as the form "/...". # Strip extraneous data from test path _ts_test_full="${_ts_test}/${_ts_select_full#*@${_ts_test}/}" _ts_test_full="${_ts_test_full%%@*}" # Strip the requested test out of _ts_select_full _ts_select_full="${_ts_select_full%%@${_ts_test_full}@*}"\ "@${_ts_select_full#*@${_ts_test_full}@}" # Strip the test suite name and slash from the test spec _ts_test_specs="${_ts_test_specs} ${_ts_test_full#*/}" ;; *) break ;; esac done # Feed the test specs (if any) as stdin to the respective test suite # function _ts_test() for _ts_test_spec in ${_ts_test_specs}; do printf '%s\n' "${_ts_test_spec}" done | "${_ts_test}" ${_ts_pass} || _ts_ret=$? if [ "$_ts_ret" = 0 ]; then emit_result "$_ts_ret" "$_ts_test" else emit_result "at least 2^$((_ts_ret - 1))" "$_ts_test" fi log2_or_0_add ${_ts_global_ret} ${_ts_ret} _ts_global_ret=$? done if [ -n "${_ts_select#@}" ]; then emit_error "Non-existing test(s):$(echo "${_ts_select}" \ | tr '@' ' ')" log2_or_0_add ${_ts_global_ret} 1 || _ts_global_ret=$? fi return ${_ts_global_ret} } # NOTE: big letters are dedicated for per-test-set behaviour, # small ones for generic/global behaviour usage() { printf \ '%s\n%s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n' \ "usage: $0 [-{B,C,D,G,X}]* \\" \ " [-|{${tests## }}*]" \ "- when no suites (arguments) provided, \"test*\" ones get used" \ "- with '-' suite specification the actual ones grabbed on stdin" \ "- use '-B' to run validate-only check suppressing blanks first" \ "- use '-C' to only cleanup ephemeral byproducts" \ "- use '-D' to review originals vs. \"referential\" outcomes" \ "- use '-G' to generate \"referential\" outcomes" \ "- use '-X' to show explanatory details about the upgrade" \ "- test specification can be granular, e.g. 'test2to3/022'" } main() { _main_pass= _main_bailout=0 _main_ret=0 while [ $# -gt 0 ]; do case "$1" in -h) usage; exit;; -C|-G|-X) _main_bailout=1;; esac _main_pass="${_main_pass} $1" shift done test_suite ${_main_pass} || _main_ret=$? if [ "$_main_bailout" -eq 0 ]; then test_suite -C $_main_pass >/dev/null || true fi if [ "$_main_ret" = 0 ]; then emit_result "$_main_ret" "Overall suite" else emit_result "at least 2^$((_main_ret - 1))" "Overall suite" fi return ${_main_ret} } main "$@" diff --git a/cts/schemas/test-2/001-clu-props.ref.err b/cts/schemas/test-2/ref.err/001-clu-props.ref.err similarity index 100% rename from cts/schemas/test-2/001-clu-props.ref.err rename to cts/schemas/test-2/ref.err/001-clu-props.ref.err diff --git a/cts/schemas/test-2/002-instance_atributes-rsc.ref.err b/cts/schemas/test-2/ref.err/002-instance_atributes-rsc.ref.err similarity index 100% rename from cts/schemas/test-2/002-instance_atributes-rsc.ref.err rename to cts/schemas/test-2/ref.err/002-instance_atributes-rsc.ref.err diff --git a/cts/schemas/test-2/003-instance_atributes-rsc-nonbijective.ref.err b/cts/schemas/test-2/ref.err/003-instance_atributes-rsc-nonbijective.ref.err similarity index 100% rename from cts/schemas/test-2/003-instance_atributes-rsc-nonbijective.ref.err rename to cts/schemas/test-2/ref.err/003-instance_atributes-rsc-nonbijective.ref.err diff --git a/cts/schemas/test-2/004-clu-props-can.ref.err b/cts/schemas/test-2/ref.err/004-clu-props-can.ref.err similarity index 100% rename from cts/schemas/test-2/004-clu-props-can.ref.err rename to cts/schemas/test-2/ref.err/004-clu-props-can.ref.err diff --git a/cts/schemas/test-2/005-clu-props-cannot.ref.err b/cts/schemas/test-2/ref.err/005-clu-props-cannot.ref.err similarity index 100% rename from cts/schemas/test-2/005-clu-props-cannot.ref.err rename to cts/schemas/test-2/ref.err/005-clu-props-cannot.ref.err diff --git a/cts/schemas/test-2/006-instance_atributes-rsc-nonbijective.ref.err b/cts/schemas/test-2/ref.err/006-instance_atributes-rsc-nonbijective.ref.err similarity index 100% rename from cts/schemas/test-2/006-instance_atributes-rsc-nonbijective.ref.err rename to cts/schemas/test-2/ref.err/006-instance_atributes-rsc-nonbijective.ref.err diff --git a/cts/schemas/test-2/007-instance_atributes-rsc-nonbijective.ref.err b/cts/schemas/test-2/ref.err/007-instance_atributes-rsc-nonbijective.ref.err similarity index 100% rename from cts/schemas/test-2/007-instance_atributes-rsc-nonbijective.ref.err rename to cts/schemas/test-2/ref.err/007-instance_atributes-rsc-nonbijective.ref.err diff --git a/cts/schemas/test-2/010-rsc_colocation-dropped-for-noop-sa.ref.err b/cts/schemas/test-2/ref.err/010-rsc_colocation-dropped-for-noop-sa.ref.err similarity index 100% rename from cts/schemas/test-2/010-rsc_colocation-dropped-for-noop-sa.ref.err rename to cts/schemas/test-2/ref.err/010-rsc_colocation-dropped-for-noop-sa.ref.err diff --git a/cts/schemas/test-2/020-rsc-requires-inline.ref.err b/cts/schemas/test-2/ref.err/020-rsc-requires-inline.ref.err similarity index 100% rename from cts/schemas/test-2/020-rsc-requires-inline.ref.err rename to cts/schemas/test-2/ref.err/020-rsc-requires-inline.ref.err diff --git a/cts/schemas/test-2/021-rsc-requires-nvpair.ref.err b/cts/schemas/test-2/ref.err/021-rsc-requires-nvpair.ref.err similarity index 100% rename from cts/schemas/test-2/021-rsc-requires-nvpair.ref.err rename to cts/schemas/test-2/ref.err/021-rsc-requires-nvpair.ref.err diff --git a/cts/schemas/test-2/022-rsc-requires-counterexamples.ref.err b/cts/schemas/test-2/ref.err/022-rsc-requires-counterexamples.ref.err similarity index 100% rename from cts/schemas/test-2/022-rsc-requires-counterexamples.ref.err rename to cts/schemas/test-2/ref.err/022-rsc-requires-counterexamples.ref.err diff --git a/cts/schemas/test-2/023-rsc-requires-no-override.ref.err b/cts/schemas/test-2/ref.err/023-rsc-requires-no-override.ref.err similarity index 100% rename from cts/schemas/test-2/023-rsc-requires-no-override.ref.err rename to cts/schemas/test-2/ref.err/023-rsc-requires-no-override.ref.err diff --git a/cts/schemas/test-2/024-rsc-requires-no-selfclash.ref.err b/cts/schemas/test-2/ref.err/024-rsc-requires-no-selfclash.ref.err similarity index 100% rename from cts/schemas/test-2/024-rsc-requires-no-selfclash.ref.err rename to cts/schemas/test-2/ref.err/024-rsc-requires-no-selfclash.ref.err diff --git a/cts/schemas/test-2/030-clu-props-plain-rename.ref.err b/cts/schemas/test-2/ref.err/030-clu-props-plain-rename.ref.err similarity index 100% rename from cts/schemas/test-2/030-clu-props-plain-rename.ref.err rename to cts/schemas/test-2/ref.err/030-clu-props-plain-rename.ref.err diff --git a/cts/schemas/test-2/031-clu-props-drop.ref.err b/cts/schemas/test-2/ref.err/031-clu-props-drop.ref.err similarity index 100% rename from cts/schemas/test-2/031-clu-props-drop.ref.err rename to cts/schemas/test-2/ref.err/031-clu-props-drop.ref.err diff --git a/cts/schemas/test-2/032-clu-props-move.ref.err b/cts/schemas/test-2/ref.err/032-clu-props-move.ref.err similarity index 100% rename from cts/schemas/test-2/032-clu-props-move.ref.err rename to cts/schemas/test-2/ref.err/032-clu-props-move.ref.err diff --git a/cts/schemas/test-2/033-clu-props-move-merge.ref.err b/cts/schemas/test-2/ref.err/033-clu-props-move-merge.ref.err similarity index 100% rename from cts/schemas/test-2/033-clu-props-move-merge.ref.err rename to cts/schemas/test-2/ref.err/033-clu-props-move-merge.ref.err diff --git a/cts/schemas/test-2/034-clu-props-move-redef.ref.err b/cts/schemas/test-2/ref.err/034-clu-props-move-redef.ref.err similarity index 100% rename from cts/schemas/test-2/034-clu-props-move-redef.ref.err rename to cts/schemas/test-2/ref.err/034-clu-props-move-redef.ref.err diff --git a/cts/schemas/test-2/040-nodes-rename-type.ref.err b/cts/schemas/test-2/ref.err/040-nodes-rename-type.ref.err similarity index 100% rename from cts/schemas/test-2/040-nodes-rename-type.ref.err rename to cts/schemas/test-2/ref.err/040-nodes-rename-type.ref.err diff --git a/cts/schemas/test-2/050-rsc-attrs-instance-plain-rename.ref.err b/cts/schemas/test-2/ref.err/050-rsc-attrs-instance-plain-rename.ref.err similarity index 100% rename from cts/schemas/test-2/050-rsc-attrs-instance-plain-rename.ref.err rename to cts/schemas/test-2/ref.err/050-rsc-attrs-instance-plain-rename.ref.err diff --git a/cts/schemas/test-2/051-rsc-attrs-instance-pcmk_arg_map.ref.err b/cts/schemas/test-2/ref.err/051-rsc-attrs-instance-pcmk_arg_map.ref.err similarity index 100% rename from cts/schemas/test-2/051-rsc-attrs-instance-pcmk_arg_map.ref.err rename to cts/schemas/test-2/ref.err/051-rsc-attrs-instance-pcmk_arg_map.ref.err diff --git a/cts/schemas/test-2/060-rsc-attrs-meta-isolation.ref.err b/cts/schemas/test-2/ref.err/060-rsc-attrs-meta-isolation.ref.err similarity index 100% rename from cts/schemas/test-2/060-rsc-attrs-meta-isolation.ref.err rename to cts/schemas/test-2/ref.err/060-rsc-attrs-meta-isolation.ref.err diff --git a/cts/schemas/test-2/061-rsc-attrs-meta-exchange.ref.err b/cts/schemas/test-2/ref.err/061-rsc-attrs-meta-exchange.ref.err similarity index 100% rename from cts/schemas/test-2/061-rsc-attrs-meta-exchange.ref.err rename to cts/schemas/test-2/ref.err/061-rsc-attrs-meta-exchange.ref.err diff --git a/cts/schemas/test-2/070-rsc-op-attrs-inst-requires-start.ref.err b/cts/schemas/test-2/ref.err/070-rsc-op-attrs-inst-requires-start.ref.err similarity index 100% rename from cts/schemas/test-2/070-rsc-op-attrs-inst-requires-start.ref.err rename to cts/schemas/test-2/ref.err/070-rsc-op-attrs-inst-requires-start.ref.err diff --git a/cts/schemas/test-2/071-rsc-op-attrs-inst-requires-nonstart.ref.err b/cts/schemas/test-2/ref.err/071-rsc-op-attrs-inst-requires-nonstart.ref.err similarity index 100% rename from cts/schemas/test-2/071-rsc-op-attrs-inst-requires-nonstart.ref.err rename to cts/schemas/test-2/ref.err/071-rsc-op-attrs-inst-requires-nonstart.ref.err diff --git a/cts/schemas/test-2/072-rsc-op-attrs-inst-requires-no-override.ref.err b/cts/schemas/test-2/ref.err/072-rsc-op-attrs-inst-requires-no-override.ref.err similarity index 100% rename from cts/schemas/test-2/072-rsc-op-attrs-inst-requires-no-override.ref.err rename to cts/schemas/test-2/ref.err/072-rsc-op-attrs-inst-requires-no-override.ref.err diff --git a/cts/schemas/test-2/073-rsc-op-attrs-inst-meta-meaning.ref.err b/cts/schemas/test-2/ref.err/073-rsc-op-attrs-inst-meta-meaning.ref.err similarity index 100% rename from cts/schemas/test-2/073-rsc-op-attrs-inst-meta-meaning.ref.err rename to cts/schemas/test-2/ref.err/073-rsc-op-attrs-inst-meta-meaning.ref.err diff --git a/cts/schemas/test-2/001-clu-props.ref b/cts/schemas/test-2/ref/001-clu-props.ref similarity index 100% rename from cts/schemas/test-2/001-clu-props.ref rename to cts/schemas/test-2/ref/001-clu-props.ref diff --git a/cts/schemas/test-2/002-instance_atributes-rsc.ref b/cts/schemas/test-2/ref/002-instance_atributes-rsc.ref similarity index 100% rename from cts/schemas/test-2/002-instance_atributes-rsc.ref rename to cts/schemas/test-2/ref/002-instance_atributes-rsc.ref diff --git a/cts/schemas/test-2/003-instance_atributes-rsc-nonbijective.ref b/cts/schemas/test-2/ref/003-instance_atributes-rsc-nonbijective.ref similarity index 100% rename from cts/schemas/test-2/003-instance_atributes-rsc-nonbijective.ref rename to cts/schemas/test-2/ref/003-instance_atributes-rsc-nonbijective.ref diff --git a/cts/schemas/test-2/004-clu-props-can.ref b/cts/schemas/test-2/ref/004-clu-props-can.ref similarity index 100% rename from cts/schemas/test-2/004-clu-props-can.ref rename to cts/schemas/test-2/ref/004-clu-props-can.ref diff --git a/cts/schemas/test-2/005-clu-props-cannot.ref b/cts/schemas/test-2/ref/005-clu-props-cannot.ref similarity index 100% rename from cts/schemas/test-2/005-clu-props-cannot.ref rename to cts/schemas/test-2/ref/005-clu-props-cannot.ref diff --git a/cts/schemas/test-2/006-instance_atributes-rsc-nonbijective.ref b/cts/schemas/test-2/ref/006-instance_atributes-rsc-nonbijective.ref similarity index 100% rename from cts/schemas/test-2/006-instance_atributes-rsc-nonbijective.ref rename to cts/schemas/test-2/ref/006-instance_atributes-rsc-nonbijective.ref diff --git a/cts/schemas/test-2/007-instance_atributes-rsc-nonbijective.ref b/cts/schemas/test-2/ref/007-instance_atributes-rsc-nonbijective.ref similarity index 100% rename from cts/schemas/test-2/007-instance_atributes-rsc-nonbijective.ref rename to cts/schemas/test-2/ref/007-instance_atributes-rsc-nonbijective.ref diff --git a/cts/schemas/test-2/010-rsc_colocation-dropped-for-noop-sa.ref b/cts/schemas/test-2/ref/010-rsc_colocation-dropped-for-noop-sa.ref similarity index 100% rename from cts/schemas/test-2/010-rsc_colocation-dropped-for-noop-sa.ref rename to cts/schemas/test-2/ref/010-rsc_colocation-dropped-for-noop-sa.ref diff --git a/cts/schemas/test-2/020-rsc-requires-inline.ref b/cts/schemas/test-2/ref/020-rsc-requires-inline.ref similarity index 100% rename from cts/schemas/test-2/020-rsc-requires-inline.ref rename to cts/schemas/test-2/ref/020-rsc-requires-inline.ref diff --git a/cts/schemas/test-2/021-rsc-requires-nvpair.ref b/cts/schemas/test-2/ref/021-rsc-requires-nvpair.ref similarity index 100% rename from cts/schemas/test-2/021-rsc-requires-nvpair.ref rename to cts/schemas/test-2/ref/021-rsc-requires-nvpair.ref diff --git a/cts/schemas/test-2/022-rsc-requires-counterexamples.ref b/cts/schemas/test-2/ref/022-rsc-requires-counterexamples.ref similarity index 100% rename from cts/schemas/test-2/022-rsc-requires-counterexamples.ref rename to cts/schemas/test-2/ref/022-rsc-requires-counterexamples.ref diff --git a/cts/schemas/test-2/023-rsc-requires-no-override.ref b/cts/schemas/test-2/ref/023-rsc-requires-no-override.ref similarity index 100% rename from cts/schemas/test-2/023-rsc-requires-no-override.ref rename to cts/schemas/test-2/ref/023-rsc-requires-no-override.ref diff --git a/cts/schemas/test-2/024-rsc-requires-no-selfclash.ref b/cts/schemas/test-2/ref/024-rsc-requires-no-selfclash.ref similarity index 100% rename from cts/schemas/test-2/024-rsc-requires-no-selfclash.ref rename to cts/schemas/test-2/ref/024-rsc-requires-no-selfclash.ref diff --git a/cts/schemas/test-2/030-clu-props-plain-rename.ref b/cts/schemas/test-2/ref/030-clu-props-plain-rename.ref similarity index 100% rename from cts/schemas/test-2/030-clu-props-plain-rename.ref rename to cts/schemas/test-2/ref/030-clu-props-plain-rename.ref diff --git a/cts/schemas/test-2/031-clu-props-drop.ref b/cts/schemas/test-2/ref/031-clu-props-drop.ref similarity index 100% rename from cts/schemas/test-2/031-clu-props-drop.ref rename to cts/schemas/test-2/ref/031-clu-props-drop.ref diff --git a/cts/schemas/test-2/032-clu-props-move.ref b/cts/schemas/test-2/ref/032-clu-props-move.ref similarity index 100% rename from cts/schemas/test-2/032-clu-props-move.ref rename to cts/schemas/test-2/ref/032-clu-props-move.ref diff --git a/cts/schemas/test-2/033-clu-props-move-merge.ref b/cts/schemas/test-2/ref/033-clu-props-move-merge.ref similarity index 100% rename from cts/schemas/test-2/033-clu-props-move-merge.ref rename to cts/schemas/test-2/ref/033-clu-props-move-merge.ref diff --git a/cts/schemas/test-2/034-clu-props-move-redef.ref b/cts/schemas/test-2/ref/034-clu-props-move-redef.ref similarity index 100% rename from cts/schemas/test-2/034-clu-props-move-redef.ref rename to cts/schemas/test-2/ref/034-clu-props-move-redef.ref diff --git a/cts/schemas/test-2/040-nodes-rename-type.ref b/cts/schemas/test-2/ref/040-nodes-rename-type.ref similarity index 100% rename from cts/schemas/test-2/040-nodes-rename-type.ref rename to cts/schemas/test-2/ref/040-nodes-rename-type.ref diff --git a/cts/schemas/test-2/050-rsc-attrs-instance-plain-rename.ref b/cts/schemas/test-2/ref/050-rsc-attrs-instance-plain-rename.ref similarity index 100% rename from cts/schemas/test-2/050-rsc-attrs-instance-plain-rename.ref rename to cts/schemas/test-2/ref/050-rsc-attrs-instance-plain-rename.ref diff --git a/cts/schemas/test-2/051-rsc-attrs-instance-pcmk_arg_map.ref b/cts/schemas/test-2/ref/051-rsc-attrs-instance-pcmk_arg_map.ref similarity index 100% rename from cts/schemas/test-2/051-rsc-attrs-instance-pcmk_arg_map.ref rename to cts/schemas/test-2/ref/051-rsc-attrs-instance-pcmk_arg_map.ref diff --git a/cts/schemas/test-2/060-rsc-attrs-meta-isolation.ref b/cts/schemas/test-2/ref/060-rsc-attrs-meta-isolation.ref similarity index 100% rename from cts/schemas/test-2/060-rsc-attrs-meta-isolation.ref rename to cts/schemas/test-2/ref/060-rsc-attrs-meta-isolation.ref diff --git a/cts/schemas/test-2/061-rsc-attrs-meta-exchange.ref b/cts/schemas/test-2/ref/061-rsc-attrs-meta-exchange.ref similarity index 100% rename from cts/schemas/test-2/061-rsc-attrs-meta-exchange.ref rename to cts/schemas/test-2/ref/061-rsc-attrs-meta-exchange.ref diff --git a/cts/schemas/test-2/070-rsc-op-attrs-inst-requires-start.ref b/cts/schemas/test-2/ref/070-rsc-op-attrs-inst-requires-start.ref similarity index 100% rename from cts/schemas/test-2/070-rsc-op-attrs-inst-requires-start.ref rename to cts/schemas/test-2/ref/070-rsc-op-attrs-inst-requires-start.ref diff --git a/cts/schemas/test-2/071-rsc-op-attrs-inst-requires-nonstart.ref b/cts/schemas/test-2/ref/071-rsc-op-attrs-inst-requires-nonstart.ref similarity index 100% rename from cts/schemas/test-2/071-rsc-op-attrs-inst-requires-nonstart.ref rename to cts/schemas/test-2/ref/071-rsc-op-attrs-inst-requires-nonstart.ref diff --git a/cts/schemas/test-2/072-rsc-op-attrs-inst-requires-no-override.ref b/cts/schemas/test-2/ref/072-rsc-op-attrs-inst-requires-no-override.ref similarity index 100% rename from cts/schemas/test-2/072-rsc-op-attrs-inst-requires-no-override.ref rename to cts/schemas/test-2/ref/072-rsc-op-attrs-inst-requires-no-override.ref diff --git a/cts/schemas/test-2/073-rsc-op-attrs-inst-meta-meaning.ref b/cts/schemas/test-2/ref/073-rsc-op-attrs-inst-meta-meaning.ref similarity index 100% rename from cts/schemas/test-2/073-rsc-op-attrs-inst-meta-meaning.ref rename to cts/schemas/test-2/ref/073-rsc-op-attrs-inst-meta-meaning.ref diff --git a/cts/schemas/test-2/001-clu-props.xml b/cts/schemas/test-2/xml/001-clu-props.xml similarity index 100% rename from cts/schemas/test-2/001-clu-props.xml rename to cts/schemas/test-2/xml/001-clu-props.xml diff --git a/cts/schemas/test-2/002-instance_atributes-rsc.xml b/cts/schemas/test-2/xml/002-instance_atributes-rsc.xml similarity index 100% rename from cts/schemas/test-2/002-instance_atributes-rsc.xml rename to cts/schemas/test-2/xml/002-instance_atributes-rsc.xml diff --git a/cts/schemas/test-2/003-instance_atributes-rsc-nonbijective.xml b/cts/schemas/test-2/xml/003-instance_atributes-rsc-nonbijective.xml similarity index 100% rename from cts/schemas/test-2/003-instance_atributes-rsc-nonbijective.xml rename to cts/schemas/test-2/xml/003-instance_atributes-rsc-nonbijective.xml diff --git a/cts/schemas/test-2/004-clu-props-can.xml b/cts/schemas/test-2/xml/004-clu-props-can.xml similarity index 100% rename from cts/schemas/test-2/004-clu-props-can.xml rename to cts/schemas/test-2/xml/004-clu-props-can.xml diff --git a/cts/schemas/test-2/005-clu-props-cannot.xml b/cts/schemas/test-2/xml/005-clu-props-cannot.xml similarity index 100% rename from cts/schemas/test-2/005-clu-props-cannot.xml rename to cts/schemas/test-2/xml/005-clu-props-cannot.xml diff --git a/cts/schemas/test-2/006-instance_atributes-rsc-nonbijective.xml b/cts/schemas/test-2/xml/006-instance_atributes-rsc-nonbijective.xml similarity index 100% rename from cts/schemas/test-2/006-instance_atributes-rsc-nonbijective.xml rename to cts/schemas/test-2/xml/006-instance_atributes-rsc-nonbijective.xml diff --git a/cts/schemas/test-2/007-instance_atributes-rsc-nonbijective.xml b/cts/schemas/test-2/xml/007-instance_atributes-rsc-nonbijective.xml similarity index 100% rename from cts/schemas/test-2/007-instance_atributes-rsc-nonbijective.xml rename to cts/schemas/test-2/xml/007-instance_atributes-rsc-nonbijective.xml diff --git a/cts/schemas/test-2/010-rsc_colocation-dropped-for-noop-sa.xml b/cts/schemas/test-2/xml/010-rsc_colocation-dropped-for-noop-sa.xml similarity index 100% rename from cts/schemas/test-2/010-rsc_colocation-dropped-for-noop-sa.xml rename to cts/schemas/test-2/xml/010-rsc_colocation-dropped-for-noop-sa.xml diff --git a/cts/schemas/test-2/020-rsc-requires-inline.xml b/cts/schemas/test-2/xml/020-rsc-requires-inline.xml similarity index 100% rename from cts/schemas/test-2/020-rsc-requires-inline.xml rename to cts/schemas/test-2/xml/020-rsc-requires-inline.xml diff --git a/cts/schemas/test-2/021-rsc-requires-nvpair.xml b/cts/schemas/test-2/xml/021-rsc-requires-nvpair.xml similarity index 100% rename from cts/schemas/test-2/021-rsc-requires-nvpair.xml rename to cts/schemas/test-2/xml/021-rsc-requires-nvpair.xml diff --git a/cts/schemas/test-2/022-rsc-requires-counterexamples.xml b/cts/schemas/test-2/xml/022-rsc-requires-counterexamples.xml similarity index 100% rename from cts/schemas/test-2/022-rsc-requires-counterexamples.xml rename to cts/schemas/test-2/xml/022-rsc-requires-counterexamples.xml diff --git a/cts/schemas/test-2/023-rsc-requires-no-override.xml b/cts/schemas/test-2/xml/023-rsc-requires-no-override.xml similarity index 100% rename from cts/schemas/test-2/023-rsc-requires-no-override.xml rename to cts/schemas/test-2/xml/023-rsc-requires-no-override.xml diff --git a/cts/schemas/test-2/024-rsc-requires-no-selfclash.xml b/cts/schemas/test-2/xml/024-rsc-requires-no-selfclash.xml similarity index 100% rename from cts/schemas/test-2/024-rsc-requires-no-selfclash.xml rename to cts/schemas/test-2/xml/024-rsc-requires-no-selfclash.xml diff --git a/cts/schemas/test-2/030-clu-props-plain-rename.xml b/cts/schemas/test-2/xml/030-clu-props-plain-rename.xml similarity index 100% rename from cts/schemas/test-2/030-clu-props-plain-rename.xml rename to cts/schemas/test-2/xml/030-clu-props-plain-rename.xml diff --git a/cts/schemas/test-2/031-clu-props-drop.xml b/cts/schemas/test-2/xml/031-clu-props-drop.xml similarity index 100% rename from cts/schemas/test-2/031-clu-props-drop.xml rename to cts/schemas/test-2/xml/031-clu-props-drop.xml diff --git a/cts/schemas/test-2/032-clu-props-move.xml b/cts/schemas/test-2/xml/032-clu-props-move.xml similarity index 100% rename from cts/schemas/test-2/032-clu-props-move.xml rename to cts/schemas/test-2/xml/032-clu-props-move.xml diff --git a/cts/schemas/test-2/033-clu-props-move-merge.xml b/cts/schemas/test-2/xml/033-clu-props-move-merge.xml similarity index 100% rename from cts/schemas/test-2/033-clu-props-move-merge.xml rename to cts/schemas/test-2/xml/033-clu-props-move-merge.xml diff --git a/cts/schemas/test-2/034-clu-props-move-redef.xml b/cts/schemas/test-2/xml/034-clu-props-move-redef.xml similarity index 100% rename from cts/schemas/test-2/034-clu-props-move-redef.xml rename to cts/schemas/test-2/xml/034-clu-props-move-redef.xml diff --git a/cts/schemas/test-2/040-nodes-rename-type.xml b/cts/schemas/test-2/xml/040-nodes-rename-type.xml similarity index 100% rename from cts/schemas/test-2/040-nodes-rename-type.xml rename to cts/schemas/test-2/xml/040-nodes-rename-type.xml diff --git a/cts/schemas/test-2/050-rsc-attrs-instance-plain-rename.xml b/cts/schemas/test-2/xml/050-rsc-attrs-instance-plain-rename.xml similarity index 100% rename from cts/schemas/test-2/050-rsc-attrs-instance-plain-rename.xml rename to cts/schemas/test-2/xml/050-rsc-attrs-instance-plain-rename.xml diff --git a/cts/schemas/test-2/051-rsc-attrs-instance-pcmk_arg_map.xml b/cts/schemas/test-2/xml/051-rsc-attrs-instance-pcmk_arg_map.xml similarity index 100% rename from cts/schemas/test-2/051-rsc-attrs-instance-pcmk_arg_map.xml rename to cts/schemas/test-2/xml/051-rsc-attrs-instance-pcmk_arg_map.xml diff --git a/cts/schemas/test-2/060-rsc-attrs-meta-isolation.xml b/cts/schemas/test-2/xml/060-rsc-attrs-meta-isolation.xml similarity index 100% rename from cts/schemas/test-2/060-rsc-attrs-meta-isolation.xml rename to cts/schemas/test-2/xml/060-rsc-attrs-meta-isolation.xml diff --git a/cts/schemas/test-2/061-rsc-attrs-meta-exchange.xml b/cts/schemas/test-2/xml/061-rsc-attrs-meta-exchange.xml similarity index 100% rename from cts/schemas/test-2/061-rsc-attrs-meta-exchange.xml rename to cts/schemas/test-2/xml/061-rsc-attrs-meta-exchange.xml diff --git a/cts/schemas/test-2/070-rsc-op-attrs-inst-requires-start.xml b/cts/schemas/test-2/xml/070-rsc-op-attrs-inst-requires-start.xml similarity index 100% rename from cts/schemas/test-2/070-rsc-op-attrs-inst-requires-start.xml rename to cts/schemas/test-2/xml/070-rsc-op-attrs-inst-requires-start.xml diff --git a/cts/schemas/test-2/071-rsc-op-attrs-inst-requires-nonstart.xml b/cts/schemas/test-2/xml/071-rsc-op-attrs-inst-requires-nonstart.xml similarity index 100% rename from cts/schemas/test-2/071-rsc-op-attrs-inst-requires-nonstart.xml rename to cts/schemas/test-2/xml/071-rsc-op-attrs-inst-requires-nonstart.xml diff --git a/cts/schemas/test-2/072-rsc-op-attrs-inst-requires-no-override.xml b/cts/schemas/test-2/xml/072-rsc-op-attrs-inst-requires-no-override.xml similarity index 100% rename from cts/schemas/test-2/072-rsc-op-attrs-inst-requires-no-override.xml rename to cts/schemas/test-2/xml/072-rsc-op-attrs-inst-requires-no-override.xml diff --git a/cts/schemas/test-2/073-rsc-op-attrs-inst-meta-meaning.xml b/cts/schemas/test-2/xml/073-rsc-op-attrs-inst-meta-meaning.xml similarity index 100% rename from cts/schemas/test-2/073-rsc-op-attrs-inst-meta-meaning.xml rename to cts/schemas/test-2/xml/073-rsc-op-attrs-inst-meta-meaning.xml