From nobody Fri Apr 19 21:01:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1568117585; cv=none; d=zoho.com; s=zohoarc; b=OFBc84fROgS9GQeTgy5vhc468QcybmKx44qy3H4BCeaHLpnvvA23fU3KMgJ8J+GWHmbF8x6+x1pYPcT6Ewh5fHbgLfOlI+pfzhBB3QjaFE9Dzc3T1RtzPXV7kY1CIQ1AVOF4zrdKU/5AWAjFPHd0LN8We74ZgXoo60/3Bcj7dvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117585; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=dSv7ZxElCRFyTWEIe7m70K0F5fop2cVgVu6agAKnZlI=; b=mFKay/SMPsQNSMtJipOFPVj8X8OPJU2uKwyVmzteY/NuK0EHYNGsZ56LayyLKW/hSFLRXaaL2N2Rkjhu29/4fGJylSgA/DWJkBx45vHE1u/lr1eUE0hsNlTR11aaU5ZWUEi36P5F4WuHAT8IZyWzobyTht/MvBCZFrpXhCjOcCM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568117585052788.5757765801425; Tue, 10 Sep 2019 05:13:05 -0700 (PDT) Received: from localhost ([::1]:39134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7f12-0007bM-8e for importer@patchew.org; Tue, 10 Sep 2019 08:13:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53156) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7eyQ-0006Et-Kf for qemu-devel@nongnu.org; Tue, 10 Sep 2019 08:10:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7eyP-0006M7-Nm for qemu-devel@nongnu.org; Tue, 10 Sep 2019 08:10:18 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:3006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i7eyP-0006KG-56 for qemu-devel@nongnu.org; Tue, 10 Sep 2019 08:10:17 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.5]) by rmmx-syy-dmz-app01-12001 (RichMail) with SMTP id 2ee15d77928b8a4-e1eb3; Tue, 10 Sep 2019 20:09:51 +0800 (CST) Received: from localhost.localdomain (unknown[112.25.154.148]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee35d7792822a8-7d7f1; Tue, 10 Sep 2019 20:09:51 +0800 (CST) X-RM-TRANSID: 2ee15d77928b8a4-e1eb3 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee35d7792822a8-7d7f1 From: Mao Zhongyi To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2019 20:09:25 +0800 Message-Id: <20190910120927.1669283-2-maozhongyi@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190910120927.1669283-1-maozhongyi@cmss.chinamobile.com> References: <20190910120927.1669283-1-maozhongyi@cmss.chinamobile.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 221.176.66.79 Subject: [Qemu-devel] [PATCH 1/3] tests/migration: mem leak fix 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: tony.nguyen@bt.com, armbru@redhat.com, Mao Zhongyi , laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Cc: armbru@redhat.com Cc: laurent@vivier.eu Cc: tony.nguyen@bt.com Signed-off-by: Mao Zhongyi --- tests/migration/stress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/migration/stress.c b/tests/migration/stress.c index d9aa4afe92..e6c9a6b243 100644 --- a/tests/migration/stress.c +++ b/tests/migration/stress.c @@ -181,6 +181,8 @@ static int stressone(unsigned long long ramsizeMB) if (!ram) { fprintf(stderr, "%s (%05d): ERROR: cannot allocate %llu MB of RAM:= %s\n", argv0, gettid(), ramsizeMB, strerror(errno)); + if (data) + free(data); return -1; } if (!data) { --=20 2.17.1 From nobody Fri Apr 19 21:01:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1568117758; cv=none; d=zoho.com; s=zohoarc; b=n9j4noWlqmoSniY8FiW8Sgb9PusJXejUu4qxEARCOK4OI3+ab3eV6khTRsZ7MxOwUdPjTqYDOUb6AF/2Omf7tDNXEwYDDlTpG0HTwlC5/W62VuigdLrSuyIiHthaMRqwfkBpz5lcamhNlToW0wKhHrKYm2dRhLc62T3fTXyu4Ug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117758; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=AHifQx23KvTydX4DRv/se6EVNn5aSylBBMEnfJCG6nc=; b=PPqAkJQoyCz4H4m9v/Ee1ZR0+r8iGeYx9rXHfldqRSFDPc86Zq/VzX5GSB6sollOEMghn6kN8ErlHcugk2vw9OpTg0e6M9RridykxtKXvKN+QBDxPdGc28Qd80oLBDO+zG2Zbe4dVjLxIvsj+7s0Zjga7hRRJRG1LR6BMINoEHQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568117758292362.6149207509418; Tue, 10 Sep 2019 05:15:58 -0700 (PDT) Received: from localhost ([::1]:39158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7f3t-0001Jc-5N for importer@patchew.org; Tue, 10 Sep 2019 08:15:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53163) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7eyQ-0006F3-Vp for qemu-devel@nongnu.org; Tue, 10 Sep 2019 08:10:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7eyM-0006Kf-64 for qemu-devel@nongnu.org; Tue, 10 Sep 2019 08:10:18 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:8683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i7eyL-0006Ht-Ef for qemu-devel@nongnu.org; Tue, 10 Sep 2019 08:10:14 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.5]) by rmmx-syy-dmz-app07-12007 (RichMail) with SMTP id 2ee75d7792958aa-e2062; Tue, 10 Sep 2019 20:10:00 +0800 (CST) Received: from localhost.localdomain (unknown[112.25.154.148]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee35d7792822a8-7d815; Tue, 10 Sep 2019 20:10:00 +0800 (CST) X-RM-TRANSID: 2ee75d7792958aa-e2062 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee35d7792822a8-7d815 From: Mao Zhongyi To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2019 20:09:26 +0800 Message-Id: <20190910120927.1669283-3-maozhongyi@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190910120927.1669283-1-maozhongyi@cmss.chinamobile.com> References: <20190910120927.1669283-1-maozhongyi@cmss.chinamobile.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 221.176.66.80 Subject: [Qemu-devel] [PATCH 2/3] tests/migration: fix a typo in comment 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: tony.nguyen@bt.com, armbru@redhat.com, Mao Zhongyi , laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Cc: armbru@redhat.com Cc: laurent@vivier.eu Cc: tony.nguyen@bt.com Signed-off-by: Mao Zhongyi Reviewed-by: Alex Benn=C3=A9e --- tests/migration/stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/migration/stress.c b/tests/migration/stress.c index e6c9a6b243..4bc3a249e6 100644 --- a/tests/migration/stress.c +++ b/tests/migration/stress.c @@ -194,7 +194,7 @@ static int stressone(unsigned long long ramsizeMB) =20 /* We don't care about initial state, but we do want * to fault it all into RAM, otherwise the first iter - * of the loop below will be quite slow. We cna't use + * of the loop below will be quite slow. We can't use * 0x0 as the byte as gcc optimizes that away into a * calloc instead :-) */ memset(ram, 0xfe, ramsizeMB * 1024 * 1024); --=20 2.17.1 From nobody Fri Apr 19 21:01:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1568117591; cv=none; d=zoho.com; s=zohoarc; b=gDTHf86YCoCCTxWQFCTxJtV4bShTsU/kMOVWTF23QHzx0UnSRPJXeMnhp+MhzNyitEgJs1eBtTKc84K6v/znv0FM+51ekMEVkozLelXkn2adSpLLpLZ6zeuDIymSnXpZhZXl4vIOxYgIns7blFyHejGWFHtIUGcGuzJA7vPdxOU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117591; h=Content-Type: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:ARC-Authentication-Results; bh=18TIh17H5TygIOdO3IX+8X8WjigmMcIr6hAIIcAC3ss=; b=FDCNEFrjIkT6bOMJXRZZbtPkJxV5FNbfoq0gUtIlp8uNRvxomESsO0+/n/v0zMg+5570xqUVszgVoxQAeLbbA65B99p5IKPiGj7msQzviyCu1xy/6DGQck0pZIMAZdO3Gf4WJVSrj7++MxK66DroX6D4bUR5KQdjrP1HmaHPpGk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15681175917181016.9742400290601; Tue, 10 Sep 2019 05:13:11 -0700 (PDT) Received: from localhost ([::1]:39136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7f18-0007fN-NM for importer@patchew.org; Tue, 10 Sep 2019 08:13:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53171) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7eyR-0006FU-Cj for qemu-devel@nongnu.org; Tue, 10 Sep 2019 08:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7eyQ-0006MX-G8 for qemu-devel@nongnu.org; Tue, 10 Sep 2019 08:10:19 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:8562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i7eyP-0006LW-Tp for qemu-devel@nongnu.org; Tue, 10 Sep 2019 08:10:18 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.5]) by rmmx-syy-dmz-app12-12012 (RichMail) with SMTP id 2eec5d77929f6f2-e1ea2; Tue, 10 Sep 2019 20:10:07 +0800 (CST) Received: from localhost.localdomain (unknown[112.25.154.148]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee35d7792822a8-7d847; Tue, 10 Sep 2019 20:10:07 +0800 (CST) X-RM-TRANSID: 2eec5d77929f6f2-e1ea2 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee35d7792822a8-7d847 From: Mao Zhongyi To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2019 20:09:27 +0800 Message-Id: <20190910120927.1669283-4-maozhongyi@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190910120927.1669283-1-maozhongyi@cmss.chinamobile.com> References: <20190910120927.1669283-1-maozhongyi@cmss.chinamobile.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 221.176.66.81 Subject: [Qemu-devel] =?utf-8?q?=5BPATCH_3/3=5D_tests/migration=EF=BC=9Afi?= =?utf-8?q?x_unreachable_path_in_stress_test?= 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: tony.nguyen@bt.com, armbru@redhat.com, Mao Zhongyi , laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" if stress function always return 0, the path 'if (stress(ramsizeGB, ncpus) < 0)' is nerver unreachable, so fix it to allow the test failed. Cc: armbru@redhat.com Cc: laurent@vivier.eu Cc: tony.nguyen@bt.com Signed-off-by: Mao Zhongyi --- tests/migration/stress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/migration/stress.c b/tests/migration/stress.c index 4bc3a249e6..36f7d71d37 100644 --- a/tests/migration/stress.c +++ b/tests/migration/stress.c @@ -232,6 +232,8 @@ static int stressone(unsigned long long ramsizeMB) =20 free(data); free(ram); + + return 0; } =20 =20 @@ -256,9 +258,7 @@ static int stress(unsigned long long ramsizeGB, int ncp= us) stressthread, &ramsizeMB); } =20 - stressone(ramsizeMB); - - return 0; + return stressone(ramsizeMB); } =20 =20 --=20 2.17.1