tdef_test: verify case where osmo_tdef_set returns -EEXIST

Change-Id: I436daa804aac11622fde24afe9ea35193d9e9beb
This commit is contained in:
Pau Espin 2019-09-18 13:18:18 +02:00 committed by pespin
parent 0cbe8f0100
commit 9168cc9830
2 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -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