From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD253C43334 for ; Fri, 8 Jul 2022 16:16:30 +0000 (UTC) Received: from localhost ([::1]:55766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9qeb-0007dO-KT for qemu-devel@archiver.kernel.org; Fri, 08 Jul 2022 12:16:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9q0i-0006j8-U4 for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:35:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:30970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9q0f-0007MY-6q for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:35:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657294509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hZ2peM0uVZJSEZ/l9GiAyaRs488ff6AY7BhCL5kQl9I=; b=NsqmgU9AC123JfbNCDad2HQSQ92oFCbL6R5m4D7qg+j/YsDZxMhbtN8fvZ+tdphfuXz5DB shfEViX+D/JU3eo4ptQO7hjql30QjAsRKlb9p0SBmpKuLb9528c8Wvp4qc5p6Mt8fEa6kh Z8hX+lfOUEJNzs6LxDzybEndSfdLGuE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-631-fJSe32oMMb-b4em6VZwY3A-1; Fri, 08 Jul 2022 11:35:06 -0400 X-MC-Unique: fJSe32oMMb-b4em6VZwY3A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2CBD63C01DE5; Fri, 8 Jul 2022 15:35:06 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id B30318A4D1; Fri, 8 Jul 2022 15:35:05 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Cc: Hanna Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Daniel Berrange , Thomas Huth , Wainer dos Santos Moschetta , qemu-block@nongnu.org, Kevin Wolf , Beraldo Leal , Michael Roth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [PATCH v4 02/12] tests/vm: use 'cp' instead of 'ln' for temporary vm images Date: Fri, 8 Jul 2022 11:34:53 -0400 Message-Id: <20220708153503.18864-3-jsnow@redhat.com> In-Reply-To: <20220708153503.18864-1-jsnow@redhat.com> References: <20220708153503.18864-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" If the initial setup fails, you've permanently altered the state of the downloaded image in an unknowable way. Use 'cp' like our other test setup scripts do. Signed-off-by: John Snow Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé --- tests/vm/centos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/centos b/tests/vm/centos index 5c7bc1c1a9a..be4f6ff2f14 100755 --- a/tests/vm/centos +++ b/tests/vm/centos @@ -34,7 +34,7 @@ class CentosVM(basevm.BaseVM): def build_image(self, img): cimg = self._download_with_cache("https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2") img_tmp = img + ".tmp" - subprocess.check_call(["ln", "-f", cimg, img_tmp]) + subprocess.check_call(['cp', '-f', cimg, img_tmp]) self.exec_qemu_img("resize", img_tmp, "50G") self.boot(img_tmp, extra_args = ["-cdrom", self.gen_cloud_init_iso()]) self.wait_ssh() -- 2.34.3