114fe6698SNan Zhou## Nemora-postd 214fe6698SNan Zhou 314fe6698SNan ZhouNemora-postd is a daemon running on the BMC to stream host POST codes. 414fe6698SNan Zhou 514fe6698SNan Zhou## Tests 614fe6698SNan Zhou 7*25c55c54SPatrick WilliamsThe following instruction is for manual testing, but the Robot Framework test 8*25c55c54SPatrick Williamscan follow the same logic. 914fe6698SNan Zhou 1014fe6698SNan Zhou### Prerequisites 11*25c55c54SPatrick Williams 12*25c55c54SPatrick WilliamsInstall the latest version of 13*25c55c54SPatrick Williams[Protocol Buffers](https://github.com/protocolbuffers/protobuf/releases/tag/v3.13.0), 14*25c55c54SPatrick Williamsand the latest version of 15*25c55c54SPatrick Williams[Linux / UNIX TCP Port Forwarder](http://www.dest-unreach.org/socat/). 1614fe6698SNan Zhou 1714fe6698SNan Zhou### Functional Tests 18*25c55c54SPatrick Williams 1914fe6698SNan Zhou1. On BMC, stop the existing Nemora-postd; 20*25c55c54SPatrick Williams 2114fe6698SNan Zhou```bash 2214fe6698SNan Zhousystemctl stop nemora-postd@eth0 2314fe6698SNan Zhou``` 24*25c55c54SPatrick Williams 25*25c55c54SPatrick Williams2. On any machine, start a testing server at IP_SERVER listening to upcoming UDP 26*25c55c54SPatrick Williams datagrams; 27*25c55c54SPatrick Williams 2814fe6698SNan Zhou``` 2914fe6698SNan ZhouDECODE_CMD="protoc --decode=platforms.nemora.proto.EventSeries event_message.proto" 3014fe6698SNan Zhouexec socat udp-recvfrom:3960,fork exec:"$DECODE_CMD",fdout=stdout 3114fe6698SNan Zhou``` 32*25c55c54SPatrick Williams 33*25c55c54SPatrick Williams3. On BMC, start a new nemora session which sends POST codes to the testing 34*25c55c54SPatrick Williams server; 35*25c55c54SPatrick Williams 3614fe6698SNan Zhou``` 3714fe6698SNan Zhounemora-postd eth0 --udp4 $IP_SERVER 3814fe6698SNan Zhou``` 39*25c55c54SPatrick Williams 4014fe6698SNan Zhou4. On BMC, manually change the DBus property via `busctl`; 41*25c55c54SPatrick Williams 4214fe6698SNan Zhou``` 4314fe6698SNan Zhoubusctl set-property xyz.openbmc_project.State.Boot.Raw /xyz/openbmc_project/state/boot/raw0 xyz.openbmc_project.State.Boot.Raw Value '('tay')' 10000004 3 1 2 3 4414fe6698SNan Zhou``` 45*25c55c54SPatrick Williams 4614fe6698SNan Zhou5. The testing server should receive the following packet in about 20 seconds. 47*25c55c54SPatrick Williams 4814fe6698SNan Zhou```bash 4914fe6698SNan Zhoumagic: 9876039085048616960 5014fe6698SNan Zhoumac: ... 5114fe6698SNan Zhousent_time_us: ... 5214fe6698SNan Zhoupostcodes: 0x989684 5314fe6698SNan Zhoupostcodes_protocol: NATIVE_32_BIT 5414fe6698SNan Zhou``` 55*25c55c54SPatrick Williams 56*25c55c54SPatrick WilliamsNote that, `magic` and `postcodes_protocol` are fixed. `postcodes` should be 57*25c55c54SPatrick Williamswhat you set via `busctl`. 58