blob: 903a37423c9794d304e9a493a0f3d37e0b708afc [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
Sridevi Ramesh208e2582025-09-07 01:43:30 -050012Test Tags BMC_File_Mirroring
13
George Keishingdc171492018-05-11 09:32:17 -050014*** Test Cases ***
15
16Test BMC Alt Side Mirroring
17 [Documentation] Verify the modified file is synced to alt flash side.
18 [Tags] Test_BMC_Alt_Side_Mirroring
19
20 # BMC file sync list.
21 # Example output from "cat /etc/synclist" file:
22 # /etc/dropbear/
23 # /etc/group
24 # /etc/gshadow
25 # /etc/hostname
26 # /etc/machine-id
27 # /etc/passwd
28 # /etc/shadow
29 # /etc/ssl/
30 # /etc/ssl/certs/nginx/
31 # /etc/ssl/private/
32 # /etc/systemd/network/
33
34 # Save off the original hostname.
35 ${orig_hostname} ${stderr} ${rc}= BMC Execute Command
36 ... cat /etc/hostname
37 Set Suite Variable ${hostname} ${orig_hostname}
George Keishing299ccd32018-11-07 01:38:30 -060038 ${mirror_filename}= Set Variable mirror-filename
George Keishingdc171492018-05-11 09:32:17 -050039
Sushil Singh62cc6692019-06-17 22:52:28 -050040 Redfish.Login
41 Configure Hostname ${mirror_filename}
42 ${curr_hostname} ${stderr} ${rc}= BMC Execute Command hostname
George Keishing299ccd32018-11-07 01:38:30 -060043
Sushil Singh62cc6692019-06-17 22:52:28 -050044 Should Be Equal As Strings ${curr_hostname} ${mirror_filename}
45 ... msg=The hostname interface ${mirror_filename} and command value ${curr_hostname} do not match.
George Keishingdc171492018-05-11 09:32:17 -050046
47 # File "hostname" should have synced to alt media space.
48 # Example output from "ls /media/alt/var/persist/etc/":
49 # group group- gshadow gshadow- hostname machine-id ssl systemd
50
George Keishinge0a2d5e2019-07-23 02:53:58 -050051 # Wait time for syncing to ALT side.
52 Sleep 2
53
George Keishingdc171492018-05-11 09:32:17 -050054 ${curr_hostname} ${stderr} ${rc}= BMC Execute Command
55 ... cat /media/alt/var/persist/etc/hostname
56
George Keishing299ccd32018-11-07 01:38:30 -060057 Should Be Equal As Strings ${curr_hostname} ${mirror_filename}
George Keishingdc171492018-05-11 09:32:17 -050058 ... msg=hostname primary file is not synced to the alt flash chip side.
59
60*** Keywords ***
61
62Test Teardown Execution
63 [Documentation] Do the post test teardown.
64
65 FFDC On Test Case Fail
George Keishing299ccd32018-11-07 01:38:30 -060066
Sushil Singh62cc6692019-06-17 22:52:28 -050067 Redfish.Login
68 Configure Hostname ${hostname}
George Keishingdc171492018-05-11 09:32:17 -050069