diff --git a/tests/test_options.c b/tests/test_options.c index fd032b4f..35082ed9 100644 --- a/tests/test_options.c +++ b/tests/test_options.c @@ -393,9 +393,12 @@ t_access_option5(void) { static void t_access_option6(void) { + coap_log_t level = coap_get_log_level(); const uint8_t teststr[] = { 0xf2, 'a', 'b' }; + coap_set_log_level(LOG_CRIT); CU_ASSERT(coap_opt_delta((coap_opt_t *)teststr) == 0); + coap_set_log_level(level); CU_ASSERT(coap_opt_length((coap_opt_t *)teststr) == 0); CU_ASSERT_PTR_EQUAL(coap_opt_value((coap_opt_t *)teststr), NULL); CU_ASSERT(coap_opt_size((coap_opt_t *)teststr) == 0); diff --git a/tests/test_pdu.c b/tests/test_pdu.c index 1ae8460c..9d317e7d 100644 --- a/tests/test_pdu.c +++ b/tests/test_pdu.c @@ -599,6 +599,7 @@ t_encode_pdu10(void) { static void t_encode_pdu11(void) { + coap_log_t level = coap_get_log_level(); /* data too long for PDU */ size_t old_max = pdu->max_size; int result; @@ -606,7 +607,9 @@ t_encode_pdu11(void) { coap_pdu_clear(pdu, 8); /* clear PDU, with small maximum */ CU_ASSERT(pdu->data == NULL); + coap_set_log_level(LOG_CRIT); result = coap_add_data(pdu, 10, (unsigned char *)"0123456789"); + coap_set_log_level(level); CU_ASSERT(result == 0); CU_ASSERT(pdu->data == NULL);