示例#1
0
文件: wbclient.c 项目: runt18/samba
static bool test_wbc_pingdc(struct torture_context *tctx)
{
    struct wbcInterfaceDetails *details;

    torture_assert_wbc_equal(tctx, wbcPingDc("random_string", NULL), WBC_ERR_DOMAIN_NOT_FOUND,
                             "%s", "wbcPingDc failed");
    torture_assert_wbc_ok(tctx, wbcPingDc(NULL, NULL),
                          "%s", "wbcPingDc failed");

    torture_assert_wbc_ok(tctx, wbcInterfaceDetails(&details),
                          "%s", "wbcInterfaceDetails failed");
    torture_assert(tctx, details,
                   "wbcInterfaceDetails returned NULL pointer");
    torture_assert(tctx, details->netbios_domain,
                   "wbcInterfaceDetails returned NULL netbios_domain");

    torture_assert_wbc_ok(tctx, wbcPingDc(details->netbios_domain, NULL),
                          "wbcPingDc(%s) failed", details->netbios_domain);

    torture_assert_wbc_ok(tctx, wbcPingDc("BUILTIN", NULL),
                          "%s", "wbcPingDc(BUILTIN) failed");

    wbcFreeMemory(details);
    return true;
}
示例#2
0
文件: wbclient.c 项目: Arkhont/samba
static bool test_wbc_pingdc(struct torture_context *tctx)
{
	torture_assert_wbc_equal(tctx, wbcPingDc("random_string", NULL), WBC_ERR_NOT_IMPLEMENTED,
		"wbcPingDc failed");
	torture_assert_wbc_ok(tctx, wbcPingDc(NULL, NULL),
		"wbcPingDc failed");

	return true;
}