From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 871D31F0E50 for ; Wed, 14 May 2025 18:28:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747247324; cv=none; b=jXdsqSSKaZhoT2a7xnZ9BDpVaDaVllpYm0xJRwlqXLPF9+m9+TOrCFeakERvKqY+/3thMv0NBAEB71K0+RpP80T3XVo6Hf3dvaJLGldQ9CLI0JnInN5In8EmhC59BJumi4Ip+1k+WD/OKJilg1mUj2ud/T5Gt5BN05Y08nCvzAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747247324; c=relaxed/simple; bh=pRwYXM24Yant3kgYdeDbm95zWkaI6To80EY5v2PZSuc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JZRlrx+T3PZE7iLLuVzhLzsSKhldgX82J2YXpBPYacis9bLzKp9CaVEEl3/z0YDFBVmrxOGNjZzXK529B4j/JSwAbWDEbPmxZ96TraqsSvHJr2h5goAlqO+tFRGBqDccVMlQ1GF6n51eLqLvHq4OvaLIAMPxq101mew3vPzAlds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DuU8Rvmi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DuU8Rvmi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E88E2C4CEE3; Wed, 14 May 2025 18:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747247324; bh=pRwYXM24Yant3kgYdeDbm95zWkaI6To80EY5v2PZSuc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DuU8RvmidQfM3UgiRYp6totFHJOFAVZwI2yLOeDvRq9OYaZfE4c6uqqdIs9e04AEb ey1iePQZSjQrw1a7XKda2LKqH1B1mY8rQFp5pbcxnWw5sdHi730KtQuPoK6LsxotIJ qx5XF4GY5zYPVfWvq6OSZvt2nKjXR2ljzxkudFR0ysrGAZDKV0U+wpcrGrONSQUxRO 8DBUHtE9FslTcvReNYq5bNf54cx+oiGAxjdtRyLpCQcvKiNCnHOC9B8OpNlXIiuBvq 1feSJJYJ7QMAyx9+E+3JOa+OtKtwVolucn+1HEngXnMLHuJt7slccauQsrITpWRhMC lxCDym60DnR2A== Date: Wed, 14 May 2025 11:28:42 -0700 From: Luis Chamberlain To: Daniel Gomez Cc: kdevops@lists.linux.dev, Daniel Gomez Subject: Re: [PATCH v2 0/4] guestfs: bringup: add debug mode Message-ID: References: <20250512-bringup-guestfs-debug-v2-0-bd5691108448@samsung.com> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250512-bringup-guestfs-debug-v2-0-bd5691108448@samsung.com> On Mon, May 12, 2025 at 03:36:01PM +0200, Daniel Gomez wrote: > This has helped me during debug sessions of bringup script. "Resend" > with minor changes. > > Adding debug option in bash bringup_guestfs.sh allows to check for > commands executions (virsh, chmod, cp, virt-sysprep, etc) and variables. > > Add 3 levels of debug: > - Disabled: This is the current behaviour and is the default. > - set -x (debug mode 0): Allows to print the executed commands but if > they fail, the script continues. > - set -euxo pipefail (debug mode 1): mode 0 + variables are printed + > script fails if a command does not succeed. > > While debugging, I noticed about small bash errors that we ignore, such > as unbound variables. So, this also fixes the issues found while debug > mode 1 was enabled. > > --- Reviewed-by: Luis Chamberlain Luis