All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xen.org, wei.liu2@citrix.com,
	ian.campbell@citrix.com,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH v5] OSSTEST: introduce a raisin build test
Date: Tue, 12 May 2015 19:04:53 +0100	[thread overview]
Message-ID: <alpine.DEB.2.02.1505121851170.20496@kaball.uk.xensource.com> (raw)
In-Reply-To: <21842.14869.478809.933823@mariner.uk.xensource.com>

On Tue, 12 May 2015, Ian Jackson wrote:
> Stefano Stabellini writes ("[PATCH v5] OSSTEST: introduce a raisin build test"):
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> ...
> > +    echo >>config XEN_URL=\\"$r{tree_xen}\\"
> > +    echo >>config XEN_REVISION=\\"$r{revision_xen}\\"
> 
> This is very repetitive.  In ts-xen-build, the names of the variables
> are irregular, but here they are regular.  I think you should refactor
> this accordingly.

I think that the cure here would be worse than the disease. In bash
would be fragile and difficult to read, but you probably would do it in
perl, right? In that case I don't know how it would look like; in fact I
wouldn't know how to write it. However if you are keen on it, feel free
to provide a snippet of code and I'll try to include it in the patch.


> I don't understand what the \\ are doing here.  Perhaps you should use
> '' like in ts-xen-build ?

I need to retain the " in the output


> > +sub divide () {
> > +    # Only move hv to xeninstall, so that we can have
> > +    # xenpolicy in tools tarball.
> > +    #
> > +    # The files inside boot/ after `make dist' are
> > +    # xen-$XEN_VERSION: Xen binary
> > +    # xen.gz/xen: symlink to xen-$XEN_VERSION
> > +    # xen-$MAJOR: symlink to xen-$XEN_VERSION
> > +    # xen-$MAJOR.$MINOR: symlink to xen-$XEN_VERSION
> > +    # xen-sym-$XEN_VERSION: Xen symbol
> > +    # xenpolicy-$XEN_VERSION: flask policy binary if xsm is enabled
> > +    #
> > +    # So the following snippet will leave xenpolicy* in
> > +    # install/boot and get packaged to tools tarball.
> > +    target_cmd_build($ho, 100, $builddir, <<END);
> > +        cd raisin
> > +        mkdir xendist
> > +        for f in *dist; do
> > +            mkdir -p \$f/lib
> > +        done
> > +        if test -d dist/boot; then
> > +            if test -f dist/boot/xen.gz || test -f dist/boot/xen; then
> > +                mkdir xendist/boot
> > +                mvfiles=`find dist/boot -name 'xen[a-z]*' -prune -o -name 'xen*' -print`
> > +                mv \$mvfiles xendist/boot/.
> 
> This, and much of stash(), is a clone-and-hack of ts-xen-build.
> 
> > +our @probs;
> > +
> > +sub trapping ($) {
> > +    my ($sub) = @_;
> > +    my $tok= eval { $sub->(); 1; };
> > +    if (!$tok) { push @probs, $@; print STDERR "failure (trapped): $@\n"; }
> > +}
> 
> Again, this is copied from ts-xen-build.

Yes, it is. If this is not a descriptive comment, what would you have me
do? I could move trapping somewhere else common, but I don't think that
generalizing divide and stash is a good idea.

  reply	other threads:[~2015-05-12 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 17:13 [PATCH v5] OSSTEST: introduce a raisin build test Stefano Stabellini
2015-05-12 17:36 ` Ian Jackson
2015-05-12 18:04   ` Stefano Stabellini [this message]
2015-05-13  9:02     ` Ian Campbell
2015-05-13 16:15     ` Ian Jackson
2015-06-17 15:12       ` Stefano Stabellini

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=alpine.DEB.2.02.1505121851170.20496@kaball.uk.xensource.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.