diff --git a/tools/regression.exp b/tools/regression.exp
index d5d65fa01a..e0eacfda00 100755
--- a/tools/regression.exp
+++ b/tools/regression.exp
@@ -1,1654 +1,2437 @@
+=#=#=#= Begin test: 2006-W01-7 =#=#=#=
Date: 2006-01-08 00:00:00Z
-Date: 2006-W01-7 00:00:00Z
+=#=#=#= End test: 2006-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2006-W01-7
+=#=#=#= Begin test: 2006-W01-7 - round-trip =#=#=#=
+Date: 2006-W01-7 00:00:00Z
+=#=#=#= End test: 2006-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2006-W01-7 - round-trip
+=#=#=#= Begin test: 2006-W01-1 =#=#=#=
Date: 2006-01-02 00:00:00Z
-Date: 2006-W01-1 00:00:00Z
+=#=#=#= End test: 2006-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2006-W01-1
+=#=#=#= Begin test: 2006-W01-1 - round-trip =#=#=#=
+Date: 2006-W01-1 00:00:00Z
+=#=#=#= End test: 2006-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2006-W01-1 - round-trip
+=#=#=#= Begin test: 2007-W01-7 =#=#=#=
Date: 2007-01-07 00:00:00Z
-Date: 2007-W01-7 00:00:00Z
+=#=#=#= End test: 2007-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2007-W01-7
+=#=#=#= Begin test: 2007-W01-7 - round-trip =#=#=#=
+Date: 2007-W01-7 00:00:00Z
+=#=#=#= End test: 2007-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2007-W01-7 - round-trip
+=#=#=#= Begin test: 2007-W01-1 =#=#=#=
Date: 2007-01-01 00:00:00Z
-Date: 2007-W01-1 00:00:00Z
+=#=#=#= End test: 2007-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2007-W01-1
+=#=#=#= Begin test: 2007-W01-1 - round-trip =#=#=#=
+Date: 2007-W01-1 00:00:00Z
+=#=#=#= End test: 2007-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2007-W01-1 - round-trip
+=#=#=#= Begin test: 2008-W01-7 =#=#=#=
Date: 2008-01-06 00:00:00Z
-Date: 2008-W01-7 00:00:00Z
+=#=#=#= End test: 2008-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2008-W01-7
+=#=#=#= Begin test: 2008-W01-7 - round-trip =#=#=#=
+Date: 2008-W01-7 00:00:00Z
+=#=#=#= End test: 2008-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2008-W01-7 - round-trip
+=#=#=#= Begin test: 2008-W01-1 =#=#=#=
Date: 2007-12-31 00:00:00Z
-Date: 2008-W01-1 00:00:00Z
+=#=#=#= End test: 2008-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2008-W01-1
+=#=#=#= Begin test: 2008-W01-1 - round-trip =#=#=#=
+Date: 2008-W01-1 00:00:00Z
+=#=#=#= End test: 2008-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2008-W01-1 - round-trip
+=#=#=#= Begin test: 2009-W01-7 =#=#=#=
Date: 2009-01-04 00:00:00Z
-Date: 2009-W01-7 00:00:00Z
+=#=#=#= End test: 2009-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2009-W01-7
+=#=#=#= Begin test: 2009-W01-7 - round-trip =#=#=#=
+Date: 2009-W01-7 00:00:00Z
+=#=#=#= End test: 2009-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2009-W01-7 - round-trip
+=#=#=#= Begin test: 2009-W01-1 =#=#=#=
Date: 2008-12-29 00:00:00Z
-Date: 2009-W01-1 00:00:00Z
+=#=#=#= End test: 2009-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2009-W01-1
+=#=#=#= Begin test: 2009-W01-1 - round-trip =#=#=#=
+Date: 2009-W01-1 00:00:00Z
+=#=#=#= End test: 2009-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2009-W01-1 - round-trip
+=#=#=#= Begin test: 2010-W01-7 =#=#=#=
Date: 2010-01-10 00:00:00Z
-Date: 2010-W01-7 00:00:00Z
+=#=#=#= End test: 2010-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2010-W01-7
+=#=#=#= Begin test: 2010-W01-7 - round-trip =#=#=#=
+Date: 2010-W01-7 00:00:00Z
+=#=#=#= End test: 2010-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2010-W01-7 - round-trip
+=#=#=#= Begin test: 2010-W01-1 =#=#=#=
Date: 2010-01-04 00:00:00Z
-Date: 2010-W01-1 00:00:00Z
+=#=#=#= End test: 2010-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2010-W01-1
+=#=#=#= Begin test: 2010-W01-1 - round-trip =#=#=#=
+Date: 2010-W01-1 00:00:00Z
+=#=#=#= End test: 2010-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2010-W01-1 - round-trip
+=#=#=#= Begin test: 2011-W01-7 =#=#=#=
Date: 2011-01-09 00:00:00Z
-Date: 2011-W01-7 00:00:00Z
+=#=#=#= End test: 2011-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2011-W01-7
+=#=#=#= Begin test: 2011-W01-7 - round-trip =#=#=#=
+Date: 2011-W01-7 00:00:00Z
+=#=#=#= End test: 2011-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2011-W01-7 - round-trip
+=#=#=#= Begin test: 2011-W01-1 =#=#=#=
Date: 2011-01-03 00:00:00Z
-Date: 2011-W01-1 00:00:00Z
+=#=#=#= End test: 2011-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2011-W01-1
+=#=#=#= Begin test: 2011-W01-1 - round-trip =#=#=#=
+Date: 2011-W01-1 00:00:00Z
+=#=#=#= End test: 2011-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2011-W01-1 - round-trip
+=#=#=#= Begin test: 2012-W01-7 =#=#=#=
Date: 2012-01-08 00:00:00Z
-Date: 2012-W01-7 00:00:00Z
+=#=#=#= End test: 2012-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2012-W01-7
+=#=#=#= Begin test: 2012-W01-7 - round-trip =#=#=#=
+Date: 2012-W01-7 00:00:00Z
+=#=#=#= End test: 2012-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2012-W01-7 - round-trip
+=#=#=#= Begin test: 2012-W01-1 =#=#=#=
Date: 2012-01-02 00:00:00Z
-Date: 2012-W01-1 00:00:00Z
+=#=#=#= End test: 2012-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2012-W01-1
+=#=#=#= Begin test: 2012-W01-1 - round-trip =#=#=#=
+Date: 2012-W01-1 00:00:00Z
+=#=#=#= End test: 2012-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2012-W01-1 - round-trip
+=#=#=#= Begin test: 2013-W01-7 =#=#=#=
Date: 2013-01-06 00:00:00Z
-Date: 2013-W01-7 00:00:00Z
+=#=#=#= End test: 2013-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2013-W01-7
+=#=#=#= Begin test: 2013-W01-7 - round-trip =#=#=#=
+Date: 2013-W01-7 00:00:00Z
+=#=#=#= End test: 2013-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2013-W01-7 - round-trip
+=#=#=#= Begin test: 2013-W01-1 =#=#=#=
Date: 2012-12-31 00:00:00Z
-Date: 2013-W01-1 00:00:00Z
+=#=#=#= End test: 2013-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2013-W01-1
+=#=#=#= Begin test: 2013-W01-1 - round-trip =#=#=#=
+Date: 2013-W01-1 00:00:00Z
+=#=#=#= End test: 2013-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2013-W01-1 - round-trip
+=#=#=#= Begin test: 2014-W01-7 =#=#=#=
Date: 2014-01-05 00:00:00Z
-Date: 2014-W01-7 00:00:00Z
+=#=#=#= End test: 2014-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2014-W01-7
+=#=#=#= Begin test: 2014-W01-7 - round-trip =#=#=#=
+Date: 2014-W01-7 00:00:00Z
+=#=#=#= End test: 2014-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2014-W01-7 - round-trip
+=#=#=#= Begin test: 2014-W01-1 =#=#=#=
Date: 2013-12-30 00:00:00Z
-Date: 2014-W01-1 00:00:00Z
+=#=#=#= End test: 2014-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2014-W01-1
+=#=#=#= Begin test: 2014-W01-1 - round-trip =#=#=#=
+Date: 2014-W01-1 00:00:00Z
+=#=#=#= End test: 2014-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2014-W01-1 - round-trip
+=#=#=#= Begin test: 2015-W01-7 =#=#=#=
Date: 2015-01-04 00:00:00Z
-Date: 2015-W01-7 00:00:00Z
+=#=#=#= End test: 2015-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2015-W01-7
+=#=#=#= Begin test: 2015-W01-7 - round-trip =#=#=#=
+Date: 2015-W01-7 00:00:00Z
+=#=#=#= End test: 2015-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2015-W01-7 - round-trip
+=#=#=#= Begin test: 2015-W01-1 =#=#=#=
Date: 2014-12-29 00:00:00Z
-Date: 2015-W01-1 00:00:00Z
+=#=#=#= End test: 2015-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2015-W01-1
+=#=#=#= Begin test: 2015-W01-1 - round-trip =#=#=#=
+Date: 2015-W01-1 00:00:00Z
+=#=#=#= End test: 2015-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2015-W01-1 - round-trip
+=#=#=#= Begin test: 2016-W01-7 =#=#=#=
Date: 2016-01-10 00:00:00Z
-Date: 2016-W01-7 00:00:00Z
+=#=#=#= End test: 2016-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2016-W01-7
+=#=#=#= Begin test: 2016-W01-7 - round-trip =#=#=#=
+Date: 2016-W01-7 00:00:00Z
+=#=#=#= End test: 2016-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2016-W01-7 - round-trip
+=#=#=#= Begin test: 2016-W01-1 =#=#=#=
Date: 2016-01-04 00:00:00Z
-Date: 2016-W01-1 00:00:00Z
+=#=#=#= End test: 2016-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2016-W01-1
+=#=#=#= Begin test: 2016-W01-1 - round-trip =#=#=#=
+Date: 2016-W01-1 00:00:00Z
+=#=#=#= End test: 2016-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2016-W01-1 - round-trip
+=#=#=#= Begin test: 2017-W01-7 =#=#=#=
Date: 2017-01-08 00:00:00Z
-Date: 2017-W01-7 00:00:00Z
+=#=#=#= End test: 2017-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2017-W01-7
+=#=#=#= Begin test: 2017-W01-7 - round-trip =#=#=#=
+Date: 2017-W01-7 00:00:00Z
+=#=#=#= End test: 2017-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2017-W01-7 - round-trip
+=#=#=#= Begin test: 2017-W01-1 =#=#=#=
Date: 2017-01-02 00:00:00Z
-Date: 2017-W01-1 00:00:00Z
+=#=#=#= End test: 2017-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2017-W01-1
+=#=#=#= Begin test: 2017-W01-1 - round-trip =#=#=#=
+Date: 2017-W01-1 00:00:00Z
+=#=#=#= End test: 2017-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2017-W01-1 - round-trip
+=#=#=#= Begin test: 2018-W01-7 =#=#=#=
Date: 2018-01-07 00:00:00Z
-Date: 2018-W01-7 00:00:00Z
+=#=#=#= End test: 2018-W01-7 - OK (0) =#=#=#=
* Passed: iso8601 - 2018-W01-7
+=#=#=#= Begin test: 2018-W01-7 - round-trip =#=#=#=
+Date: 2018-W01-7 00:00:00Z
+=#=#=#= End test: 2018-W01-7 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2018-W01-7 - round-trip
+=#=#=#= Begin test: 2018-W01-1 =#=#=#=
Date: 2018-01-01 00:00:00Z
-Date: 2018-W01-1 00:00:00Z
+=#=#=#= End test: 2018-W01-1 - OK (0) =#=#=#=
* Passed: iso8601 - 2018-W01-1
+=#=#=#= Begin test: 2018-W01-1 - round-trip =#=#=#=
+Date: 2018-W01-1 00:00:00Z
+=#=#=#= End test: 2018-W01-1 - round-trip - OK (0) =#=#=#=
+* Passed: iso8601 - 2018-W01-1 - round-trip
+=#=#=#= Begin test: 2009-W53-07 =#=#=#=
Date: 2009-W53-7 00:00:00Z
+=#=#=#= End test: 2009-W53-07 - OK (0) =#=#=#=
* Passed: iso8601 - 2009-W53-07
+=#=#=#= Begin test: 2009-01-31 + 1 Month =#=#=#=
Date: 2009-01-31 00:00:00Z
Duration: 0000-01-00 00:00:00Z
Duration ends at: 2009-02-28 00:00:00Z
+=#=#=#= End test: 2009-01-31 + 1 Month - OK (0) =#=#=#=
* Passed: iso8601 - 2009-01-31 + 1 Month
+=#=#=#= Begin test: 2009-01-31 + 2 Months =#=#=#=
Date: 2009-01-31 00:00:00Z
Duration: 0000-02-00 00:00:00Z
Duration ends at: 2009-03-31 00:00:00Z
+=#=#=#= End test: 2009-01-31 + 2 Months - OK (0) =#=#=#=
* Passed: iso8601 - 2009-01-31 + 2 Months
+=#=#=#= Begin test: 2009-01-31 + 3 Months =#=#=#=
Date: 2009-01-31 00:00:00Z
Duration: 0000-03-00 00:00:00Z
Duration ends at: 2009-04-30 00:00:00Z
+=#=#=#= End test: 2009-01-31 + 3 Months - OK (0) =#=#=#=
* Passed: iso8601 - 2009-01-31 + 3 Months
+=#=#=#= Begin test: 2009-03-31 - 1 Month =#=#=#=
Date: 2009-03-31 00:00:00Z
Duration: 0000--01-00 00:00:00Z
Duration ends at: 2009-02-28 00:00:00Z
+=#=#=#= End test: 2009-03-31 - 1 Month - OK (0) =#=#=#=
* Passed: iso8601 - 2009-03-31 - 1 Month
Setting up shadow instance
A new shadow instance was created. To begin using it paste the following into your shell:
CIB_shadow=tools-regression ; export CIB_shadow
+=#=#=#= Begin test: Validate CIB =#=#=#=
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Validate CIB - OK (0) =#=#=#=
+* Passed: cibadmin - Validate CIB
+=#=#=#= Begin test: Require --force for CIB erasure =#=#=#=
The supplied command is considered dangerous. To prevent accidental destruction of the cluster, the --force flag is required in order to proceed.
+=#=#=#= End test: Require --force for CIB erasure - Invalid argument (22) =#=#=#=
* Passed: cibadmin - Require --force for CIB erasure
+=#=#=#= Begin test: Allow CIB erasure with --force =#=#=#=
+=#=#=#= End test: Allow CIB erasure with --force - OK (0) =#=#=#=
* Passed: cibadmin - Allow CIB erasure with --force
+=#=#=#= Begin test: Query CIB =#=#=#=
+=#=#=#= End test: Query CIB - OK (0) =#=#=#=
* Passed: cibadmin - Query CIB
+=#=#=#= Begin test: Set cluster option =#=#=#=
+=#=#=#= End test: Set cluster option - OK (0) =#=#=#=
* Passed: crm_attribute - Set cluster option
+=#=#=#= Begin test: Query new cluster option =#=#=#=
+=#=#=#= End test: Query new cluster option - OK (0) =#=#=#=
* Passed: cibadmin - Query new cluster option
+=#=#=#= Begin test: Query cluster options =#=#=#=
+=#=#=#= End test: Query cluster options - OK (0) =#=#=#=
* Passed: cibadmin - Query cluster options
+=#=#=#= Begin test: Set no-quorum policy =#=#=#=
-
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Set no-quorum policy - OK (0) =#=#=#=
+* Passed: crm_attribute - Set no-quorum policy
+=#=#=#= Begin test: Delete nvpair =#=#=#=
+
+
+
+
+
+
+=#=#=#= End test: Delete nvpair - OK (0) =#=#=#=
* Passed: cibadmin - Delete nvpair
+=#=#=#= Begin test: Create operaton should fail =#=#=#=
Call failed: Name not unique on network
-
+
-
+
+
+
-* Passed: cibadmin - Create operaton should fail with: -76, The object already exists
-
+=#=#=#= End test: Create operaton should fail - Name not unique on network (76) =#=#=#=
+* Passed: cibadmin - Create operaton should fail
+=#=#=#= Begin test: Modify cluster options section =#=#=#=
+
+
+=#=#=#= End test: Modify cluster options section - OK (0) =#=#=#=
* Passed: cibadmin - Modify cluster options section
+=#=#=#= Begin test: Query updated cluster option =#=#=#=
-
+
+
+=#=#=#= End test: Query updated cluster option - OK (0) =#=#=#=
* Passed: cibadmin - Query updated cluster option
-
+=#=#=#= Begin test: Set duplicate cluster option =#=#=#=
+
+
+=#=#=#= End test: Set duplicate cluster option - OK (0) =#=#=#=
* Passed: crm_attribute - Set duplicate cluster option
-Please choose from one of the matches above and suppy the 'id' with --attr-id
-
+=#=#=#= Begin test: Setting multiply defined cluster option should fail =#=#=#=
+Error performing operation: Name not unique on network
+Multiple attributes match name=cluster-delay
+ Value: 60s (id=cib-bootstrap-options-cluster-delay)
+ Value: 40s (id=duplicate-cluster-delay)
+
+
-* Passed: crm_attribute - Setting multiply defined cluster option should fail with -216, Could not set cluster option
-
+=#=#=#= End test: Setting multiply defined cluster option should fail - Name not unique on network (76) =#=#=#=
+* Passed: crm_attribute - Setting multiply defined cluster option should fail
+=#=#=#= Begin test: Set cluster option with -s =#=#=#=
+
+
+=#=#=#= End test: Set cluster option with -s - OK (0) =#=#=#=
* Passed: crm_attribute - Set cluster option with -s
+=#=#=#= Begin test: Delete cluster option with -i =#=#=#=
Deleted crm_config option: id=(null) name=cluster-delay
-
+
-
+
+
+
+=#=#=#= End test: Delete cluster option with -i - OK (0) =#=#=#=
* Passed: crm_attribute - Delete cluster option with -i
-
+=#=#=#= Begin test: Create node1 and bring it online =#=#=#=
+
+Current cluster status:
+
+
+Performing requested modifications
+ + Bringing node node1 online
+
+Transition Summary:
+
+Executing cluster transition:
+
+Revised cluster status:
+Online: [ node1 ]
+
+
+
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-* Passed: cibadmin - Create node entry
-
-
-
-
-
+
-
+
-* Passed: cibadmin - Create node status entry
-
+=#=#=#= End test: Create node1 and bring it online - OK (0) =#=#=#=
+* Passed: crm_simulate - Create node1 and bring it online
+=#=#=#= Begin test: Create node attribute =#=#=#=
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Create node attribute - OK (0) =#=#=#=
* Passed: crm_attribute - Create node attribute
-
-
+=#=#=#= Begin test: Query new node attribute =#=#=#=
+
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Query new node attribute - OK (0) =#=#=#=
* Passed: cibadmin - Query new node attribute
-Digest:
+=#=#=#= Begin test: Digest calculation =#=#=#=
+Digest:
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Digest calculation - OK (0) =#=#=#=
* Passed: cibadmin - Digest calculation
+=#=#=#= Begin test: Replace operation should fail =#=#=#=
Call failed: Update was older than existing configuration
-
+
-
+
+
+
-
-
-
+
+
+
-
+
-* Passed: cibadmin - Replace operation should fail with: 205, Update was older than existing configuration
+=#=#=#= End test: Replace operation should fail - Update was older than existing configuration (205) =#=#=#=
+* Passed: cibadmin - Replace operation should fail
+=#=#=#= Begin test: Default standby value =#=#=#=
Error performing operation: No such device or address
scope=status name=standby value=off
-
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Default standby value - OK (0) =#=#=#=
* Passed: crm_standby - Default standby value
-
+=#=#=#= Begin test: Set standby status =#=#=#=
+
-
+
+
+
-
-
-
-
+
+
+
+
-
+
+=#=#=#= End test: Set standby status - OK (0) =#=#=#=
* Passed: crm_standby - Set standby status
+=#=#=#= Begin test: Query standby value =#=#=#=
scope=nodes name=standby value=true
-
+
-
+
+
+
-
-
-
-
+
+
+
+
-
+
+=#=#=#= End test: Query standby value - OK (0) =#=#=#=
* Passed: crm_standby - Query standby value
-Deleted nodes attribute: id=nodes-clusterNode-UUID-standby name=standby
+=#=#=#= Begin test: Delete standby value =#=#=#=
+Deleted nodes attribute: id=nodes-node1-standby name=standby
Could not establish attrd connection: Connection refused (111)
Could not establish attrd connection: Connection refused (111)
Could not establish attrd connection: Connection refused (111)
Could not establish attrd connection: Connection refused (111)
Could not establish attrd connection: Connection refused (111)
-
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Delete standby value - OK (0) =#=#=#=
* Passed: crm_standby - Delete standby value
-
+=#=#=#= Begin test: Create a resource =#=#=#=
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Create a resource - OK (0) =#=#=#=
* Passed: cibadmin - Create a resource
-
+=#=#=#= Begin test: Create a resource meta attribute =#=#=#=
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Create a resource meta attribute - OK (0) =#=#=#=
* Passed: crm_resource - Create a resource meta attribute
+=#=#=#= Begin test: Query a resource meta attribute =#=#=#=
false
-
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Query a resource meta attribute - OK (0) =#=#=#=
* Passed: crm_resource - Query a resource meta attribute
+=#=#=#= Begin test: Remove a resource meta attribute =#=#=#=
Deleted dummy option: id=dummy-meta_attributes-is-managed name=is-managed
-
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Remove a resource meta attribute - OK (0) =#=#=#=
* Passed: crm_resource - Remove a resource meta attribute
-
+=#=#=#= Begin test: Create a resource attribute =#=#=#=
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: Create a resource attribute - OK (0) =#=#=#=
* Passed: crm_resource - Create a resource attribute
+=#=#=#= Begin test: List the configured resources =#=#=#=
dummy (ocf::pacemaker:Dummy): Stopped
-
+
-
+
+
+
-
-
-
+
+
+
-
+
+=#=#=#= End test: List the configured resources - OK (0) =#=#=#=
* Passed: crm_resource - List the configured resources
+=#=#=#= Begin test: Set a resource's fail-count =#=#=#=
Could not establish attrd connection: Connection refused (111)
Could not establish attrd connection: Connection refused (111)
Could not establish attrd connection: Connection refused (111)
Could not establish attrd connection: Connection refused (111)
Could not establish attrd connection: Connection refused (111)
-
+
-
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-* Passed: crm_resource - Set a resource's fail-count
+=#=#=#= End test: Set a resource's fail-count - OK (0) =#=#=#=
+* Passed: crm_failcount - Set a resource's fail-count
+=#=#=#= Begin test: Require a destination when migrating a resource that is stopped =#=#=#=
Resource 'dummy' not moved: active in 0 locations.
You can prevent 'dummy' from running on a specific location with: --ban --host
Error performing operation: Invalid argument
-
+
-
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
+=#=#=#= End test: Require a destination when migrating a resource that is stopped - Unknown error (234) =#=#=#=
* Passed: crm_resource - Require a destination when migrating a resource that is stopped
+=#=#=#= Begin test: Don't support migration to non-existant locations =#=#=#=
Error performing operation: node 'i.dont.exist' is unknown
Error performing operation: No such device or address
-
+
-
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
+=#=#=#= End test: Don't support migration to non-existant locations - Unknown error (250) =#=#=#=
* Passed: crm_resource - Don't support migration to non-existant locations
-
+=#=#=#= Begin test: Create a fencing resource =#=#=#=
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
+
-
-
-
-
+
+
+
+
-* Passed: crm_resource - Migrate a resource
-
+=#=#=#= End test: Create a fencing resource - OK (0) =#=#=#=
+* Passed: cibadmin - Create a fencing resource
+=#=#=#= Begin test: Bring resources online =#=#=#=
+
+Current cluster status:
+Online: [ node1 ]
+
+ dummy (ocf::pacemaker:Dummy): Stopped
+ Fence (stonith:fence_true): Stopped
+
+Transition Summary:
+ * Start dummy (node1)
+ * Start Fence (node1)
+
+Executing cluster transition:
+ * Resource action: dummy monitor on node1
+ * Resource action: Fence monitor on node1
+ * Pseudo action: probe_complete
+ * Resource action: dummy start on node1
+ * Resource action: Fence start on node1
+
+Revised cluster status:
+Online: [ node1 ]
+
+ dummy (ocf::pacemaker:Dummy): Started node1
+ Fence (stonith:fence_true): Started node1
+
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-* Passed: crm_resource - Un-migrate a resource
-false
-
+=#=#=#= End test: Bring resources online - OK (0) =#=#=#=
+* Passed: crm_simulate - Bring resources online
+=#=#=#= Begin test: Try to move a resource to its existing location =#=#=#=
+Error performing operation: dummy is already active on node1
+Error performing operation: Invalid argument
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-* Passed: crm_ticket - Default ticket granted state
-
+=#=#=#= End test: Try to move a resource to its existing location - Unknown error (234) =#=#=#=
+* Passed: crm_resource - Try to move a resource to its existing location
+=#=#=#= Begin test: Move a resource from its existing location =#=#=#=
+WARNING: Creating rsc_location constraint 'cli-ban-dummy-on-node1' with a score of -INFINITY for resource dummy on node1.
+ This will prevent dummy from running on node1 until the constraint is removed using the 'crm_resource --clear' command or manually with cibadmin
+ This will be the case even if node1 is the last node in the cluster
+ This message can be disabled with --quiet
+
-
+
+
+
-
-
-
+
+
+
+
-
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-* Passed: crm_ticket - Set ticket granted state
-false
-
+=#=#=#= End test: Move a resource from its existing location - OK (0) =#=#=#=
+* Passed: crm_resource - Move a resource from its existing location
+=#=#=#= Begin test: Clear out constraints generated by --move =#=#=#=
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Clear out constraints generated by --move - OK (0) =#=#=#=
+* Passed: crm_resource - Clear out constraints generated by --move
+=#=#=#= Begin test: Default ticket granted state =#=#=#=
+false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Default ticket granted state - OK (0) =#=#=#=
+* Passed: crm_ticket - Default ticket granted state
+=#=#=#= Begin test: Set ticket granted state =#=#=#=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Set ticket granted state - OK (0) =#=#=#=
+* Passed: crm_ticket - Set ticket granted state
+=#=#=#= Begin test: Query ticket granted state =#=#=#=
+false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Query ticket granted state - OK (0) =#=#=#=
* Passed: crm_ticket - Query ticket granted state
+=#=#=#= Begin test: Delete ticket granted state =#=#=#=
Deleted ticketA state attribute: name=granted
-
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Delete ticket granted state - OK (0) =#=#=#=
* Passed: crm_ticket - Delete ticket granted state
-
+=#=#=#= Begin test: Make a ticket standby =#=#=#=
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Make a ticket standby - OK (0) =#=#=#=
* Passed: crm_ticket - Make a ticket standby
+=#=#=#= Begin test: Query ticket standby state =#=#=#=
true
-
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Query ticket standby state - OK (0) =#=#=#=
* Passed: crm_ticket - Query ticket standby state
-
+=#=#=#= Begin test: Activate a ticket =#=#=#=
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Activate a ticket - OK (0) =#=#=#=
* Passed: crm_ticket - Activate a ticket
+=#=#=#= Begin test: Delete ticket standby state =#=#=#=
Deleted ticketA state attribute: name=standby
-
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Delete ticket standby state - OK (0) =#=#=#=
* Passed: crm_ticket - Delete ticket standby state
-Error performing operation: node 'node1' is unknown
+=#=#=#= Begin test: Ban a resource on unknown node =#=#=#=
+Error performing operation: node 'host1' is unknown
Error performing operation: No such device or address
-
+
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Ban a resource on unknown node - Unknown error (250) =#=#=#=
* Passed: crm_resource - Ban a resource on unknown node
+=#=#=#= Begin test: Create two more nodes and bring them online =#=#=#=
Current cluster status:
-Node clusterNode-UNAME (clusterNode-UUID): UNCLEAN (offline)
+Online: [ node1 ]
- dummy (ocf::pacemaker:Dummy): Stopped
+ dummy (ocf::pacemaker:Dummy): Started node1
+ Fence (stonith:fence_true): Started node1
Performing requested modifications
- + Bringing node node1 online
+ Bringing node node2 online
+ Bringing node node3 online
Transition Summary:
+ * Move Fence (Started node1 -> node2)
Executing cluster transition:
* Resource action: dummy monitor on node3
* Resource action: dummy monitor on node2
- * Resource action: dummy monitor on node1
+ * Resource action: Fence monitor on node3
+ * Resource action: Fence monitor on node2
* Pseudo action: probe_complete
+ * Resource action: Fence stop on node1
+ * Pseudo action: all_stopped
+ * Resource action: Fence start on node2
Revised cluster status:
-Node clusterNode-UNAME (clusterNode-UUID): UNCLEAN (offline)
Online: [ node1 node2 node3 ]
- dummy (ocf::pacemaker:Dummy): Stopped
+ dummy (ocf::pacemaker:Dummy): Started node1
+ Fence (stonith:fence_true): Started node2
-
+
-
+
+
+
-
-
-
+
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-* Passed: crm_simulate - Create three nodes and bring them online
+=#=#=#= End test: Create two more nodes and bring them online - OK (0) =#=#=#=
+* Passed: crm_simulate - Create two more nodes and bring them online
+=#=#=#= Begin test: Ban dummy from node1 =#=#=#=
WARNING: Creating rsc_location constraint 'cli-ban-dummy-on-node1' with a score of -INFINITY for resource dummy on node1.
This will prevent dummy from running on node1 until the constraint is removed using the 'crm_resource --clear' command or manually with cibadmin
This will be the case even if node1 is the last node in the cluster
This message can be disabled with --quiet
-
+
-
+
+
+
-
-
-
+
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Ban dummy from node1 - OK (0) =#=#=#=
* Passed: crm_resource - Ban dummy from node1
+=#=#=#= Begin test: Ban dummy from node2 =#=#=#=
WARNING: Creating rsc_location constraint 'cli-ban-dummy-on-node2' with a score of -INFINITY for resource dummy on node2.
This will prevent dummy from running on node2 until the constraint is removed using the 'crm_resource --clear' command or manually with cibadmin
This will be the case even if node2 is the last node in the cluster
This message can be disabled with --quiet
-
+
-
+
+
+
-
-
-
+
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Ban dummy from node2 - OK (0) =#=#=#=
* Passed: crm_resource - Ban dummy from node2
-
+=#=#=#= Begin test: Relocate resources due to ban =#=#=#=
+
+Current cluster status:
+Online: [ node1 node2 node3 ]
+
+ dummy (ocf::pacemaker:Dummy): Started node1
+ Fence (stonith:fence_true): Started node2
+
+Transition Summary:
+ * Move dummy (Started node1 -> node3)
+
+Executing cluster transition:
+ * Resource action: dummy stop on node1
+ * Pseudo action: all_stopped
+ * Resource action: dummy start on node3
+
+Revised cluster status:
+Online: [ node1 node2 node3 ]
+
+ dummy (ocf::pacemaker:Dummy): Started node3
+ Fence (stonith:fence_true): Started node2
+
+
-
+
+
+
-
-
-
+
+
+
-
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
-* Passed: crm_resource - Move dummy to node1
+=#=#=#= End test: Relocate resources due to ban - OK (0) =#=#=#=
+* Passed: crm_simulate - Relocate resources due to ban
+=#=#=#= Begin test: Move dummy to node1 =#=#=#=
-
+
+
+
-
-
-
+
+
+
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=#=#=#= End test: Move dummy to node1 - OK (0) =#=#=#=
+* Passed: crm_resource - Move dummy to node1
+=#=#=#= Begin test: Clear implicit constraints for dummy on node2 =#=#=#=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+=#=#=#= End test: Clear implicit constraints for dummy on node2 - OK (0) =#=#=#=
* Passed: crm_resource - Clear implicit constraints for dummy on node2
diff --git a/tools/regression.sh b/tools/regression.sh
index 3cb4c32dc2..57a3d513fd 100755
--- a/tools/regression.sh
+++ b/tools/regression.sh
@@ -1,275 +1,362 @@
#!/bin/bash
: ${shadow=tools-regression}
test_home=`dirname $0`
num_errors=0
num_passed=0
GREP_OPTIONS=
-function assert() {
- rc=$1; shift
+function test_assert() {
target=$1; shift
- app=$1; shift
- msg=$1; shift
cib=$1; shift
+ app=`echo "$cmd" | sed 's/\ .*//'`
+ printf "* Running: $app - $desc\n" 1>&2
- if [ x$cib = x0 ]; then
- : nothing
- else
+ printf "=#=#=#= Begin test: $desc =#=#=#=\n"
+ eval $VALGRIND_CMD $cmd 2>&1
+ rc=$?
+
+ if [ x$cib != x0 ]; then
cibadmin -Q
fi
+ printf "=#=#=#= End test: $desc - `crm_error $rc` ($rc) =#=#=#=\n"
+
if [ $rc -ne $target ]; then
num_errors=`expr $num_errors + 1`
- printf "* Failed (rc=%.3d): %-14s - %s\n" $rc $app "$msg"
- printf "* Failed (rc=%.3d): %-14s - %s\n" $rc $app "$msg" 1>&2
+ printf "* Failed (rc=%.3d): %-14s - %s\n" $rc $app "$desc"
+ printf "* Failed (rc=%.3d): %-14s - %s\n" $rc $app "$desc" 1>&2
return
exit 1
else
- printf "* Passed: %-14s - %s\n" $app "$msg"
- printf "* Passed: %-14s - %s\n" $app "$msg" 1>&2
+ printf "* Passed: %-14s - %s\n" $app "$desc"
num_passed=`expr $num_passed + 1`
fi
}
function usage() {
echo "Usage: ./regression.sh [-s(ave)] [-x] [-v(erbose)]"
exit $1
}
done=0
do_save=0
VALGRIND_CMD=
while test "$done" = "0"; do
case "$1" in
-V|--verbose) verbose=1; shift;;
-v|--valgrind)
export G_SLICE=always-malloc
VALGRIND_CMD="valgrind -q --show-reachable=no --leak-check=full --trace-children=no --time-stamp=yes --num-callers=20 --suppressions=/usr/share/pacemaker/tests/valgrind-pcmk.suppressions"
shift;;
-x) set -x; shift;;
-s) do_save=1; shift;;
-p) PATH="$2:$PATH"; export PATH; shift 1;;
-?) usage 0;;
-*) echo "unknown option: $1"; usage 1;;
*) done=1;;
esac
done
if [ "x$VALGRIND_CMD" = "x" -a -x $test_home/crm_simulate ]; then
echo "Using local binaries from: $test_home"
PATH="$test_home:$PATH"
fi
function test_tools() {
export CIB_shadow_dir=$test_home
$VALGRIND_CMD crm_shadow --batch --force --create-empty $shadow 2>&1
export CIB_shadow=$shadow
- $VALGRIND_CMD cibadmin -Q 2>&1
-
- $VALGRIND_CMD cibadmin -E 2>&1
- assert $? 22 cibadmin "Require --force for CIB erasure"
-
- $VALGRIND_CMD cibadmin -E --force
- assert $? 0 cibadmin "Allow CIB erasure with --force"
-
- $VALGRIND_CMD cibadmin -Q > /tmp/$$.existing.xml
- assert $? 0 cibadmin "Query CIB"
-
- $VALGRIND_CMD crm_attribute -n cluster-delay -v 60s
- assert $? 0 crm_attribute "Set cluster option"
-
- $VALGRIND_CMD cibadmin -Q -o crm_config | grep cib-bootstrap-options-cluster-delay
- assert $? 0 cibadmin "Query new cluster option"
-
- $VALGRIND_CMD cibadmin -Q -o crm_config > /tmp/$$.opt.xml
- assert $? 0 cibadmin "Query cluster options"
-
- $VALGRIND_CMD cibadmin -D -o crm_config --xml-text ''
- assert $? 0 cibadmin "Delete nvpair"
-
- $VALGRIND_CMD cibadmin -C -o crm_config --xml-file /tmp/$$.opt.xml 2>&1
- assert $? 76 cibadmin "Create operaton should fail with: -76, The object already exists"
-
- $VALGRIND_CMD cibadmin -M -o crm_config --xml-file /tmp/$$.opt.xml
- assert $? 0 cibadmin "Modify cluster options section"
-
- $VALGRIND_CMD cibadmin -Q -o crm_config | grep cib-bootstrap-options-cluster-delay
- assert $? 0 cibadmin "Query updated cluster option"
-
- $VALGRIND_CMD crm_attribute -n cluster-delay -v 40s -s duplicate
- assert $? 0 crm_attribute "Set duplicate cluster option"
-
- $VALGRIND_CMD crm_attribute -n cluster-delay -v 30s
- assert $? 234 crm_attribute "Setting multiply defined cluster option should fail with -216, Could not set cluster option"
-
- $VALGRIND_CMD crm_attribute -n cluster-delay -v 30s -s duplicate
- assert $? 0 crm_attribute "Set cluster option with -s"
-
- $VALGRIND_CMD crm_attribute -n cluster-delay -D -i cib-bootstrap-options-cluster-delay
- assert $? 0 crm_attribute "Delete cluster option with -i"
-
- $VALGRIND_CMD cibadmin -C -o nodes --xml-text ''
- assert $? 0 cibadmin "Create node entry"
-
- $VALGRIND_CMD cibadmin -C -o status --xml-text ''
- assert $? 0 cibadmin "Create node status entry"
-
- $VALGRIND_CMD crm_attribute -n ram -v 1024M -U clusterNode-UNAME -t nodes
- assert $? 0 crm_attribute "Create node attribute"
-
- $VALGRIND_CMD cibadmin -Q -o nodes | grep clusterNode-UUID-ram
- assert $? 0 cibadmin "Query new node attribute"
- $VALGRIND_CMD cibadmin -Q | cibadmin -5 -p 2>&1 > /dev/null
- assert $? 0 cibadmin "Digest calculation"
+ desc="Validate CIB"
+ cmd="cibadmin -Q"
+ test_assert 0
- # This update will fail because it has version numbers
- $VALGRIND_CMD cibadmin -R --xml-file /tmp/$$.existing.xml 2>&1
- assert $? 205 cibadmin "Replace operation should fail with: 205, Update was older than existing configuration"
-
- crm_standby -N clusterNode-UNAME -G
- assert $? 0 crm_standby "Default standby value"
-
- crm_standby -N clusterNode-UNAME -v true
- assert $? 0 crm_standby "Set standby status"
-
- crm_standby -N clusterNode-UNAME -G
- assert $? 0 crm_standby "Query standby value"
-
- crm_standby -N clusterNode-UNAME -D 2>&1
- assert $? 0 crm_standby "Delete standby value"
-
- $VALGRIND_CMD cibadmin -C -o resources --xml-text ''
- assert $? 0 cibadmin "Create a resource"
+ desc="Require --force for CIB erasure"
+ cmd="cibadmin -E"
+ test_assert 22
- $VALGRIND_CMD crm_resource -r dummy --meta -p is-managed -v false
- assert $? 0 crm_resource "Create a resource meta attribute"
+ desc="Allow CIB erasure with --force"
+ cmd="cibadmin -E --force"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy --meta -g is-managed
- assert $? 0 crm_resource "Query a resource meta attribute"
+ desc="Query CIB"
+ cmd="cibadmin -Q > /tmp/$$.existing.xml"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy --meta -d is-managed
- assert $? 0 crm_resource "Remove a resource meta attribute"
+ desc="Set cluster option"
+ cmd="crm_attribute -n cluster-delay -v 60s"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy -p delay -v 10s
- assert $? 0 crm_resource "Create a resource attribute"
+ desc="Query new cluster option"
+ cmd="cibadmin -Q -o crm_config | grep cib-bootstrap-options-cluster-delay"
+ test_assert 0
- $VALGRIND_CMD crm_resource -L
- assert $? 0 crm_resource "List the configured resources"
+ desc="Query cluster options"
+ cmd="cibadmin -Q -o crm_config > /tmp/$$.opt.xml"
+ test_assert 0
- crm_failcount -r dummy -v 10 -N clusterNode-UNAME 2>&1
- assert $? 0 crm_resource "Set a resource's fail-count"
+ desc="Set no-quorum policy"
+ cmd="crm_attribute -n no-quorum-policy -v ignore"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy -M 2>&1
- assert $? 234 crm_resource "Require a destination when migrating a resource that is stopped"
+ desc="Delete nvpair"
+ cmd="cibadmin -D -o crm_config --xml-text ''"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy -M -N i.dont.exist 2>&1
- assert $? 250 crm_resource "Don't support migration to non-existant locations"
+ desc="Create operaton should fail"
+ cmd="cibadmin -C -o crm_config --xml-file /tmp/$$.opt.xml"
+ test_assert 76
- $VALGRIND_CMD crm_resource -r dummy -M -N clusterNode-UNAME
- assert $? 0 crm_resource "Migrate a resource"
+ desc="Modify cluster options section"
+ cmd="cibadmin -M -o crm_config --xml-file /tmp/$$.opt.xml"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy -U 1>&2
- assert $? 0 crm_resource "Un-migrate a resource"
+ desc="Query updated cluster option"
+ cmd="cibadmin -Q -o crm_config | grep cib-bootstrap-options-cluster-delay"
+ test_assert 0
- $VALGRIND_CMD crm_ticket -t ticketA -G granted -d false
- assert $? 0 crm_ticket "Default ticket granted state"
+ desc="Set duplicate cluster option"
+ cmd="crm_attribute -n cluster-delay -v 40s -s duplicate"
+ test_assert 0
- $VALGRIND_CMD crm_ticket -t ticketA -r --force
- assert $? 0 crm_ticket "Set ticket granted state"
+ desc="Setting multiply defined cluster option should fail"
+ cmd="crm_attribute -n cluster-delay -v 30s"
+ test_assert 76
- $VALGRIND_CMD crm_ticket -t ticketA -G granted
- assert $? 0 crm_ticket "Query ticket granted state"
+ desc="Set cluster option with -s"
+ cmd="crm_attribute -n cluster-delay -v 30s -s duplicate"
+ test_assert 0
- $VALGRIND_CMD crm_ticket -t ticketA -D granted --force
- assert $? 0 crm_ticket "Delete ticket granted state"
+ desc="Delete cluster option with -i"
+ cmd="crm_attribute -n cluster-delay -D -i cib-bootstrap-options-cluster-delay"
+ test_assert 0
- $VALGRIND_CMD crm_ticket -t ticketA -s
- assert $? 0 crm_ticket "Make a ticket standby"
+ desc="Create node1 and bring it online"
+ cmd="crm_simulate --live-check --in-place --node-up=node1"
+ test_assert 0
- $VALGRIND_CMD crm_ticket -t ticketA -G standby
- assert $? 0 crm_ticket "Query ticket standby state"
+ desc="Create node attribute"
+ cmd="crm_attribute -n ram -v 1024M -U node1 -t nodes"
+ test_assert 0
- $VALGRIND_CMD crm_ticket -t ticketA -a
- assert $? 0 crm_ticket "Activate a ticket"
+ desc="Query new node attribute"
+ cmd="cibadmin -Q -o nodes | grep node1-ram"
+ test_assert 0
- $VALGRIND_CMD crm_ticket -t ticketA -D standby
- assert $? 0 crm_ticket "Delete ticket standby state"
+ desc="Digest calculation"
+ cmd="cibadmin -Q | cibadmin -5 -p 2>&1 > /dev/null"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy -B -N node1 2>&1
- assert $? 250 crm_resource "Ban a resource on unknown node"
-
- $VALGRIND_CMD crm_simulate --live-check --in-place --node-up=node1 --node-up=node2 --node-up=node3
- assert $? 0 crm_simulate "Create three nodes and bring them online"
+ # This update will fail because it has version numbers
+ desc="Replace operation should fail"
+ cmd="cibadmin -R --xml-file /tmp/$$.existing.xml"
+ test_assert 205
+
+ desc="Default standby value"
+ cmd="crm_standby -N node1 -G"
+ test_assert 0
+
+ desc="Set standby status"
+ cmd="crm_standby -N node1 -v true"
+ test_assert 0
+
+ desc="Query standby value"
+ cmd="crm_standby -N node1 -G"
+ test_assert 0
+
+ desc="Delete standby value"
+ cmd="crm_standby -N node1 -D"
+ test_assert 0
+
+ desc="Create a resource"
+ cmd="cibadmin -C -o resources --xml-text ''"
+ test_assert 0
+
+ desc="Create a resource meta attribute"
+ cmd="crm_resource -r dummy --meta -p is-managed -v false"
+ test_assert 0
+
+ desc="Query a resource meta attribute"
+ cmd="crm_resource -r dummy --meta -g is-managed"
+ test_assert 0
+
+ desc="Remove a resource meta attribute"
+ cmd="crm_resource -r dummy --meta -d is-managed"
+ test_assert 0
+
+ desc="Create a resource attribute"
+ cmd="crm_resource -r dummy -p delay -v 10s"
+ test_assert 0
+
+ desc="List the configured resources"
+ cmd="crm_resource -L"
+ test_assert 0
+
+ desc="Set a resource's fail-count"
+ cmd="crm_failcount -r dummy -v 10 -N node1"
+ test_assert 0
+
+ desc="Require a destination when migrating a resource that is stopped"
+ cmd="crm_resource -r dummy -M"
+ test_assert 234
+
+ desc="Don't support migration to non-existant locations"
+ cmd="crm_resource -r dummy -M -N i.dont.exist"
+ test_assert 250
+
+ desc="Create a fencing resource"
+ cmd="cibadmin -C -o resources --xml-text ''"
+ test_assert 0
+
+ desc="Bring resources online"
+ cmd="crm_simulate --live-check --in-place -S"
+ test_assert 0
+
+ desc="Try to move a resource to its existing location"
+ cmd="crm_resource -r dummy --move --host node1"
+ test_assert 234
+
+ desc="Move a resource from its existing location"
+ cmd="crm_resource -r dummy --move"
+ test_assert 0
+
+ desc="Clear out constraints generated by --move"
+ cmd="crm_resource -r dummy --clear"
+ test_assert 0
+
+ desc="Default ticket granted state"
+ cmd="crm_ticket -t ticketA -G granted -d false"
+ test_assert 0
+
+ desc="Set ticket granted state"
+ cmd="crm_ticket -t ticketA -r --force"
+ test_assert 0
+
+ desc="Query ticket granted state"
+ cmd="crm_ticket -t ticketA -G granted"
+ test_assert 0
+
+ desc="Delete ticket granted state"
+ cmd="crm_ticket -t ticketA -D granted --force"
+ test_assert 0
+
+ desc="Make a ticket standby"
+ cmd="crm_ticket -t ticketA -s"
+ test_assert 0
+
+ desc="Query ticket standby state"
+ cmd="crm_ticket -t ticketA -G standby"
+ test_assert 0
+
+ desc="Activate a ticket"
+ cmd="crm_ticket -t ticketA -a"
+ test_assert 0
+
+ desc="Delete ticket standby state"
+ cmd="crm_ticket -t ticketA -D standby"
+ test_assert 0
+
+ desc="Ban a resource on unknown node"
+ cmd="crm_resource -r dummy -B -N host1"
+ test_assert 250
+
+ desc="Create two more nodes and bring them online"
+ cmd="crm_simulate --live-check --in-place --node-up=node2 --node-up=node3"
+ test_assert 0
+
+ desc="Ban dummy from node1"
+ cmd="crm_resource -r dummy -B -N node1"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy -B -N node1 2>&1
- assert $? 0 crm_resource "Ban dummy from node1"
+ desc="Ban dummy from node2"
+ cmd="crm_resource -r dummy -B -N node2"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy -B -N node2 2>&1
- assert $? 0 crm_resource "Ban dummy from node2"
+ desc="Relocate resources due to ban"
+ cmd="crm_simulate --live-check --in-place -S"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy -M -N node1 2>&1
- assert $? 0 crm_resource "Move dummy to node1"
+ desc="Move dummy to node1"
+ cmd="crm_resource -r dummy -M -N node1"
+ test_assert 0
- $VALGRIND_CMD crm_resource -r dummy -U -N node2
- assert $? 0 crm_resource "Clear implicit constraints for dummy on node2"
+ desc="Clear implicit constraints for dummy on node2"
+ cmd="crm_resource -r dummy -U -N node2"
+ test_assert 0
}
function test_date() {
-# $VALGRIND_CMD cibadmin -Q
for y in 06 07 08 09 10 11 12 13 14 15 16 17 18; do
- $VALGRIND_CMD iso8601 -d "20$y-W01-7 00Z"
- $VALGRIND_CMD iso8601 -d "20$y-W01-7 00Z" -W -E "20$y-W01-7 00:00:00Z"
- assert $? 0 iso8601 "20$y-W01-7" 0
- $VALGRIND_CMD iso8601 -d "20$y-W01-1 00Z"
- $VALGRIND_CMD iso8601 -d "20$y-W01-1 00Z" -W -E "20$y-W01-1 00:00:00Z"
- assert $? 0 iso8601 "20$y-W01-1" 0
+ desc="20$y-W01-7"
+ cmd="iso8601 -d '20$y-W01-7 00Z'"
+ test_assert 0 0
+
+ desc="20$y-W01-7 - round-trip"
+ cmd="iso8601 -d '20$y-W01-7 00Z' -W -E '20$y-W01-7 00:00:00Z'"
+ test_assert 0 0
+
+ desc="20$y-W01-1"
+ cmd="iso8601 -d '20$y-W01-1 00Z'"
+ test_assert 0 0
+
+ desc="20$y-W01-1 - round-trip"
+ cmd="iso8601 -d '20$y-W01-1 00Z' -W -E '20$y-W01-1 00:00:00Z'"
+ test_assert 0 0
done
- $VALGRIND_CMD iso8601 -d "2009-W53-7 00:00:00Z" -W -E "2009-W53-7 00:00:00Z"
- assert $? 0 iso8601 "2009-W53-07" 0
+ desc="2009-W53-07"
+ cmd="iso8601 -d '2009-W53-7 00:00:00Z' -W -E '2009-W53-7 00:00:00Z'"
+ test_assert 0 0
- $VALGRIND_CMD iso8601 -d "2009-01-31 00:00:00Z" -D "P1M" -E "2009-02-28 00:00:00Z"
- assert $? 0 iso8601 "2009-01-31 + 1 Month" 0
+ desc="2009-01-31 + 1 Month"
+ cmd="iso8601 -d '2009-01-31 00:00:00Z' -D P1M -E '2009-02-28 00:00:00Z'"
+ test_assert 0 0
- $VALGRIND_CMD iso8601 -d "2009-01-31 00:00:00Z" -D "P2M" -E "2009-03-31 00:00:00Z"
- assert $? 0 iso8601 "2009-01-31 + 2 Months" 0
+ desc="2009-01-31 + 2 Months"
+ cmd="iso8601 -d '2009-01-31 00:00:00Z' -D P2M -E '2009-03-31 00:00:00Z'"
+ test_assert 0 0
- $VALGRIND_CMD iso8601 -d "2009-01-31 00:00:00Z" -D "P3M" -E "2009-04-30 00:00:00Z"
- assert $? 0 iso8601 "2009-01-31 + 3 Months" 0
+ desc="2009-01-31 + 3 Months"
+ cmd="iso8601 -d '2009-01-31 00:00:00Z' -D P3M -E '2009-04-30 00:00:00Z'"
+ test_assert 0 0
- $VALGRIND_CMD iso8601 -d "2009-03-31 00:00:00Z" -D "P-1M" -E "2009-02-28 00:00:00Z"
- assert $? 0 iso8601 "2009-03-31 - 1 Month" 0
+ desc="2009-03-31 - 1 Month"
+ cmd="iso8601 -d '2009-03-31 00:00:00Z' -D P-1M -E '2009-02-28 00:00:00Z'"
+ test_assert 0 0
}
echo "Testing dates"
test_date > $test_home/regression.out
echo "Testing tools"
test_tools >> $test_home/regression.out
sed -i.sed 's/cib-last-written.*>/>/' $test_home/regression.out
sed -i.sed 's/ last-run=\"[0-9]*\"//' $test_home/regression.out
sed -i.sed 's/ last-rc-change=\"[0-9]*\"//' $test_home/regression.out
if [ $do_save = 1 ]; then
cp $test_home/regression.out $test_home/regression.exp
fi
+failed=0
+
+echo -e "\n\nResults"
+diff -wu $test_home/regression.exp $test_home/regression.out
+if [ $? != 0 ]; then
+ failed=1
+fi
+
+echo -e "\n\nSummary"
grep -e "^*" $test_home/regression.out
if [ $num_errors != 0 ]; then
echo $num_errors tests failed
- diff -wu $test_home/regression.exp $test_home/regression.out
exit 1
-fi
-
-diff -wu $test_home/regression.exp $test_home/regression.out
-if [ $? != 0 ]; then
+elif [ $failed = 1 ]; then
echo $num_passed tests passed but diff failed
exit 2
-
else
echo $num_passed tests passed
exit 0
fi