blob: 6bbe8c915c931ce30015f4074187033d23425c4d [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
5Resource ../lib/openbmc_ffdc.robot
6Library ../lib/bmc_ssh_utils.py
7
8Test Teardown Test Teardown Execution
9
10*** Test Cases ***
11
12Test BMC Alt Side Mirroring
13 [Documentation] Verify the modified file is synced to alt flash side.
14 [Tags] Test_BMC_Alt_Side_Mirroring
15
16 # BMC file sync list.
17 # Example output from "cat /etc/synclist" file:
18 # /etc/dropbear/
19 # /etc/group
20 # /etc/gshadow
21 # /etc/hostname
22 # /etc/machine-id
23 # /etc/passwd
24 # /etc/shadow
25 # /etc/ssl/
26 # /etc/ssl/certs/nginx/
27 # /etc/ssl/private/
28 # /etc/systemd/network/
29
30 # Save off the original hostname.
31 ${orig_hostname} ${stderr} ${rc}= BMC Execute Command
32 ... cat /etc/hostname
33 Set Suite Variable ${hostname} ${orig_hostname}
34
35 BMC Execute Command echo "mirror-file" > /etc/hostname
36
37 # File "hostname" should have synced to alt media space.
38 # Example output from "ls /media/alt/var/persist/etc/":
39 # group group- gshadow gshadow- hostname machine-id ssl systemd
40
41 ${curr_hostname} ${stderr} ${rc}= BMC Execute Command
42 ... cat /media/alt/var/persist/etc/hostname
43
44 Should Be Equal As Strings ${curr_hostname} mirror-file
45 ... msg=hostname primary file is not synced to the alt flash chip side.
46
47*** Keywords ***
48
49Test Teardown Execution
50 [Documentation] Do the post test teardown.
51
52 FFDC On Test Case Fail
53 BMC Execute Command echo ${hostname} > /etc/hostname
54