All of lore.kernel.org
 help / color / mirror / Atom feed
From: OpenBMC Patches <openbmc-patches@stwcx.xyz>
To: openbmc@lists.ozlabs.org
Subject: [PATCH openbmc-test-automation 18/60] Added full sensor suite
Date: Mon, 11 Jan 2016 10:49:44 -0600	[thread overview]
Message-ID: <1452531026-13715-19-git-send-email-openbmc-patches@stwcx.xyz> (raw)
In-Reply-To: <1452531026-13715-1-git-send-email-openbmc-patches@stwcx.xyz>

From: Chris Austen <austenc@us.ibm.com>

corrected cpu sensor#
---
 tests/test_sensors.robot | 188 ++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 177 insertions(+), 11 deletions(-)

diff --git a/tests/test_sensors.robot b/tests/test_sensors.robot
index 3d17360..a50805a 100644
--- a/tests/test_sensors.robot
+++ b/tests/test_sensors.robot
@@ -5,34 +5,200 @@ Documentation          This example demonstrates executing commands on a remote
 ...                    Notice how connections are handled as part of the suite setup and
 ...                    teardown. This saves some time when executing several test cases.
 
-Resource		../lib/rest_client.robot
+Resource        ../lib/rest_client.robot
 
 
 Library                SSHLibrary
 Suite Setup            Open Connection And Log In
 Suite Teardown         Close All Connections
 
+
 *** Variables ***
 
 
 *** Test Cases ***
+Verify connection
+    Execute new Command    echo "hello"
+    Response Should Be Equal    "hello"
+
+
 Execute ipmi BT capabilities command
-	${output}=    Run IPMI command 		0x06 0x36
-	Should Be Equal		"${output}"		" 01 3f 3f 0a 01"
+    Run IPMI command            0x06 0x36
+    response Should Be Equal    " 01 3f 3f 0a 01"
+
 
 Execute Set Sensor boot count
-	Run IPMI command  0x04 0x30 0x09 0x01 0x00 0x35 0x00 0x00 0x00 0x00 0x00 0x00
-	${value} =  Read Attribute	/org/openbmc/sensor/virtual/BootCount	value
-	Should Be Equal		${value}	"53"
+    Run IPMI command    0x04 0x30 0x09 0x01 0x00 0x35 0x00 0x00 0x00 0x00 0x00 0x00
+    Read the Attribute      /org/openbmc/sensor/virtual/BootCount   value
+    Response Should Be Equal    "53"
+
+
+Set Sensor Boot progress
+    Run IPMI command  0x04 0x30 0x05 0xa9 0x00 0x04 0x00 0x00 0x00 0x00 0x14 0x00
+    Read the Attribute  /org/openbmc/sensor/virtual/BootProgress    value
+    Response Should Be Equal    "FW Progress, Baseboard Init"
+
+
+
+Set Sensor Boot progress Longest string
+    Run IPMI command  0x04 0x30 0x05 0xa9 0x00 0x04 0x00 0x00 0x00 0x00 0x0e 0x00
+    Read The Attribute  /org/openbmc/sensor/virtual/BootProgress    value
+    Response Should Be Equal    "FW Progress, Docking station attachment"
+
+
+BootProgress sensor FW Hang unspecified Error
+    Run IPMI command  0x04 0x30 0x05 0xa9 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00
+    Read The Attribute  /org/openbmc/sensor/virtual/BootProgress    value
+    Response Should Be Equal    "FW Hang, Unspecified"
+
+
+BootProgress fw hang state
+    Run IPMI command  0x04 0x30 0x05 0xa9 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute  /org/openbmc/sensor/virtual/BootProgress    value
+    Response Should Be Equal    "POST Error, unknown"
+
+
+OperatingSystemStatus Sensor boot completed progress
+    Run IPMI command  0x04 0x30 0x32 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute  /org/openbmc/sensor/virtual/OperatingSystemStatus     value
+    Response Should Be Equal    "Boot completed (00)"
+
+
+OperatingSystemStatus Sensor progress
+    Run IPMI command  0x04 0x30 0x32 0x00 0x00 0x04 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute  /org/openbmc/sensor/virtual/OperatingSystemStatus     value
+    Response Should Be Equal    "PXE boot completed"
+
+
+OCC Active sensor on enabled
+    Run IPMI command  0x04 0x30 0x08 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute  /org/openbmc/sensor/virtual/OccStatus     value
+    Response Should Be Equal    "Enabled"
+
+
+OCC Active sensor on disabled
+    Run IPMI command  0x04 0x30 0x08 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute  /org/openbmc/sensor/virtual/OccStatus     value
+    Response Should Be Equal    "Disabled"
+
+
+CPU Present
+    Run IPMI command  0x04 0x30 0x2f 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/cpu0    present
+    Response Should Be Equal    "True"
+
+CPU not Present
+    Run IPMI command  0x04 0x30 0x2f 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/cpu0    present
+    Response Should Be Equal    "False"
+
+
+CPU fault
+    Run IPMI command  0x04 0x30 0x2f 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/cpu0    fault
+    Response Should Be Equal    "True"
+
+
+CPU no fault
+    Run IPMI command  0x04 0x30 0x2f 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/cpu0    fault
+    Response Should Be Equal    ""
+
+
+core Present
+    Run IPMI command  0x04 0x30 0x2d 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/cpu0/core11   present
+    Response Should Be Equal    "True"
+
+core not Present
+    Run IPMI command  0x04 0x30 0x2d 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/cpu0/core11   present
+    Response Should Be Equal    "False"
+
+
+core fault
+    Run IPMI command  0x04 0x30 0x2d 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/cpu0/core11    fault
+    Response Should Be Equal    "True"
+
+
+core no fault
+    Run IPMI command  0x04 0x30 0x2d 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/cpu0/core11    fault
+    Response Should Be Equal    ""
+
+
+DIMM3 Present
+    Run IPMI command  0x04 0x30 0x21 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/dimm3     present
+    Response Should Be Equal    "True"
+
+DIMM3 not Present
+    Run IPMI command  0x04 0x30 0x21 0xa9 0xff 0x00 0x00 0x40 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/dimm3     present
+    Response Should Be Equal    "False"
+
+
+DIMM0 fault
+    Run IPMI command  0x04 0x30 0x1e 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/dimm0     fault
+    Response Should Be Equal    "True"
+
+
+DIMM0 no fault
+    Run IPMI command  0x04 0x30 0x1e 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/dimm0     fault
+    Response Should Be Equal    ""
+
+
+
+Centaur0 Present
+    Run IPMI command  0x04 0x30 0x2e 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/centaur0    present
+    Response Should Be Equal    "True"
+
+Centaur0 not Present
+    Run IPMI command  0x04 0x30 0x2e 0x00 0x00 0x00 0x00 0x40 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/centaur0    present
+    Response Should Be Equal    "False"
+
+
+Centaur0 fault
+    Run IPMI command  0x04 0x30 0x2e 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/centaur0    fault
+    Response Should Be Equal    "True"
+
+Centaur0 no fault
+    Run IPMI command  0x04 0x30 0x2e 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00
+    Read The Attribute   /org/openbmc/inventory/system/chassis/motherboard/centaur0    fault
+    Response Should Be Equal    ""
 
 
 
 *** Keywords ***
+Execute new Command
+    [arguments]    ${args}
+    ${output}=  Execute Command    ${args}
+    set test variable    ${OUTPUT}     "${output}"
+
+response Should Be Equal
+    [arguments]    ${args}
+    Should Be Equal    ${OUTPUT}    ${args}
+
+
+Read the Attribute     
+    [arguments]    ${uri}    ${parm}
+    ${output} =  Read Attribute      ${uri}    ${parm}
+    set test variable    ${OUTPUT}     ${output}
+
+
 Open Connection And Log In
-	Open connection 	${OPENBMC_HOST}
-	Login	${OPENBMC_USERNAME}	${OPENBMC_PASSWORD}
+    Open connection     ${OPENBMC_HOST}
+    Login   ${OPENBMC_USERNAME}    ${OPENBMC_PASSWORD}
 
 Run IPMI Command
-	[arguments]	${args}
-	${output}=	Execute Command    /home/root/ipmitool -I dbus raw ${args}
-	[return]	${output}
+    [arguments]    ${args}
+    ${output}=  Execute Command    /usr/sbin/ipmitool -I dbus raw ${args}
+    set test variable    ${OUTPUT}     "${output}"
+
+
-- 
2.6.4

  parent reply	other threads:[~2016-01-11 16:50 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11 16:49 [PATCH openbmc-test-automation 00/60] Pull Manjunath's automation repository OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 01/60] first commit OpenBMC Patches
2016-01-12  4:18   ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 02/60] added files OpenBMC Patches
2016-01-12  4:20   ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 03/60] Update README.md OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 04/60] added log statement OpenBMC Patches
2016-01-12  4:20   ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 05/60] added testcase for etc passwd OpenBMC Patches
2016-01-12  4:20   ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 06/60] Added git ignore file OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 07/60] Use argumnet file with pyrobot and added instructions to READEME file OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 08/60] Update README for better html display OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 09/60] Added Inventory list testcase OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 10/60] Added DIMM specific inventory tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 11/60] base add for sensor tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 12/60] fixed errors in tox and generate_argumentfile.sh script OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 13/60] fixed review comments OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 14/60] created loops for tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 15/60] Add initial rest test cases Support to test Null properties OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 16/60] Moved Read Attribute and Read Properties to rest_client OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 17/60] fix review comment OpenBMC Patches
2016-01-11 16:49 ` OpenBMC Patches [this message]
2016-01-11 16:49 ` [PATCH openbmc-test-automation 19/60] Update README.md OpenBMC Patches
2016-01-12  4:21   ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 20/60] Added SSL tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 21/60] Handle new rest client from Brad OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 22/60] Ran the tests and fixed errors in SSL tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 23/60] Modified the doc OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 24/60] Added firmware version validation test OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 25/60] update readme file with tox version OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 26/60] Fix errors OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 27/60] Fix Errors in test_obmcrest.robot and removed the empty testcases OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 28/60] Added one more testcase to test non-ssl connection to port 443 OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 29/60] OpenBMC REST Testing OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 30/60] updated the REST API for firmware version OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 31/60] first commit OpenBMC Patches
2016-01-12  5:07   ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 32/60] added files OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 33/60] Update README.md OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 34/60] added log statement OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 35/60] added testcase for etc passwd OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 36/60] Added git ignore file OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 37/60] Use argumnet file with pyrobot and added instructions to READEME file OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 38/60] Update README for better html display OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 39/60] Added Inventory list testcase OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 40/60] Added DIMM specific inventory tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 41/60] base add for sensor tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 42/60] fixed errors in tox and generate_argumentfile.sh script OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 43/60] fixed review comments OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 44/60] created loops for tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 45/60] Add initial rest test cases Support to test Null properties OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 46/60] Moved Read Attribute and Read Properties to rest_client OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 47/60] fix review comment OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 48/60] Added full sensor suite OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 49/60] Update README.md OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 50/60] Added SSL tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 51/60] Handle new rest client from Brad OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 52/60] Ran the tests and fixed errors in SSL tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 53/60] Modified the doc OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 54/60] Added firmware version validation test OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 55/60] update readme file with tox version OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 56/60] Fix errors OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 57/60] Fix Errors in test_obmcrest.robot and removed the empty testcases OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 58/60] Added one more testcase to test non-ssl connection to port 443 OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 59/60] OpenBMC REST Testing OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 60/60] updated the REST API for firmware version OpenBMC Patches
2016-01-12  0:00 ` [PATCH openbmc-test-automation 00/60] Pull Manjunath's automation repository Daniel Axtens
2016-01-12  0:10 ` Cyril Bur
2016-01-12  9:35   ` Manjunath A Kumatagi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452531026-13715-19-git-send-email-openbmc-patches@stwcx.xyz \
    --to=openbmc-patches@stwcx.xyz \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.