From nobody Tue Oct 28 11:45:01 2025 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=1599122112; cv=none; d=zohomail.com; s=zohoarc; b=OiYdRPm59NI/JGVlcR75bRR5wpuS8h8ZiacuT7EAwFfy8p7RJN166wcmCwEZEMeUzkYQ9aLMSU35kkjQMLd+9gtLdPrjUG99/xnf90fBmAoPK0K6T1SbHSfy72f0Qti0h+9qy06a03KvcSKrq9Fvb9yYqnLFbnAMfKbrcmRb+Bg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599122112; 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=AOceDgUhJcFyubHw/+EMBFvN3cPEnFJXi8B+bZPhtpU=; b=nPDLAoL7JnuQlERfc1bLq23tbPAgm0wWZT1yFNv3SzUyo9tTkeP8Dzd4eOToWVBrjHeSu/hrtVMhylWxCuAZGMCtK4GjNIxMX4ZWN/+HPL6KGSgf9uWn42WIOjpt6UH5bX4zsXPtmLVDQ/dtYMxUhCBM+8mq5yTdFumDd/GAySw= 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1599122112470302.64416432757946; Thu, 3 Sep 2020 01:35:12 -0700 (PDT) Received: from localhost ([::1]:39682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDki7-00041h-JS for importer@patchew.org; Thu, 03 Sep 2020 04:35:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfE-0007qR-Pw for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:12 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:35878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfD-0001WL-3S for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:12 -0400 Received: by mail-pf1-x444.google.com with SMTP id m8so1734650pfh.3 for ; Thu, 03 Sep 2020 01:32:10 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AOceDgUhJcFyubHw/+EMBFvN3cPEnFJXi8B+bZPhtpU=; b=KuSHpXP+Hp2FKf1lkcuSX/rC4uM9ATNb1h3KibdxC6BWAMa1AERJrAP0JgtlqyiWHF n5FZ3GEXkUL9GxT11q3pH1ruEnoVVYipJ0uRPYO0hoUwThfyJv/dC5Sv0N3Qa0MhQrPg 2FP5gKcvUGjMcx7TY91taniik4xQmp8Q1IGyqH/eS57+HsZXYpMU7lAPiPFomK0qhpX2 ezm5fKV6wSAE/e3o92rnYuliDvQSUbaXbljAOPC8RAKE05m4yPG1g+6r5p7HPP4Cc30h cZbTDm59OjL2I9SGBrRxgkeI0zzZzyD3lhZ8Csa8Zsj7IV70lgLsoSyYZQlg5WNzABwY 5i/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AOceDgUhJcFyubHw/+EMBFvN3cPEnFJXi8B+bZPhtpU=; b=pl/Sau+DBoKtqy6mjV+qQuNQlGfGMSh2D0r9jMJ4P/NSRRYArFOEjrl9aTRumDnSAC JDJb/IGAkT/LQSDQUhJpwS4PrLu0xJ6KMv+/b1iNC58T9tXDMIga5CyxxLooQqG2kjRY KNxSkU5YJEmToRqUS+12XDxjfUzLAaMXR13TbsRklj5dsg3a0czqwCyvnHVeiKb1Crse h279wVgDy7WUogj6tkNkeHKhm36MwdTuBlvvn4WMOb7g5ZzxQiVtIMY7mX3jyrHFalvo zOkV/m7gu35lyL+eY1kfQpsgIdTxXQLUkzUylz9ldcjfagchrjHYq9kbBJCI8XP22YYg phVg== X-Gm-Message-State: AOAM5328wCKZBfWurK06rnYySVopjuwSJTfRGHGvNHZVh0ikgF2svpDL Zt4L6YL3wjax+Ggmz2ASrvFmQpcekGJBgfms X-Google-Smtp-Source: ABdhPJwJLnR0mcQQoaJgtxkDdnKxegY88kLlIBdatdhrbyWq437AbISdzn6hAGwMlWf1JPQJwmrTRg== X-Received: by 2002:a17:902:e787:: with SMTP id cp7mr2816717plb.125.1599121929347; Thu, 03 Sep 2020 01:32:09 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 04/12] tests: handling signal on win32 properly Date: Thu, 3 Sep 2020 16:31:39 +0800 Message-Id: <20200903083147.707-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@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::444; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) Content-Type: text/plain; charset="utf-8" SIGABRT should use signal(SIGABRT, sigabrt_handler) to handle on win32 The error: E:/CI-Cor-Ready/xemu/qemu.org/tests/test-replication.c:559:33: error: inval= id use of undefined type 'struct sigaction' 559 | sigact =3D (struct sigaction) { | ^ Signed-off-by: Yonggang Luo --- tests/test-replication.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test-replication.c b/tests/test-replication.c index e0b03dafc2..9ab3666a90 100644 --- a/tests/test-replication.c +++ b/tests/test-replication.c @@ -554,6 +554,9 @@ static void sigabrt_handler(int signo) =20 static void setup_sigabrt_handler(void) { +#ifdef _WIN32 + signal(SIGABRT, sigabrt_handler); +#else struct sigaction sigact; =20 sigact =3D (struct sigaction) { @@ -562,6 +565,7 @@ static void setup_sigabrt_handler(void) }; sigemptyset(&sigact.sa_mask); sigaction(SIGABRT, &sigact, NULL); +#endif } =20 int main(int argc, char **argv) --=20 2.28.0.windows.1