1## Nemora-postd
2
3Nemora-postd is a daemon running on the BMC to stream host POST codes.
4
5## Tests
6
7The following instruction is for manual testing, but the Robot Framework test can follow the same logic.
8
9### Prerequisites
10Install the latest version of [Protocol Buffers](https://github.com/protocolbuffers/protobuf/releases/tag/v3.13.0), and the latest version of [Linux / UNIX TCP Port Forwarder](http://www.dest-unreach.org/socat/).
11
12### Functional Tests
131. On BMC, stop the existing Nemora-postd;
14```bash
15systemctl stop nemora-postd@eth0
16```
172. On any machine, start a testing server at IP_SERVER listening to upcoming UDP datagrams;
18```
19DECODE_CMD="protoc --decode=platforms.nemora.proto.EventSeries event_message.proto"
20exec socat udp-recvfrom:3960,fork exec:"$DECODE_CMD",fdout=stdout
21```
223. On BMC, start a new nemora session which sends POST codes to the testing server;
23```
24nemora-postd eth0 --udp4 $IP_SERVER
25```
264. On BMC, manually change the DBus property via `busctl`;
27```
28busctl 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
29```
305. The testing server should receive the following packet in about 20 seconds.
31```bash
32magic: 9876039085048616960
33mac: ...
34sent_time_us: ...
35postcodes: 0x989684
36postcodes_protocol: NATIVE_32_BIT
37```
38Note that, `magic` and `postcodes_protocol` are fixed. `postcodes` should be what you set via `busctl`.
39