From d47209b86d2feef9f7dade78fcb85911a8596973 Mon Sep 17 00:00:00 2001 From: Howard Zhang Date: Wed, 23 Sep 2020 15:42:53 +0800 Subject: fix TestUserLog for multi-arch based on arch, apply different syscall number for sched_rr_get_interval Signed-off-by: Howard Zhang --- runsc/container/container_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runsc/container/container_test.go b/runsc/container/container_test.go index ff0e60283..548c68087 100644 --- a/runsc/container/container_test.go +++ b/runsc/container/container_test.go @@ -1843,8 +1843,9 @@ func TestUserLog(t *testing.T) { t.Fatal("error finding test_app:", err) } - // sched_rr_get_interval = 148 - not implemented in gvisor. - spec := testutil.NewSpecWithArgs(app, "syscall", "--syscall=148") + // sched_rr_get_interval - not implemented in gvisor. + num := strconv.Itoa(syscall.SYS_SCHED_RR_GET_INTERVAL) + spec := testutil.NewSpecWithArgs(app, "syscall", "--syscall="+num) conf := testutil.TestConfig(t) _, bundleDir, cleanup, err := testutil.SetupContainer(spec, conf) if err != nil { -- cgit v1.2.3 From ae1141778ecb336ef59a25556d7f382da3613756 Mon Sep 17 00:00:00 2001 From: Howard Zhang Date: Thu, 24 Sep 2020 09:39:25 +0800 Subject: fix seccomp test for ARM64 As open syscall is not support on ARM64, change syscall from 'open' to 'openat' in no_match_name_allow Signed-off-by: Howard Zhang --- runsc/specutils/seccomp/seccomp_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runsc/specutils/seccomp/seccomp_test.go b/runsc/specutils/seccomp/seccomp_test.go index 2079cd2e9..850c237ba 100644 --- a/runsc/specutils/seccomp/seccomp_test.go +++ b/runsc/specutils/seccomp/seccomp_test.go @@ -169,7 +169,7 @@ var ( }, }, }, - input: testInput(nativeArchAuditNo, "open", nil), + input: testInput(nativeArchAuditNo, "openat", nil), expected: uint32(allowAction), }, { -- cgit v1.2.3