public inbox for buildbot@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add systemtap privileged fedrawhide worker and builder
@ 2024-04-17 14:54 Serhei Makarov
  2024-04-18 22:55 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: Serhei Makarov @ 2024-04-17 14:54 UTC (permalink / raw)
  To: buildbot; +Cc: Frank Ch. Eigler, systemtap

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add systemtap privileged fedrawhide worker and builder
  2024-04-17 14:54 [PATCH] Add systemtap privileged fedrawhide worker and builder Serhei Makarov
@ 2024-04-18 22:55 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2024-04-18 22:55 UTC (permalink / raw)
  To: Serhei Makarov; +Cc: buildbot, systemtap

Hi -

> 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.

Thanks, pushed to the master branch, but with the worker renamed to
"stap-fedrawhide-x86_64", to make it fit our naming convention better.


- FChE


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-18 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 14:54 [PATCH] Add systemtap privileged fedrawhide worker and builder Serhei Makarov
2024-04-18 22:55 ` Frank Ch. Eigler

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).