blob: 8bc499958077773f038f5e9c8870f05f8bcb6758 [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
49 ${curr_hostname} ${stderr} ${rc}= BMC Execute Command
50 ... cat /media/alt/var/persist/etc/hostname
51
George Keishing299ccd32018-11-07 01:38:30 -060052 Should Be Equal As Strings ${curr_hostname} ${mirror_filename}
George Keishingdc171492018-05-11 09:32:17 -050053 ... msg=hostname primary file is not synced to the alt flash chip side.
54
55*** Keywords ***
56
57Test Teardown Execution
58 [Documentation] Do the post test teardown.
59
60 FFDC On Test Case Fail
George Keishing299ccd32018-11-07 01:38:30 -060061
Sushil Singh62cc6692019-06-17 22:52:28 -050062 Redfish.Login
63 Configure Hostname ${hostname}
George Keishingdc171492018-05-11 09:32:17 -050064