All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH 5/7] osstest: introduce a FreeBSD build script
Date: Tue, 23 May 2017 18:58:59 +0100	[thread overview]
Message-ID: <22820.30819.409970.197915@mariner.uk.xensource.com> (raw)
In-Reply-To: <20170523135148.77673-6-roger.pau@citrix.com>

Roger Pau Monne writes ("[PATCH 5/7] osstest: introduce a FreeBSD build script"):
> -    my $path= "path_${part}dist";
> -    logm("checking $k $path");
> -    get_stashed($path, $r{$k});
> +    if ("$part" eq "freebsd") {
> +        foreach (qw(base kernel manifest image)) {
> +            my $path= "path_${part}-$_";
> +            logm("checking $k $path");
> +            get_stashed($path, $r{$k});
> +        }
> +    } else {
> +        my $path= "path_${part}dist";
> +        logm("checking $k $path");
> +        get_stashed($path, $r{$k});

This is quite ugly.  I don't think this knowledge should be in
ts-build-check.

...

I think in fact that the right answer is probably to have
ts-build-check be more general somehow.

I have looked through the history of ts-{,xen-}build-check and I think
the current approach is a historical accident.  In the beginning it
was a wrapper around ts-xen-install which used a special check flag;
then that gradually generalised to what we have now - but it still
retains the same origins.

I was going to suggest checking the job status, but might be an
inconvenience during by-hand testing.

I considered having sg-run-job specify the parts it's going to use, as
command line arguments, with plumbing in sg-run-job from the recipe,
but that's still going to have to be buildjob-runvar-specific.

I considered controlling this via runvars from make-flight:
   freebsdbuildjob=391031.build-amd64-freebsd
   freebsdbuildjobpaths=-base,-kernel,-manifest,-image
But it's also quite ugly.

I have a radical suggestion:

Suppose we have ts-freebsd-build set
    path_freebsddist=$stash/build/freebsd/
and have it put the files in there with fixed, known, names
    path_freebsddist=$stash/build/freebsd/image
    path_freebsddist=$stash/build/freebsd/manifest
    path_freebsddist=$stash/build/freebsd/kernel.sets
    path_freebsddist=$stash/build/freebsd/base.sets
or something ?

Is there a reason why that wouldn't work ?

The stashing process would have to take care to set the runvar only
after it had created all the files.

> +    target_cmd_build($ho, 7200, $builddir, <<END);
> +cd freebsd
> +export MAKEOBJDIRPREFIX=$builddir/obj
> +(make $makeflags TARGET=$r{arch} buildworld 2>&1 && touch ../build-ok-stamp) \\
> +    |tee ../log

How about using Osstest::BuildSupport::buildcmd_stamped_logged ?

> +    logm("Creating the install sets");
> +    # NB: the steps below need to be done as root or the permissions
> +    # of the files won't be properly set (and the target will fail).
> +    target_cmd_root($ho, <<END, 900);

target_cmd_root does not imply set -e; only target_cmd_build does.

You may want to invent buildcmd_stamped_logged_root or something.

> +# Enable DHCP on all network interfaces
> +echo 'ifconfig_DEFAULT="DHCP"' >> \$target/etc/rc.conf

Is this wise ?  We may at some point have hosts which have two network
interfaces connected (perhaps to the test network, or to each other,
or something) in which case this is probably wrong.

There are a lot of \.  I wonder if you might find
<<'ENDQ'.<<END.<<'ENDQ' a useful construct.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-05-23 17:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 13:51 [PATCH 0/7] osstest: initial FreeBSD support Roger Pau Monne
2017-05-23 13:51 ` [PATCH 1/7] osstest: make built_stash_file store a path_ runvar for each file Roger Pau Monne
2017-05-23 14:55   ` Ian Jackson
2017-05-23 13:51 ` [PATCH 2/7] osstest: move known_hosts generation to TestSupport Roger Pau Monne
2017-05-23 14:56   ` Ian Jackson
2017-05-23 13:51 ` [PATCH 3/7] osstest: fix regular expression used to match buildjob in ts-build-check Roger Pau Monne
2017-05-23 15:01   ` Ian Jackson
2017-05-24  7:18     ` Roger Pau Monne
2017-05-23 13:51 ` [PATCH 4/7] osstest: add a FreeBSD host install recipe Roger Pau Monne
2017-05-23 16:04   ` Ian Jackson
2017-05-24 10:48     ` Roger Pau Monne
2017-05-24 11:12       ` Ian Jackson
2017-05-23 17:14   ` Ian Jackson
2017-05-23 13:51 ` [PATCH 5/7] osstest: introduce a FreeBSD build script Roger Pau Monne
2017-05-23 17:58   ` Ian Jackson [this message]
2017-05-24 14:15     ` Roger Pau Monne
2017-05-24 14:19       ` Ian Jackson
2017-05-23 13:51 ` [PATCH 6/7] osstest: add a FreeBSD build to flights Roger Pau Monne
2017-05-23 13:51 ` [PATCH 7/7] osstest: introduce make-freebsd-flight Roger Pau Monne

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=22820.30819.409970.197915@mariner.uk.xensource.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.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.