blob: 587074008ebd41107e968fc452af2c755a0f0701 [file] [log] [blame]
George Keishingdc171492018-05-11 09:32:17 -05001*** Settings ***
2Documentation Test BMC file mirroring sync from primary flash chip to
3... alternate flash chip side.
4
Sushil Singh62cc6692019-06-17 22:52:28 -05005Resource ../../lib/openbmc_ffdc.robot
6Resource ../../lib/bmc_network_utils.robot
7Resource ../../lib/bmc_redfish_resource.robot
8Library ../../lib/bmc_ssh_utils.py
George Keishingdc171492018-05-11 09:32:17 -05009
10Test Teardown Test Teardown Execution
11
12*** Test Cases ***
13
14Test BMC Alt Side Mirroring
15 [Documentation] Verify the modified file is synced to alt flash side.
16 [Tags] Test_BMC_Alt_Side_Mirroring
17
18 # BMC file sync list.
19 # Example output from "cat /etc/synclist" file:
20 # /etc/dropbear/
21 # /etc/group
22 # /etc/gshadow
23 # /etc/hostname
24 # /etc/machine-id
25 # /etc/passwd
26 # /etc/shadow
27 # /etc/ssl/
28 # /etc/ssl/certs/nginx/
29 # /etc/ssl/private/
30 # /etc/systemd/network/
31
32 # Save off the original hostname.
33 ${orig_hostname} ${stderr} ${rc}= BMC Execute Command
34 ... cat /etc/hostname
35 Set Suite Variable ${hostname} ${orig_hostname}
George Keishing299ccd32018-11-07 01:38:30 -060036 ${mirror_filename}= Set Variable mirror-filename
George Keishingdc171492018-05-11 09:32:17 -050037
Sushil Singh62cc6692019-06-17 22:52:28 -050038 Redfish.Login
39 Configure Hostname ${mirror_filename}
40 ${curr_hostname} ${stderr} ${rc}= BMC Execute Command hostname
George Keishing299ccd32018-11-07 01:38:30 -060041
Sushil Singh62cc6692019-06-17 22:52:28 -050042 Should Be Equal As Strings ${curr_hostname} ${mirror_filename}
43 ... msg=The hostname interface ${mirror_filename} and command value ${curr_hostname} do not match.
George Keishingdc171492018-05-11 09:32:17 -050044
45 # File "hostname" should have synced to alt media space.
46 # Example output from "ls /media/alt/var/persist/etc/":
47 # group group- gshadow gshadow- hostname machine-id ssl systemd
48
George Keishinge0a2d5e2019-07-23 02:53:58 -050049 # Wait time for syncing to ALT side.
50 Sleep 2
51
George Keishingdc171492018-05-11 09:32:17 -050052 ${curr_hostname} ${stderr} ${rc}= BMC Execute Command
53 ... cat /media/alt/var/persist/etc/hostname
54
George Keishing299ccd32018-11-07 01:38:30 -060055 Should Be Equal As Strings ${curr_hostname} ${mirror_filename}
George Keishingdc171492018-05-11 09:32:17 -050056 ... msg=hostname primary file is not synced to the alt flash chip side.
57
58*** Keywords ***
59
60Test Teardown Execution
61 [Documentation] Do the post test teardown.
62
63 FFDC On Test Case Fail
George Keishing299ccd32018-11-07 01:38:30 -060064
Sushil Singh62cc6692019-06-17 22:52:28 -050065 Redfish.Login
66 Configure Hostname ${hostname}
George Keishingdc171492018-05-11 09:32:17 -050067