From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7008446828784910336 X-Received: by 2002:a05:6402:3454:: with SMTP id l20mr5227754edc.83.1631781201594; Thu, 16 Sep 2021 01:33:21 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:81d4:: with SMTP id e20ls1272019ejx.2.gmail; Thu, 16 Sep 2021 01:33:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymMz5CQrn+2aHrk9AmHxfOCbvke4exvTMG4YFljjPo3+AhvxPBnTHtNx7tMaSs/osuNPxR X-Received: by 2002:a17:907:98a5:: with SMTP id ju5mr4719690ejc.378.1631781200751; Thu, 16 Sep 2021 01:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631781200; cv=none; d=google.com; s=arc-20160816; b=kqCDfNs+7KZlrNhNa5bBdLJPqxW/t8P/2Gke/3X0rkZrwztkGwVseHRTe84rh3z0Xy eYhL9vUcuM1PRAjmgHy0zl6cHJ3/IxNh516E4m7FuzzllZ04W/O6sVP7uLErQxjIy5Ju NeJCbENLPqE0w9pkrJG7k2tXQo0+J9GjPKyiAkxmxBQoiM03b8eL1hiayodcBMF8EYGc TTP8uT0AOaleslxCAZyR02co9s4o1gwJzeO6sXlvb126h2LJoNYfrL0d6ZwZXVqkE4zH pY5HMrhYrqGw0sGQYrk/9n2gCsbuTlqb5k85JLrStksxH+8RHnUtYTqYJghSwB5+L+BP k6ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=rFqNh78TdU3ZFL1VrLoGFooIlyJvUbZstmw9S9VIYoc=; b=vkE85GOxd/jp1iUQn+b6phlQa9tBuSOdUWjAkcPrgY/O+AOG9znlbotDKRbm4PgrtC 4bOrUsj87AhL0jBlTJuA/IiK3P9k/brHVAiYHhgmoP9Gmzik9m+OhrRDgz/vkQIB9VEh a84Y5i7pN7ku2ex3Ec/J4w0JGRa0/2k9BcXhLoivF2+3pM8xzSwozTgI5r6K/TozbG5U SjxyBm3iBTRvwU9rxC1uK1DuVJhcW3VoIqeGkinoriVIl5iU3EQAK6/03NajdbJl3QuG f2PZqs/+S9z6z0HLw8taf/L8PrmkCnm+R7/nBArQst/v71VgRPPkFtzZYVvZ8JF89NQW RpdQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id r23si518736edy.3.2021.09.16.01.33.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Sep 2021 01:33:20 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from localhost.localdomain (mm-240-58-214-37.mgts.dynamic.pppoe.byfly.by [37.214.58.240] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 18G8X2xI021529 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Sep 2021 10:33:18 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v11 05/16] vm_boot_test: Fix log file path in vm_boot_test Date: Thu, 16 Sep 2021 11:32:42 +0300 Message-Id: <20210916083253.53037-6-amikan@ilbers.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210916083253.53037-1-amikan@ilbers.de> References: <20210916083253.53037-1-amikan@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: v0vmWrWCH4Oa Make log filename random and store it in build folder. Signed-off-by: Anton Mikanovich --- testsuite/vm_boot_test/vm_boot_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testsuite/vm_boot_test/vm_boot_test.py b/testsuite/vm_boot_test/vm_boot_test.py index 96e02f7..64dfda6 100644 --- a/testsuite/vm_boot_test/vm_boot_test.py +++ b/testsuite/vm_boot_test/vm_boot_test.py @@ -4,6 +4,7 @@ import os import subprocess32 import sys import time +import tempfile from os.path import dirname sys.path.append(dirname(__file__) + '/..') @@ -26,9 +27,9 @@ class VmBootTest(Test): self.log.info('Isar build folder is: ' + build_dir) self.log.info('===================================================') - output_file = '/tmp/vm_boot_test.log' - if os.path.exists(output_file): - os.remove(output_file) + fd, output_file = tempfile.mkstemp(suffix='_log.txt', + prefix='vm_start_' + distro + '_' + + arch + '_', dir=build_dir, text=True) cmdline = start_vm.format_qemu_cmdline(arch, build_dir, distro, output_file, None) -- 2.25.1