diff mbox

boot-tests: force BMC to boot from non-golden side

Message ID 1478069543-20321-1-git-send-email-stewart@linux.vnet.ibm.com
State Accepted
Headers show

Commit Message

Stewart Smith Nov. 2, 2016, 6:52 a.m. UTC
Because IPMI raw commands copied out of internal bugzilla is the best
source of things that need to go in test scripts.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 external/boot-tests/bmc_support.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stewart Smith Nov. 2, 2016, 7:35 a.m. UTC | #1
Stewart Smith <stewart@linux.vnet.ibm.com> writes:
> Because IPMI raw commands copied out of internal bugzilla is the best
> source of things that need to go in test scripts.
>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Merged to master as of 6979263e3430763b79490fbbb4f024370f2a32d2 to avoid
tears.
ppaidipe Nov. 2, 2016, 9:42 a.m. UTC | #2
On 2016-11-02 12:22, Stewart Smith wrote:
> Because IPMI raw commands copied out of internal bugzilla is the best
> source of things that need to go in test scripts.
> 
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
> ---
>  external/boot-tests/bmc_support.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/external/boot-tests/bmc_support.sh
> b/external/boot-tests/bmc_support.sh
> index 4b1c00481dab..c273cfd9927c 100644
> --- a/external/boot-tests/bmc_support.sh
> +++ b/external/boot-tests/bmc_support.sh
> @@ -37,6 +37,8 @@ function poweroff {
>  function force_primary_side {
>      # Now we force booting from primary (not golden) side
>      $IPMI_COMMAND raw 0x04 0x30 0x5c 0x01 0x00 0x00 0 0 0 0 0 0
> +    # and from somewhere else we get this raw command. Obvious really.
> +    $IPMI_COMMAND raw 0x04 0x30 0xd2 0x01 0x00 0x00 0 0 0 0 0 0
>      sleep 8

Actually force booting to primary side is done by this raw command, but 
the sensor id will be different for different platforms.
$IPMI_COMMAND raw 0x04 0x30 xx 0x01 0x00 0x00 0 0 0 0 0 0
xx can be replaced by sensor id for particular platform the test was 
running.
on a firestone machine
Sensor ID              : BIOS Golden Side (0xd2)

on a habanero machine
Sensor ID              : BIOS Golden Side (0x5c)

So these tests will work only on firestone/habanero.
i think better way is to get sensor id first and use it to force primary 
side.
the sensor id we can get by using below command.
$IPMI_COMMAND sdr list -v | grep -i  "BIOS Golden side"


>  }
diff mbox

Patch

diff --git a/external/boot-tests/bmc_support.sh b/external/boot-tests/bmc_support.sh
index 4b1c00481dab..c273cfd9927c 100644
--- a/external/boot-tests/bmc_support.sh
+++ b/external/boot-tests/bmc_support.sh
@@ -37,6 +37,8 @@  function poweroff {
 function force_primary_side {
     # Now we force booting from primary (not golden) side
     $IPMI_COMMAND raw 0x04 0x30 0x5c 0x01 0x00 0x00 0 0 0 0 0 0
+    # and from somewhere else we get this raw command. Obvious really.
+    $IPMI_COMMAND raw 0x04 0x30 0xd2 0x01 0x00 0x00 0 0 0 0 0 0
     sleep 8
 }