Skip to content

Commit

Permalink
ci: Test virtiofsd as root
Browse files Browse the repository at this point in the history
I want to reproduce the failure from coreos/rpm-ostree#4584 (comment)
So I can verify the fix works here.
  • Loading branch information
cgwalters committed Sep 18, 2023
1 parent 1b13b39 commit 016198a
Showing 1 changed file with 8 additions and 51 deletions.
59 changes: 8 additions & 51 deletions .cci.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,17 @@
// an imageStream for it
def cpuCount = 6
def cpuCount_s = cpuCount.toString()
def imageName = buildImage(env: [ENABLE_GO_RACE_DETECTOR: "1", GOMAXPROCS: cpuCount_s], cpu: cpuCount_s)
def imageName = "quay.io/coreos-assembler/coreos-assembler"

def memory = (cpuCount * 1536) as Integer
pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memory}Mi") {
pod(runAsUser: 0, image: imageName + ":latest", kvm: true, cpu: 2, memory: "2Gi") {
checkout scm

stage("Unit tests") {
shwrap("make check")
shwrap("make unittest")
}

shwrap("rpm -qa | sort > rpmdb.txt")
archiveArtifacts artifacts: 'rpmdb.txt'

// Run stage Build FCOS (init, fetch and build)
cosaBuild(skipKola: 1, cosaDir: "/srv", noForce: true)

// Run stage Kola QEMU (basic-qemu-scenarios, upgrade and self tests)
kola(cosaDir: "/srv", addExtTests: ["${env.WORKSPACE}/ci/run-kola-self-tests"])

stage("Build Metal") {
cosaParallelCmds(cosaDir: "/srv", commands: ["metal", "metal4k"])
}

stage("Build Live Images") {
// Explicitly test re-importing the ostree repo
shwrap("cd /srv && rm tmp/repo -rf")
utils.cosaCmd(cosaDir: "/srv", args: "buildextend-live --fast")
}

kolaTestIso(cosaDir: "/srv")

stage("Build Cloud Images") {
cosaParallelCmds(cosaDir: "/srv", commands: ["Aliyun", "AWS", "Azure", "DigitalOcean", "Exoscale", "GCP",
"IBMCloud", "OpenStack", "VMware", "Vultr"])

// quick schema validation
utils.cosaCmd(cosaDir: "/srv", args: "meta --get name")
}

stage("Compress") {
utils.cosaCmd(cosaDir: "/srv", args: "compress --fast")
}

stage("Upload Dry Run") {
utils.cosaCmd(cosaDir: "/srv", args: "buildupload --dry-run s3 --acl=public-read my-nonexistent-bucket/my/prefix")
}

// Random other tests that aren't about building. XXX: These should be part of `make
// check` or something and use dummy cosa builds.
stage("CLI Tests") {
stage("Test running as root with virtiofs") {
shwrap("""
cd /srv
${env.WORKSPACE}/tests/test_pruning.sh
coreos-installer download -p qemu -f qcow2.xz --decompress
echo blah > blah.txt
cosa run --qemu-image ./*.qcow2 --bind-ro .,/run/hostqemu/workdir -x "cat /run/hostqemu/workdir/blah.txt" > blah2.txt
diff -u blah.txt blah2.txt
""")
}
}
}

0 comments on commit 016198a

Please sign in to comment.