From: Stefano Brivio <sbrivio@redhat.com>
To: Jon Maloy <jmaloy@redhat.com>
Cc: passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com
Subject: Re: test: make passt.mbuto script more robust
Date: Tue, 12 Dec 2023 00:15:52 +0100 [thread overview]
Message-ID: <20231212001552.744d2c29@elisabeth> (raw)
In-Reply-To: <20231211213955.15f55086@elisabeth>
On Mon, 11 Dec 2023 21:39:55 +0100
Stefano Brivio <sbrivio@redhat.com> wrote:
> On Mon, 11 Dec 2023 13:50:14 -0500
> Jon Maloy <jmaloy@redhat.com> wrote:
>
> > From: Jon Paul Maloy <jmaloy@redhat.com>
> >
> > 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 <jmaloy@redhat.com>
> > ---
> > 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
next prev parent reply other threads:[~2023-12-11 23:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 18:50 test: make passt.mbuto script more robust Jon Maloy
2023-12-11 20:39 ` Stefano Brivio
2023-12-11 23:15 ` Stefano Brivio [this message]
2023-12-12 14:53 ` Jon Maloy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231212001552.744d2c29@elisabeth \
--to=sbrivio@redhat.com \
--cc=dgibson@redhat.com \
--cc=jmaloy@redhat.com \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).