Skip to content

Commit 0e2255a

Browse files
committed
test fix for fuse test failures - add nerdctl
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 951a2f0 commit 0e2255a

File tree

6 files changed

+27
-5
lines changed

6 files changed

+27
-5
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424

2525
jobs:
2626
test:
27-
runs-on: codebuild-soci-github-ci-pipeline-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-xlarge
27+
runs-on: codebuild-new_soci_CLI-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-xlarge
2828
timeout-minutes: 15
2929
steps:
3030
- uses: actions/checkout@v4
@@ -34,7 +34,7 @@ jobs:
3434
- run: make
3535
- run: make test
3636
integration:
37-
runs-on: codebuild-soci-github-ci-pipeline-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-xlarge
37+
runs-on: codebuild-new_soci_CLI-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-xlarge
3838
timeout-minutes: 40
3939
strategy:
4040
fail-fast: false
@@ -47,5 +47,9 @@ jobs:
4747
- uses: actions/setup-go@v5
4848
with:
4949
go-version: ${{ env.GO_VERSION }}
50-
# - run: goenv global 1.22.1
51-
- run: make integration
50+
# - run: wget https://github.com/containerd/nerdctl/releases/download/v1.7.6/nerdctl-1.7.6-linux-amd64.tar.gz
51+
# - run: sudo tar Cxzvf /usr/local/bin nerdctl-1.7.6-linux-amd64.tar.gz
52+
# - run: sudo apt -y update && sudo apt -y upgrade && sudo apt-get -y install gcc-multilib
53+
# - run: uname -a
54+
- run: GO_TEST_FLAGS="-run TestPullWithAribtraryBlobInvalidZtocFormat -count=1" make integration
55+
# - run: make integration

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ RUN apk add --no-cache \
3535
libc6-compat \
3636
libseccomp-dev \
3737
pigz \
38-
zlib-dev
38+
zlib-dev \
39+
strace
3940
RUN cp $GOPATH/src/github.com/awslabs/soci-snapshotter/out/soci /usr/local/bin/ && \
4041
cp $GOPATH/src/github.com/awslabs/soci-snapshotter/out/soci-snapshotter-grpc /usr/local/bin/ && \
4142
mkdir /etc/soci-snapshotter-grpc && \

fs/layer/node.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ func (n *node) Readdir(ctx context.Context) (fusefs.DirStream, syscall.Errno) {
303303
if errno != 0 {
304304
return nil, errno
305305
}
306+
307+
log.G(ctx).Debugf("Inside Readdir : %+v\n", ents)
306308
return fusefs.NewListDirStream(ents), 0
307309
}
308310

@@ -541,6 +543,8 @@ func (n *node) Listxattr(ctx context.Context, dest []byte) (uint32, syscall.Errn
541543
for k := range ent.Xattrs {
542544
attrs = append(attrs, []byte(k+"\x00")...)
543545
}
546+
547+
log.G(ctx).Debugf("Inside Listxattr : %+v\n", ent)
544548
if len(dest) < len(attrs) {
545549
return uint32(len(attrs)), syscall.ERANGE
546550
}

integration/metrics_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,9 @@ func checkFuseOperationFailureMetrics(t *testing.T, output string, metricToCheck
397397
metricCountSum := 0
398398

399399
lines := strings.Split(output, "\n")
400+
// t.Log("\n---------------------------- printinf outpurt of lines------------------------- \n")
401+
// t.Log(output)
402+
// t.Log("\n---------------------------- end------------------------- \n")
400403
for _, line := range lines {
401404
// skip non-fuse and fuse_mount_failure_count metrics
402405
if !strings.Contains(line, "fuse") || strings.Contains(line, commonmetrics.FuseMountFailureCount) {

integration/util_soci_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ func buildIndex(sh *shell.Shell, src imageInfo, opt ...indexBuildOption) string
160160
"--platform", platforms.Format(src.platform), // this will make SOCI artifact available locally
161161
)
162162
if err != nil {
163+
fmt.Println("error line 163:", err)
163164
return ""
164165
}
165166

integration/util_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,13 +717,22 @@ func rebootContainerd(t *testing.T, sh *shell.Shell, customContainerdConfig, cus
717717
sh.Gox(containerdCmds...)
718718
snapshotterCmds := shell.C("/usr/local/bin/soci-snapshotter-grpc", "--log-level", sociLogLevel,
719719
"--address", snapshotterSocket)
720+
720721
if customSnapshotterConfig != "" {
721722
snapshotterCmds = addConfig(t, sh, customSnapshotterConfig, snapshotterCmds...)
722723
}
723724
outR, errR, err := sh.R(snapshotterCmds...)
724725
if err != nil {
725726
t.Fatalf("failed to create pipe: %v", err)
726727
}
728+
time.Sleep(2 * time.Second)
729+
pids, err := sh.OLog("pgrep", "-f", "soci")
730+
t.Log(string(pids))
731+
if err != nil {
732+
t.Fatal(err)
733+
}
734+
// sh.Gox("strace", "-f", "-p", string(pids))
735+
727736
reporter := testutil.NewTestingReporter(t)
728737
var m *testutil.LogMonitor = testutil.NewLogMonitor(reporter, outR, errR)
729738

0 commit comments

Comments
 (0)