Standard modules dependencies
This commit is contained in:
parent
3d6961dfd7
commit
3f79c8e461
@ -140,6 +140,8 @@ type Artifact struct {
|
||||
DisableKpti bool
|
||||
}
|
||||
|
||||
StandardModules bool
|
||||
|
||||
Preload []PreloadModule
|
||||
}
|
||||
|
||||
|
10
debug.go
10
debug.go
@ -109,6 +109,7 @@ func interactive(q *qemu.System) (err error) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO Merge with pew.go:whatever
|
||||
func debugHandler(kcfg config.KernelConfig, workPath, kernRegex, gdb string,
|
||||
dockerTimeout time.Duration, yekaslr, yesmep, yesmap, yekpti,
|
||||
nokaslr, nosmep, nosmap, nokpti bool) (err error) {
|
||||
@ -206,6 +207,15 @@ func debugHandler(kcfg config.KernelConfig, workPath, kernRegex, gdb string,
|
||||
}
|
||||
defer os.RemoveAll(tmp)
|
||||
|
||||
if ka.StandardModules {
|
||||
// Module depends on one of the standard modules
|
||||
err = copyStandardModules(q, ki)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
err = preloadModules(q, ka, ki, dockerTimeout)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
18
pew.go
18
pew.go
@ -403,6 +403,15 @@ func copyTest(q *qemu.System, testPath string, ka config.Artifact) (
|
||||
return
|
||||
}
|
||||
|
||||
func copyStandardModules(q *qemu.System, ki config.KernelInfo) (err error) {
|
||||
_, err = q.Command("root", "mkdir -p /lib/modules")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
return q.CopyDirectory("root", ki.ModulesPath, "/lib/modules/")
|
||||
}
|
||||
|
||||
func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka config.Artifact,
|
||||
ki config.KernelInfo, binaryPath, testPath string,
|
||||
qemuTimeout, dockerTimeout time.Duration, dist, tag string,
|
||||
@ -498,6 +507,15 @@ func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka config.Artifact,
|
||||
return
|
||||
}
|
||||
|
||||
if ka.StandardModules {
|
||||
// Module depends on one of the standard modules
|
||||
err = copyStandardModules(q, ki)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
err = preloadModules(q, ka, ki, dockerTimeout)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
Loading…
Reference in New Issue
Block a user