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
8can follow the same logic.
9
10### Prerequisites
11
12Install the latest version of
13[Protocol Buffers](https://github.com/protocolbuffers/protobuf/releases/tag/v3.13.0),
14and the latest version of
15[Linux / UNIX TCP Port Forwarder](http://www.dest-unreach.org/socat/).
16
17### Functional Tests
18
191. On BMC, stop the existing Nemora-postd;
20
21```bash
22systemctl stop nemora-postd@eth0
23```
24
252. On any machine, start a testing server at IP_SERVER listening to upcoming UDP
26   datagrams;
27
28```
29DECODE_CMD="protoc --decode=platforms.nemora.proto.EventSeries event_message.proto"
30exec socat udp-recvfrom:3960,fork exec:"$DECODE_CMD",fdout=stdout
31```
32
333. On BMC, start a new nemora session which sends POST codes to the testing
34   server;
35
36```
37nemora-postd eth0 --udp4 $IP_SERVER
38```
39
404. On BMC, manually change the DBus property via `busctl`;
41
42```
43busctl 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
44```
45
465. The testing server should receive the following packet in about 20 seconds.
47
48```bash
49magic: 9876039085048616960
50mac: ...
51sent_time_us: ...
52postcodes: 0x989684
53postcodes_protocol: NATIVE_32_BIT
54```
55
56Note that, `magic` and `postcodes_protocol` are fixed. `postcodes` should be
57what you set via `busctl`.
58