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 D35495A026F for ; Tue, 12 Dec 2023 15:53:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702392786; 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=2I0nVz2d2J2zUfkJ8JpLMZCIq5lFOiBsmtTE+Ni5GEo=; b=VJNQvpy6Qwt1xiFbLeF5f4AQ7xRSFReqI9hYlFzdUXHI2fDexS/Fe+8lMprCjy49T3WjOr RLb+ShGr+fWXxQT0ZIhyxg6x93kLfoy9z7hyI/2HVq70T+1CESImkTEIoM0CI7EiQXoCPL fhRxWEuBC3IMIMk2sdDA7WPt6H4pAyk= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-7-qcS5muLPMEqSCNLEIKYNtg-1; Tue, 12 Dec 2023 09:53:05 -0500 X-MC-Unique: qcS5muLPMEqSCNLEIKYNtg-1 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-425965b3da4so82902321cf.1 for ; Tue, 12 Dec 2023 06:53:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702392784; x=1702997584; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2I0nVz2d2J2zUfkJ8JpLMZCIq5lFOiBsmtTE+Ni5GEo=; b=v0DZUFYd5MRxMyjVxQp7hYVnXH9W7s25HjwWRcmYyCvkOaCJoJ2S1A7kwmN/ybUsWH JWL3QELX1C8KplSilcvUN0M/UqpJNS5W+Jseu2bOLNSqBchR+ztUdaG6PZEmvhVPUV/q aUyrCYYg4kVc/w9/v+j4xoJz6keJ07RACFbwtI9N5/uQuk9xt9aRRvmdbbTx3HkzNKCp xNEKRWDFM/4s/MYHCyAxWH0VC4vz8QIwQ9168Jnnj5csXXF0jEQEnm6oPRvHlSVNCU/I lveitT9tfKTl6TavCK4EscBBBrSRnNc7/QCKuXIjFdkXfPFfNU6OVdRHYZLHVGi4AsMi H41g== X-Gm-Message-State: AOJu0YycEbsdqvJ3MYAmWw4bsuZ445rX1csfcq9iTtunAOh5e4Tnrt5R 16NPvW6mhkmuNLONYO//Ld3IFuWqm36ZmkzCsdWBtaAMlRwkVjT4tRL5mDCzlvnmoh8eYFyDHYM x+RHqJv9yiRxT X-Received: by 2002:a05:622a:194:b0:423:732e:c345 with SMTP id s20-20020a05622a019400b00423732ec345mr9617730qtw.26.1702392784729; Tue, 12 Dec 2023 06:53:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2j78bQDcd7z98cCyns4rOzYdTI98ZRC1jV1Mfq3FbAXiT0AaIw96UHzZG44xZFSpR3rZJ9A== X-Received: by 2002:a05:622a:194:b0:423:732e:c345 with SMTP id s20-20020a05622a019400b00423732ec345mr9617723qtw.26.1702392784425; Tue, 12 Dec 2023 06:53:04 -0800 (PST) Received: from [10.0.0.97] ([24.225.234.80]) by smtp.gmail.com with ESMTPSA id cj10-20020a05622a258a00b004259bbf166esm4037441qtb.63.2023.12.12.06.53.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Dec 2023 06:53:04 -0800 (PST) Message-ID: <4b244b41-c619-6ef7-0f40-208e14f3b7ac@redhat.com> Date: Tue, 12 Dec 2023 09:53:03 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: test: make passt.mbuto script more robust To: Stefano Brivio References: <20231211185014.54641-1-jmaloy@redhat.com> <20231211213955.15f55086@elisabeth> <20231212001552.744d2c29@elisabeth> From: Jon Maloy In-Reply-To: <20231212001552.744d2c29@elisabeth> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: O7T35SUE2WOPTLF7TBV5SY2RKWPGJVXJ X-Message-ID-Hash: O7T35SUE2WOPTLF7TBV5SY2RKWPGJVXJ X-MailFrom: jmaloy@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 2023-12-11 18:15, Stefano Brivio wrote: > 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/ || : > I susspected so :-) I will try it tomorrow. ///jon