Call rump_init() before using rump functionality.

This change should make these test cases consistently fail on all ports.

Related to PR kern/51096.
This commit is contained in:
jakllsch 2016-05-02 17:24:06 +00:00
parent 300e2ca473
commit ffe5c1f16e

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_hid.c,v 1.5 2016/01/09 14:31:19 jakllsch Exp $ */
/* $NetBSD: t_hid.c,v 1.6 2016/05/02 17:24:06 jakllsch Exp $ */
/*
* Copyright (c) 2016 Jonathan A. Kollasch
@ -27,13 +27,16 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_hid.c,v 1.5 2016/01/09 14:31:19 jakllsch Exp $");
__RCSID("$NetBSD: t_hid.c,v 1.6 2016/05/02 17:24:06 jakllsch Exp $");
#include <machine/types.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <atf-c.h>
#include <rump/rump.h>
#define hid_start_parse rumpns_hid_start_parse
#define hid_end_parse rumpns_hid_end_parse
#define hid_get_item rumpns_hid_get_item
@ -104,6 +107,8 @@ ATF_TC_BODY(khid, tc)
uhidevdebug = 0;
rump_init();
ret = locate_item(range_test_report_descriptor,
sizeof(range_test_report_descriptor), 0xff000003, 0, hid_input,
&hi);
@ -234,6 +239,8 @@ ATF_TC_BODY(khid_parse_just_pop, tc)
struct hid_data *hdp;
struct hid_item hi;
rump_init();
hdp = hid_start_parse(just_pop_report_descriptor,
sizeof just_pop_report_descriptor, hid_none);
while (hid_get_item(hdp, &hi) > 0) {