File tree Expand file tree Collapse file tree 4 files changed +47
-4
lines changed Expand file tree Collapse file tree 4 files changed +47
-4
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,11 @@ Image: ./BUILD/K64F/ARM/mbed-os-example-kvstore.bin
110
110
1 . Open the UART of the board in your favorite UART viewing program. For
111
111
example, ` screen /dev/ttyACM0 ` .
112
112
113
- ** Note:** The default serial port baud rate is 115200 bit/s.
113
+ ** Note:** The default serial port baud rate is 9600 bit/s.
114
114
You may open serial term with:
115
+
115
116
```
116
- mbed sterm -b 115200 -r
117
+ mbed sterm -b 9600 -r
117
118
```
118
119
119
120
Expected output:
Original file line number Diff line number Diff line change 4
4
"storage.storage_type" : " TDB_INTERNAL"
5
5
},
6
6
"*" : {
7
- "platform.stdio-baud-rate" : 115200 ,
8
- "platform.default-serial-baud-rate" : 115200 ,
9
7
"platform.stdio-convert-newlines" : 1
10
8
}
11
9
}
Original file line number Diff line number Diff line change
1
+ # Testing examples
2
+
3
+ Examples are tested using tool [ htrun] ( https://github.com/ARMmbed/mbed-os-tools/tree/master/packages/mbed-host-tests ) and templated print log.
4
+
5
+ To run the test, use following command after you build the example:
6
+ ```
7
+ mbedhtrun -d D: -p COM4 -m K64F -f .\BUILD\K64F\GCC_ARM\kvstore.bin --compare-log tests\kvstore.log
8
+ ```
9
+
10
+
11
+ More details about ` htrun ` are [ here] ( https://github.com/ARMmbed/mbed-os-tools/tree/master/packages/mbed-host-tests#testing-mbed-os-examples ) .
12
+
Original file line number Diff line number Diff line change
1
+ --- Mbed OS KVStore static API example ---
2
+ kv_reset
3
+ kv_reset -> 0
4
+ kv_set first dummy key
5
+ kv_set -> 0
6
+ kv_get_info of first key
7
+ kv_get_info -> 0
8
+ kv_get_info key: \/kv\/dummy_key1
9
+ kv_get_info info - size: 31, flags: 0
10
+ kv_get first key
11
+ kv_get -> 0
12
+ kv_get key: \/kv\/dummy_key1
13
+ kv_get value: kvstore_dummy_value_hello_world
14
+ kv_set second dummy key
15
+ kv_set -> 0
16
+ kv_set third key with Confidentiality and Replay Protection flags
17
+ kv_set -> 0
18
+ kv_set Set 'Real' Key 1
19
+ kv_set -> 0
20
+ kv_set Set 'Real' Key 2 with flag write-once
21
+ kv_set -> 0
22
+ Removing 'Dummy' Keys
23
+ 1\) Removing dummy_key2
24
+ 2\) Removing dummy_auth_enc_key
25
+ 3\) Removing dummy_key1
26
+ Remaining with 'Real' Keys:
27
+ 1\) real_key1
28
+ 2\) real_wo_key
29
+ kv_remove write-once file - should fail!
30
+ kv_remove -> 274
31
+ kv_reset format kvstore \(including write-once\)
32
+ kv_reset -> 0
You can’t perform that action at this time.
0 commit comments