From 9168cc9830e11942a1f821a152c1c77be01ccb0a Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 18 Sep 2019 13:18:18 +0200 Subject: tdef_test: verify case where osmo_tdef_set returns -EEXIST Change-Id: I436daa804aac11622fde24afe9ea35193d9e9beb --- tests/tdef/tdef_test.c | 3 +++ tests/tdef/tdef_test.ok | 1 + 2 files changed, 4 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3