Beispiel #1
0
static int test_packet_table(hid_t fid)
{

    if( test_create_close(fid) < 0 )
        return -1;

    if( test_open(fid) < 0 )
        return -1;

    /* test_append must be run before test_count and test_read, as it */
    /* creates the packet table they use. */
    if( test_append(fid) < 0 )
        return -1;

    /* These tests will not necessarily cause failures in each other,
           so we don't abort the other tests if one fails. */
    test_read(fid);
    test_get_next(fid);
    test_big_table(fid);
    test_rw_nonnative_dt(fid);
#ifdef VLPT_REMOVED
    test_varlen(fid);
#endif /* VLPT_REMOVED */
    test_opaque(fid);
    test_compress();
    test_error(fid);

    return 0;
}
Beispiel #2
0
int main(int argc, char **argv)
{
	int fd;

	fd = drm_open_matching("8086:*", 0);
	if (fd < 0) {
		fprintf(stderr, "failed to open intel drm device\n");
		return 0;
	}

	test_bad_close(fd);
	test_create_close(fd);
	test_create_fd_close(fd);

	return 0;
}