1
0

Compare commits

...

5 Commits

8 changed files with 20 additions and 16 deletions

View File

@ -3,6 +3,9 @@ name: E2E
on:
workflow_dispatch:
push:
branches:
- master
- dev
paths-ignore:
- ".github/workflows/images-*"
- ".github/workflows/ubuntu.yml"
@ -136,7 +139,7 @@ jobs:
echo 'Type=oneshot' >> test.service
echo 'WorkingDirectory=/root/test' >> test.service
echo 'TimeoutStopSec=1' >> test.service
echo 'ExecStart=/usr/local/bin/out-of-tree kernel --no-container-cache autogen --threads=8 --max=128 --shuffle' >> test.service
echo 'ExecStart=/usr/local/bin/out-of-tree kernel --no-container-cache autogen --threads=8 --max=64 --shuffle' >> test.service
echo 'ExecStart=/usr/local/bin/out-of-tree pew --qemu-timeout=10m --threads=4 --include-internal-errors' >> test.service
scp test.service root@$IP:/etc/systemd/system/test.service

View File

@ -37,7 +37,7 @@ func preload(q *qemu.System, ki distro.KernelInfo, pm PreloadModule,
var workPath, cache string
if pm.Path != "" {
log.Print("Use non-git path for preload module (no cache)")
log.Debug().Msg("Use non-git path for preload module (no cache)")
workPath = pm.Path
} else if pm.Repo != "" {
workPath, cache, err = cloneOrPull(pm.Repo, ki)
@ -85,7 +85,7 @@ func buildAndInsmod(workPath string, q *qemu.System, ki distro.KernelInfo,
output, err := q.CopyAndInsmod(af)
if err != nil {
log.Print(output)
log.Error().Err(err).Msg(output)
return
}
return
@ -147,7 +147,7 @@ func cloneOrPull(repo string, ki distro.KernelInfo) (workPath, cache string,
err = w.Pull(&git.PullOptions{})
if err != nil && err != git.NoErrAlreadyUpToDate {
log.Print(repo, "pull error:", err)
log.Error().Err(err).Msgf("pull %s error", repo)
}
} else {
r, err = git.PlainClone(workPath, false, &git.CloneOptions{URL: repo})

View File

@ -336,13 +336,14 @@ func copyArtifactAndTest(slog zerolog.Logger, q *qemu.System, ka Artifact,
slog.Error().Err(err).Msg(res.Test.Output)
return
}
slog.Info().Msgf("\n%v\n", res.Test.Output)
res.Run.Ok = true
res.Test.Ok = true
default:
slog.Fatal().Msg("Unsupported artifact type")
}
slog.Info().Msgf("\n%v\n", res.Test.Output)
_, err = q.Command("root", "echo")
if err != nil {
slog.Error().Err(err).Msg("after-test ssh reconnect")

View File

@ -45,7 +45,7 @@ type DebugCmd struct {
func (cmd *DebugCmd) Run(g *Globals) (err error) {
kcfg, err := config.ReadKernelConfig(g.Config.Kernels)
if err != nil {
log.Print(err)
log.Error().Err(err).Msg("read kernel config")
}
var configPath string
@ -161,14 +161,14 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
// Module depends on one of the standard modules
err = artifact.CopyStandardModules(q, ki)
if err != nil {
log.Print(err)
log.Error().Err(err).Msg("copy standard modules")
return
}
}
err = artifact.PreloadModules(q, ka, ki, g.Config.Docker.Timeout.Duration)
if err != nil {
log.Print(err)
log.Error().Err(err).Msg("preload modules")
return
}
@ -182,7 +182,7 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
} else {
buildDir, outFile, output, err = artifact.Build(log.Logger, tmp, ka, ki, g.Config.Docker.Timeout.Duration)
if err != nil {
log.Print(err, output)
log.Error().Err(err).Msg(output)
return
}
@ -206,7 +206,7 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
}
err = q.CopyFile(f.User, f.Local, f.Remote)
if err != nil {
log.Print("error copy err:", err, f.Local, f.Remote)
log.Error().Err(err).Msgf("copy %s -> %s", f.Local, f.Remote)
return
}
}

View File

@ -263,7 +263,7 @@ func (cmd *KernelCmd) Generate(g *Globals, km artifact.Target) (err error) {
}
if cmd.stats.success >= cmd.Max {
log.Print("Max is reached")
log.Info().Msg("Max is reached")
swg.Done()
break
}

View File

@ -42,7 +42,7 @@ func (cmd *LogQueryCmd) Run(g *Globals) (err error) {
ka, kaErr := artifact.Artifact{}.Read(g.WorkDir + "/.out-of-tree.toml")
if kaErr == nil {
log.Print(".out-of-tree.toml found, filter by artifact name")
log.Debug().Msg(".out-of-tree.toml found, filter by artifact name")
les, err = getAllArtifactLogs(db, cmd.Tag, cmd.Num, ka)
} else {
les, err = getAllLogs(db, cmd.Tag, cmd.Num)

View File

@ -33,7 +33,7 @@ type PackCmd struct {
func (cmd *PackCmd) Run(g *Globals) (err error) {
tag := fmt.Sprintf("pack_run_%d", time.Now().Unix())
log.Print("Tag:", tag)
log.Info().Msgf("Tag: %s", tag)
files, err := os.ReadDir(g.WorkDir)
if err != nil {
@ -65,7 +65,7 @@ func (cmd *PackCmd) Run(g *Globals) (err error) {
}
}
log.Print(f.Name())
log.Info().Msg(f.Name())
pew := PewCmd{
Max: cmd.KernelRuns,

View File

@ -34,7 +34,7 @@ func GenHostKernels(download bool) (kernels []distro.KernelInfo, err error) {
rawOutput, err := cmd.CombinedOutput()
if err != nil {
log.Print(string(rawOutput), err)
log.Error().Err(err).Msg(string(rawOutput))
return
}
@ -86,7 +86,7 @@ func GenHostKernels(download bool) (kernels []distro.KernelInfo, err error) {
}
vmlinux := "/usr/lib/debug/boot/vmlinux-" + krel
log.Print("vmlinux", vmlinux)
log.Info().Msgf("vmlinux %s", vmlinux)
if fs.PathExists(vmlinux) {
ki.VmlinuxPath = vmlinux
}