public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "Serhei Makarov" <serhei@serhei.io>
To: buildbot@sourceware.org
Cc: "Frank Ch. Eigler" <fche@redhat.com>,
	systemtap <systemtap@sourceware.org>
Subject: [PATCH] Add systemtap privileged fedrawhide worker and builder
Date: Wed, 17 Apr 2024 10:54:22 -0400	[thread overview]
Message-ID: <7f6e756d-3e47-476f-b997-50b4960b837d@app.fastmail.com> (raw)

Hello,

I'd like to commit the following patch (or something similar) to the sourceware builder config
and get a buildbot vm hooked up, so we can start taking our SystemTap buildbots and
test results public.

As one of the steps, could I have a worker pw for 'systemtap-fedrawhide-x86_64-privileged'?

All the best,
      Serhei Makarov

---
This is an initial commit to see how well my SystemTap buildbots would
work with the Sourceware builder infrastructure and public bunsen
instance. If all goes well, it will be possible to expand the public
testing setup to cover multiple distros and architectures.

The fedrawhide worker is an exclusive vm for full-privileged systemtap
testing (hence other builder runs should not be scheduled on it).
---
 builder/master.cfg | 85 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/builder/master.cfg b/builder/master.cfg
index b53e56f..4f8fd2b 100644
--- a/builder/master.cfg
+++ b/builder/master.cfg
@@ -177,6 +177,15 @@ fedrawhide_x86_64_worker = worker.Worker("fedrawhide-x86_64",
                                     notify_on_missing=['fche@elastic.org']);
 c['workers'].append(fedrawhide_x86_64_worker)

+# fedrawhide worker exclusively for privileged systemtap testing
+fedrawhide_x86_64_systemtap_privileged_worker = worker.Worker(
+        "fedrawhide-x86_64-systemtap-privileged",
+        getpw("fedrawhide-x86_64-systemtap-privileged"),
+        max_builds=1,
+        properties={'ncpus': 2, 'maxcpus': 2},
+        notify_on_missing=['smakarov@redhat.com'])
+c['workers'].append(fedrawhide_x86_64_systemtap_privileged_worker)
+
 # 2 gentoo sparc workers, running on the same machine in different
 # containers. The big one does only one build at a time. Larger builds
 # are only put on the big worker to not hold up quicker/smaller builds.
@@ -998,6 +1007,20 @@ systemtap_scheduler2 = schedulers.Nightly(
         dayOfWeek=0, hour=0, minute=0) # monday morning midnight
 c['schedulers'].append(systemtap_scheduler2)

+systemtap_privileged_scheduler = schedulers.SingleBranchScheduler(
+        name="systemtap privileged",
+        change_filter=util.ChangeFilter(project="systemtap",
+                                        branch="master"),
+        reason="systemtap project master branch update",
+        builderNames=["systemtap-fedrawhide-x86_64-privileged"])
+c['schedulers'].append(systemtap_privileged_scheduler)
+
+systemtap_privileged_scheduler2 = schedulers.Nightly(
+        name='weekly systemtap privileged rebuild',
+        builderNames=["systemtap-fedrawhide-x86_64-privileged"],
+        dayOfWeek=0, hour=0, minute=0) # monday morning midnight
+c['schedulers'].append(systemtap_privileged_scheduler2)
+
 # Quick build only scheduler
 gcc_build_scheduler = schedulers.SingleBranchScheduler(
         name="gcc-build",
@@ -4614,6 +4637,68 @@ systemtap_gentoo_sparc_builder = util.BuilderConfig(
         factory=systemtap_factory)
 c['builders'].append(systemtap_gentoo_sparc_builder)

+
+# caution: runs systemtap testsuite with full-privileges
+systemtap_scripts_path = "/opt/worker-scripts/"
+systemtap_privileged_factory = util.BuildFactory()
+systemtap_privileged_factory.addStep(steps.Git(
+        repourl=systemtap_repourl,
+        workdir='systemtap',
+        mode='full', method='fresh',
+        retryFetch=True, retry=(30,3),
+        getDescription={'tags':True, 'always':True},
+        name="git checkout",
+        haltOnFailure=True))
+systemtap_privileged_factory.append(steps.ShellCommand(
+        command=["rm", "-rf",
+                 util.Interpolate ("%(prop:builddir)s/stap-build")],
+        name="rm -rf stap-build",
+        haltOnFailure=True))
+systemtap_privileged_factory.append(steps.ShellCommand(
+        workdir='stap-build',
+        command=[systemtap_scripts_path+"stap-test-prepare.sh"],
+        name='check kernel version + prepare testing scripts',
+        haltOnFailure=False, flunkOnFailure=False)) # some failures are normal for stap
+systemtap_privileged_factory.append(steps.Configure(
+        workdir="stap-build",
+        command=["../systemtap/configure", util.Interpolate ("--prefix=%(prop:builddir)s/stap-build/INST")],
+        name="configure",
+        haltOnFailure=True,
+        logfiles={"config.log": "config.log"}))
+systemtap_privileged_factory.append(steps.Compile(
+        workdir='stap-build',
+        command=addOutputSync.withArgs(['make', 'V=1']),
+        name='make',
+        haltOnFailure=True))
+systemtap_privileged_factory.append(steps.Compile(
+        workdir='stap-build',
+        command=['make', 'V=1', 'install'],
+        name='make install',
+        haltOnFailure=True))
+systemtap_privileged_factory.append(steps.Test(
+        workdir='stap-build',
+        #command=['env', 'DEBUGINFOD_URLS=https://debuginfod.elfutils.org/', 'make', 'V=1', 'installcheck'], # this is the full, privileged testsuite
+        command=[systemtap_scripts_path+"stap-test.sh"], # this is the full, privileged testsuite with dmesg collection
+        name='make installcheck',
+        haltOnFailure=False, flunkOnFailure=False)) # some failures are normal for stap
+systemtap_privileged_factory.append(steps.ShellCommand(
+        workdir="stap-build",
+        command=["rm", "-rf", "testsuite/.systemtap-buildbot/cache"], # ugly hardcoding bot username :-(
+        name="cleanup caches",
+        haltOnFailure=True))
+systemtap_privileged_factory.addSteps(bunsen_logfile_upload_cpio_steps(
+        ["*.sum", "*.log", "*.dmesg"],
+        workdir="stap-build"))
+
+systemtap_fedrawhide_x86_64_privileged_builder = util.BuilderConfig(
+        name="systemtap-fedrawhide-x86_64-privileged",
+        collapseRequests=True,
+        workernames=["fedrawhide-x86_64-systemtap-privileged"],
+        tags=["systemtap", "fedora", "x86_64"],
+        factory=systemtap_privileged_factory)
+c['builders'].append(systemtap_fedrawhide_x86_64_privileged_builder)
+
+
 # GNU poke builders and factories

 # publish file based on branch name, cut away all but last / element
--
2.43.0

             reply	other threads:[~2024-04-17 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 14:54 Serhei Makarov [this message]
2024-04-18 22:55 ` Frank Ch. Eigler

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=7f6e756d-3e47-476f-b997-50b4960b837d@app.fastmail.com \
    --to=serhei@serhei.io \
    --cc=buildbot@sourceware.org \
    --cc=fche@redhat.com \
    --cc=systemtap@sourceware.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).