Skip to content

Commit cc5bf05

Browse files
author
Zhou Hao
committed
runtimetest: fix process validation
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
1 parent 801e6fd commit cc5bf05

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cmd/runtimetest/main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func loadSpecConfig(path string) (spec *rspec.Spec, err error) {
8282
}
8383

8484
// should be included by other platform specified process validation
85-
func validateGeneralProcess(spec *rspec.Spec) error {
85+
func validateProcess(spec *rspec.Spec) error {
8686
if spec.Process.Cwd != "" {
8787
cwd, err := os.Getwd()
8888
if err != nil {
@@ -111,8 +111,6 @@ func validateLinuxProcess(spec *rspec.Spec) error {
111111
return nil
112112
}
113113

114-
validateGeneralProcess(spec)
115-
116114
uid := os.Getuid()
117115
if uint32(uid) != spec.Process.User.UID {
118116
return fmt.Errorf("UID expected: %v, actual: %v", spec.Process.User.UID, uid)
@@ -737,6 +735,10 @@ func run(context *cli.Context) error {
737735
test: validateRlimits,
738736
description: "rlimits",
739737
},
738+
{
739+
test: validateProcess,
740+
description: "process",
741+
},
740742
}
741743

742744
linuxValidations := []validation{

0 commit comments

Comments
 (0)