diff options
Diffstat (limited to 'tests/stress.c')
-rw-r--r-- | tests/stress.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/stress.c b/tests/stress.c index 6dcb8f3..0dc9173 100644 --- a/tests/stress.c +++ b/tests/stress.c @@ -130,10 +130,13 @@ static libusb_testlib_result test_default_context_change(void) return TEST_STATUS_FAILURE; } - /* Enable debug output, to be sure to use the context */ - libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_DEBUG); + /* Enable debug output on new context, to be sure to use the context */ libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_DEBUG); + /* Enable debug output on the default context. This should work even before + * the context has been created. */ + libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_DEBUG); + /* Now create a reference to the default context */ r = libusb_init(NULL); if (r != LIBUSB_SUCCESS) { |