From 2163aba6d218efee48ad26ce7c8ded59481a97bb Mon Sep 17 00:00:00 2001 From: jakllsch Date: Thu, 5 May 2016 17:40:26 +0000 Subject: Use rump_schedule() before calling things in the rump context. Hopefully fixes these tests on all ports. --- tests/dev/usb/t_hid.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'tests/dev') diff --git a/tests/dev/usb/t_hid.c b/tests/dev/usb/t_hid.c index f05fe3dd14f..31c289b6cc8 100644 --- a/tests/dev/usb/t_hid.c +++ b/tests/dev/usb/t_hid.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_hid.c,v 1.7 2016/05/05 16:55:56 jakllsch Exp $ */ +/* $NetBSD: t_hid.c,v 1.8 2016/05/05 17:40:26 jakllsch Exp $ */ /* * Copyright (c) 2016 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_hid.c,v 1.7 2016/05/05 16:55:56 jakllsch Exp $"); +__RCSID("$NetBSD: t_hid.c,v 1.8 2016/05/05 17:40:26 jakllsch Exp $"); #include #include @@ -105,12 +105,12 @@ ATF_TC_BODY(khid, tc) int ret; struct hid_item hi; - atf_tc_expect_fail("test case does not use rump correctly"); - uhidevdebug = 0; rump_init(); + rump_schedule(); + ret = locate_item(range_test_report_descriptor, sizeof(range_test_report_descriptor), 0xff000003, 0, hid_input, &hi); @@ -225,6 +225,8 @@ ATF_TC_BODY(khid, tc) &hi.loc), 0xfe); MYlx_ATF_CHECK_EQ(hid_get_udata(unsigned_range_test_maximum_report, &hi.loc), 0xff); + + rump_unschedule(); } ATF_TC(khid_parse_just_pop); @@ -241,15 +243,17 @@ ATF_TC_BODY(khid_parse_just_pop, tc) struct hid_data *hdp; struct hid_item hi; - atf_tc_expect_fail("test case does not use rump correctly"); - rump_init(); + rump_schedule(); + hdp = hid_start_parse(just_pop_report_descriptor, sizeof just_pop_report_descriptor, hid_none); while (hid_get_item(hdp, &hi) > 0) { } hid_end_parse(hdp); + + rump_unschedule(); } ATF_TP_ADD_TCS(tp) -- cgit