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.133.124]) by passt.top (Postfix) with ESMTP id 2F05B5A026D for ; Mon, 11 Dec 2023 19:50:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702320619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IlOGaPzF4siyzljthY97EUb12KNdUolDA99l4mLQhfI=; b=HwKxIylTy41WsUTirnT2CRJT7TnRX/K8ffE1vJ450cUJ/c/Y/bnv93Ol7FFFrFNYzsWM4D L7nfVqOX+XG9cc0P6vsCqVqq+7JQ+QASPVuTDCrpKWKV852ceJxnH3o7atlp93pVr0guyQ sO82H0u5hkoQaLGfLwwmLX83avyrrlM= 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-510-oluxSb3IMca6gPoHYdLYVQ-1; Mon, 11 Dec 2023 13:50:17 -0500 X-MC-Unique: oluxSb3IMca6gPoHYdLYVQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 7737184AEEB for ; Mon, 11 Dec 2023 18:50:17 +0000 (UTC) Received: from fenrir.redhat.com (unknown [10.22.32.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CA4D1121312; Mon, 11 Dec 2023 18:50:17 +0000 (UTC) From: Jon Maloy To: passt-dev@passt.top, sbrivio@redhat.com, lvivier@redhat.com, dgibson@redhat.com, jmaloy@redhat.com Subject: test: make passt.mbuto script more robust Date: Mon, 11 Dec 2023 13:50:14 -0500 Message-ID: <20231211185014.54641-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 6CX4H7JL5Q62WV6PSJ23VDD7HRJRE4T3 X-Message-ID-Hash: 6CX4H7JL5Q62WV6PSJ23VDD7HRJRE4T3 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 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: 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 + ln -s /usr/sbin /sbin cat > /sbin/dhclient-script << EOF #!/bin/sh LOG=/var/log/dhclient-script.log @@ -47,7 +49,6 @@ set >> \$LOG exit 0 EOF chmod 755 /sbin/dhclient-script - ln -s /sbin /usr/sbin ln -s /bin /usr/bin ln -s /run /var/run :> /etc/fstab -- 2.39.2