diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-18 13:18:18 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2019-10-07 13:14:14 +0000 |
commit | 9168cc9830e11942a1f821a152c1c77be01ccb0a (patch) | |
tree | b30b34730115ab2b5bb8dbff6873563c24d05e84 | |
parent | 0cbe8f01003ca71209c12eacac3abaeb9a7df862 (diff) |
tdef_test: verify case where osmo_tdef_set returns -EEXIST
Change-Id: I436daa804aac11622fde24afe9ea35193d9e9beb
-rw-r--r-- | tests/tdef/tdef_test.c | 3 | ||||
-rw-r--r-- | tests/tdef/tdef_test.ok | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/tdef/tdef_test.c b/tests/tdef/tdef_test.c index 60066b1e..276330a8 100644 --- a/tests/tdef/tdef_test.c +++ b/tests/tdef/tdef_test.c @@ -179,6 +179,9 @@ static void test_tdef_set_and_get() print_tdef_get_short(tdefs, 7, OSMO_TDEF_M); print_tdef_get_short(tdefs, 7, OSMO_TDEF_CUSTOM); + printf("setting 23 = 50 (EEXIST)\n"); + OSMO_ASSERT(osmo_tdef_set(tdefs, 23, 50, OSMO_TDEF_S) == -EEXIST); + printf("resetting\n"); osmo_tdefs_reset(tdefs); print_tdef_info(7); diff --git a/tests/tdef/tdef_test.ok b/tests/tdef/tdef_test.ok index 2a3617e8..3c4a0930 100644 --- a/tests/tdef/tdef_test.ok +++ b/tests/tdef/tdef_test.ok @@ -117,6 +117,7 @@ osmo_tdef_get(7, ms) = 420000 osmo_tdef_get(7, s) = 420 osmo_tdef_get(7, m) = 7 osmo_tdef_get(7, custom-unit) = 420 +setting 23 = 50 (EEXIST) resetting T7=50s osmo_tdef_get(7, s) = 50 |