Skip to content

Commit

Permalink
Merge pull request #337 from tock/kv-addupdate
Browse files Browse the repository at this point in the history
KV: add add/update functions, unit tests
  • Loading branch information
ppannuto authored Sep 14, 2023
2 parents 6ce2900 + 1509176 commit f6684f4
Show file tree
Hide file tree
Showing 18 changed files with 1,056 additions and 219 deletions.
13 changes: 13 additions & 0 deletions examples/tests/kv/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Makefile for user application

# Specify this directory relative to the current application.
TOCK_USERLAND_BASE_DIR = ../../..

# Which files to compile.
C_SRCS := $(wildcard *.c)

ELF2TAB_ARGS += --write_id 17767 --read_ids 17767 --access_ids 17767

# Include userland master makefile. Contains rules and flags for actually
# building the application.
include $(TOCK_USERLAND_BASE_DIR)/AppMakefile.mk
36 changes: 36 additions & 0 deletions examples/tests/kv/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
KV Unit Test App
================

Runs a series of unit tests for the KV store.

Needs to have the `examples/services/unit_test_supervisor` app installed as
well.

Output
------

Should get expected output like:

```
1.000: exists [✓]
1.001: set_get [✓]
1.002: set_get_too_long [✓]
1.003: key_too_long [✓]
1.004: set_value_too_long [✓]
1.005: get_not_found [✓]
1.006: add [✓]
1.007: add_add [✓]
1.008: update [✓]
1.009: update_no_exist [✓]
1.010: delete [✓]
1.011: delete_delete [✓]
1.012: set_get_32regions_1 [✓]
1.013: set_get_32regions_2 [✓]
1.014: set_get_32regions_3 [✓]
1.015: set_get_32regions_4 [✓]
1.016: set_get_32regions_5 [✓]
1.017: set_get_32regions_6 [✓]
1.018: set_get_32regions_7 [✓]
1.019: set_get_32regions_8 [✓]
Summary 1: [20/20] Passed, [0/20] Failed, [0/20] Incomplete
```
Loading

0 comments on commit f6684f4

Please sign in to comment.