From nobody Mon Feb 9 17:59:17 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1661336448; cv=none; d=zohomail.com; s=zohoarc; b=JUQ0BDRN/OWDXFkr7nsUWNhAGYIDW1RwgIokCzRcTyhh/MxXSGPVPHkepc/bcfW9fKWIyoD/RwsJcbRnWFYdzmMwlGqG9+g+LAnfXWL+UJR89K7r5/WmgZxiHsLI/3yj1eLrrpdiBcsEr+asEwtyAZhsu1TtU6NFoIurGi8iopo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661336448; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=W9655HKzuq1+51j74aBikX9dYDW+xgLkZuf/6fT2hgM=; b=mqmdSThdvEW/QwIF2T9OcrhQjanEqKbrvri45uhu52RMD+TeuQwmIFH/khjYiCKaiTFCjIHNuPyudFm8mSKDRDd9mHHTNxon/+OxWBgb/pez9n6pC5Z5jNec586rPIUOK26SaW8ROD8LpG8q71SVY7Hn2NN50oLaqdXKKPYOVLI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1661336448191191.0244769656332; Wed, 24 Aug 2022 03:20:48 -0700 (PDT) Received: from localhost ([::1]:43148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQnV8-0007kS-4S for importer@patchew.org; Wed, 24 Aug 2022 06:20:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQmtp-0002zk-Es for qemu-devel@nongnu.org; Wed, 24 Aug 2022 05:42:14 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:42698) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQmtn-0001XS-VP for qemu-devel@nongnu.org; Wed, 24 Aug 2022 05:42:13 -0400 Received: by mail-pg1-x52b.google.com with SMTP id q63so308900pga.9 for ; Wed, 24 Aug 2022 02:42:11 -0700 (PDT) Received: from ubuntu.. (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id b14-20020a170903228e00b001728eb339e2sm12165972plh.286.2022.08.24.02.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 02:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=W9655HKzuq1+51j74aBikX9dYDW+xgLkZuf/6fT2hgM=; b=LZ9T9xLYEDIxRmLrG3Z7caIqTnkKVucJaTIwdnqgRI/rNSwVne+Fh72ubSqCSFhn2B wuRns4mpJjX9lUQZikwgTmzTJIpzKmdAycv7DYJp3C2lcrK/6qXJ4qX4jzgcj02KO3Ur axb1Y7YVfrhiuCeFyT1U0GX1E4xh4W14vPlhvxgK487CNk+RkC4hN9LkVhO4E/a6TxUD hBUYaVAz8kB6mSKmq5E0W3y/38IbogIQOBSEwsn/cL6xyUsESHMg45y2xPxz2bEoc5Yn CMpw6rWI/C8kIghPoMNFwvzgpMf+VBfkaKe8GNiMGBUeuEe6j5qv6yo2SBLlmVGrtTV7 dcnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=W9655HKzuq1+51j74aBikX9dYDW+xgLkZuf/6fT2hgM=; b=VPU07YZGN03kYYnHGWub+T3O5zuqgHew3C8uYW9K5o15BjIi8aFZgWu6PJpJaiI2Dr 1X7xcudo482GZ09mYOYoIIBdiLgdkdSeucpQ0CYy4d12lkYUNo4IuN+Wu9/VwWIjFk3u eXGEWon1X34MlplsNhOQu6PHmmQ6gJJvq6t+BArUUou8c0tuSn0nBNxOOs7Bnka7C9Ma gMhlycttNt+v8Xsb2vqsroXbCZ15rn2ukeVfbr15EPyTXbCMtgW0xe4tdURguCu+vce1 o8u1PlzXmc9QKjd2Msjoh5kOirEx1n0ZITg/YZl0lyYy/whsMNIH8d21hpYTfyKbfh/r Juzw== X-Gm-Message-State: ACgBeo13Vh5nYHCxPwc/dYdaQfB+EkUWwhQsbPXxHf0A6gQx2RRorUAB FmuEg8p0vTq00IsKQeLIZiA8lAQrX5Y= X-Google-Smtp-Source: AA6agR4SM2xNBCe3ylE4R19QBJfDEEq6QBITiQSsCCr2necm9ff4/U1il/2Qt/bPhz+KUh5aL9GWyA== X-Received: by 2002:a62:be0e:0:b0:536:76fe:ee96 with SMTP id l14-20020a62be0e000000b0053676feee96mr14546120pff.44.1661334130469; Wed, 24 Aug 2022 02:42:10 -0700 (PDT) From: Bin Meng To: qemu-devel@nongnu.org Cc: Bin Meng , "Dr. David Alan Gilbert" , Juan Quintela , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH 13/51] tests/qtest: migration-test: Handle link() for win32 Date: Wed, 24 Aug 2022 17:39:51 +0800 Message-Id: <20220824094029.1634519-14-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220824094029.1634519-1-bmeng.cn@gmail.com> References: <20220824094029.1634519-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=bmeng.cn@gmail.com; helo=mail-pg1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1661336449847100001 Content-Type: text/plain; charset="utf-8" From: Bin Meng Windows does not provide a link() API like POSIX. Instead it provides a similar API CreateHardLink() that does the same thing, but with different argument order and return value. Signed-off-by: Bin Meng Reviewed-by: Dr. David Alan Gilbert --- tests/qtest/migration-test.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 38356d4aba..af9250750b 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -876,9 +876,17 @@ test_migrate_tls_x509_start_common(QTestState *from, g_mkdir_with_parents(data->workdir, 0700); =20 test_tls_init(data->keyfile); +#ifndef _WIN32 g_assert(link(data->keyfile, data->serverkey) =3D=3D 0); +#else + g_assert(CreateHardLink(data->serverkey, data->keyfile, NULL) !=3D 0); +#endif if (args->clientcert) { +#ifndef _WIN32 g_assert(link(data->keyfile, data->clientkey) =3D=3D 0); +#else + g_assert(CreateHardLink(data->clientkey, data->keyfile, NULL) !=3D= 0); +#endif } =20 TLS_ROOT_REQ_SIMPLE(cacertreq, data->cacert); --=20 2.34.1