From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id F39C75A026D for ; Tue, 12 Dec 2023 00:15:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702336557; 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=XgJZH6XHngBu6kpNuq44W2IMoB1eSI/hEIzqaujdQyU=; b=SsNiMOcMRiJ/EAFrXX3bbqevkLS3x1xh2Ycy4xDu7xfEcczx4DsoaJYOawfHQxl1LAOjsI IYWu75WE0ETRzpTlcDLp3Fj2MaKSWRQxxbDX5AkCmKzVUWCEuXHrfT4c0zL5RpaPSsDfH4 jwJYHBPXLM6VrNgwd5UDkbj9AhA0KfI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-303-b7PiQQeDPp2Uyw_ME61tgg-1; Mon, 11 Dec 2023 18:15:56 -0500 X-MC-Unique: b7PiQQeDPp2Uyw_ME61tgg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 040C5185A781 for ; Mon, 11 Dec 2023 23:15:56 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B1DC32026D66; Mon, 11 Dec 2023 23:15:54 +0000 (UTC) Date: Tue, 12 Dec 2023 00:15:52 +0100 From: Stefano Brivio To: Jon Maloy Subject: Re: test: make passt.mbuto script more robust Message-ID: <20231212001552.744d2c29@elisabeth> In-Reply-To: <20231211213955.15f55086@elisabeth> References: <20231211185014.54641-1-jmaloy@redhat.com> <20231211213955.15f55086@elisabeth> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: BF5NOSGO7HFKEI3WJ7Y6DYYLGS5TB43C X-Message-ID-Hash: BF5NOSGO7HFKEI3WJ7Y6DYYLGS5TB43C X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, 11 Dec 2023 21:39:55 +0100 Stefano Brivio wrote: > On Mon, 11 Dec 2023 13:50:14 -0500 > Jon Maloy wrote: > > > From: Jon Paul Maloy > > > > Creation of a symbolic link from /sbin to /usr/sbin fails if /sbin > > exists and is non-empty. This is the case on Ubuntu-23.04. > > > > We fix this by removing /sbin before creating the link. > > > > Signed-off-by: Jon Maloy > > --- > > test/passt.mbuto | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/test/passt.mbuto b/test/passt.mbuto > > index 90816d2..12d7f50 100755 > > --- a/test/passt.mbuto > > +++ b/test/passt.mbuto > > @@ -26,6 +26,8 @@ DIRS="${DIRS} /tmp /sbin /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/. > > COPIES="${COPIES} small.bin,/root/small.bin medium.bin,/root/medium.bin big.bin,/root/big.bin" > > > > FIXUP="${FIXUP}"' > > + rm -rf /sbin > > This works on Ubuntu, but to be safer with other distributions: > shouldn't we first move anything we need that happens to be in /sbin to > /usr/sbin? > > On (your version of) Ubuntu /sbin is created because of $DIRS above, > but let's say that another version or another distribution has ip(8) > at /sbin/ip, we'll get rid of it. > > That is, if you add /usr/sbin explicitly to DIRS above (to make sure it > exists), and then, here, do: > > mv /sbin/* /sbin || : Gah, sorry, I meant: mv /sbin/* /usr/sbin/ || : -- Stefano