From eed574547fed7cba3a4ae081bc201cc07b80cc1d Mon Sep 17 00:00:00 2001 From: Naoki MATSUMOTO Date: Fri, 3 May 2024 15:58:01 +0900 Subject: [PATCH] fix some Signed-off-by: Naoki MATSUMOTO --- .github/workflows/test.yaml | 2 +- go.mod | 4 +--- go.sum | 4 ++-- pkg/utils/utils.go | 2 -- tests/launch_test_lxc.sh | 2 +- tests/setup_test.sh | 4 ++++ tests/test_fast.sh | 3 ++- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fdade8b..804ceba 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -134,7 +134,7 @@ jobs: matrix: script: ["apache", "mysql", "nginx", "postgres", "redis"] thread: ["4"] - sched: ["none", "size-ordered"] + sched: ["none"] comp: ["bzip2", "zstd"] steps: - uses: actions/checkout@v4 diff --git a/go.mod b/go.mod index 77041ab..48dfc28 100644 --- a/go.mod +++ b/go.mod @@ -28,8 +28,7 @@ require ( replace github.com/icedream/go-bsdiff v1.0.1 => github.com/naoki9911/go-bsdiff v1.0.3 -//replace github.com/nine-lives-later/go-xdelta v0.3.2-0.20200813195159-a23b3640ca1a => github.com/naoki9911/go-xdelta v0.0.1 -replace github.com/nine-lives-later/go-xdelta v0.3.2-0.20200813195159-a23b3640ca1a => ../go-xdelta +replace github.com/nine-lives-later/go-xdelta v0.3.2-0.20200813195159-a23b3640ca1a => github.com/naoki9911/go-xdelta v0.0.2 require ( github.com/Microsoft/go-winio v0.6.1 // indirect @@ -59,7 +58,6 @@ require ( github.com/opencontainers/selinux v1.10.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/ulikunitz/xz v0.5.12 // indirect github.com/vbatts/tar-split v0.11.3 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect go.etcd.io/bbolt v1.3.6 // indirect diff --git a/go.sum b/go.sum index 6d5e193..1aaf7c0 100644 --- a/go.sum +++ b/go.sum @@ -516,6 +516,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/naoki9911/go-bsdiff v1.0.3 h1:vWQ42T3I04EJr2YfnBIIoyami5aL6C0n+dyZLtY75v4= github.com/naoki9911/go-bsdiff v1.0.3/go.mod h1:gGhdZZqlpfmaUUEzntr3mDeO3dy0tvlIJ7F+a4z/vxY= +github.com/naoki9911/go-xdelta v0.0.2 h1:xwj0UbiFrJruBa3CfutQSEBjbkAQNflHopUE5Djtc8Y= +github.com/naoki9911/go-xdelta v0.0.2/go.mod h1:uFQzElLkPDY5XVZWBJxDXaymJk/IrWZnq4uEl8rxaVg= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -685,8 +687,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= -github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= -github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 670c535..83698e1 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -9,7 +9,6 @@ import ( "math/rand" "os" "strings" - "time" "github.com/klauspost/compress/zstd" "github.com/opencontainers/go-digest" @@ -111,7 +110,6 @@ var ( ) func randSequence(n int) string { - rand.Seed(time.Now().UnixNano()) b := make([]byte, n) for i := range b { b[i] = letters[rand.Intn(len(letters))] diff --git a/tests/launch_test_lxc.sh b/tests/launch_test_lxc.sh index 10bac00..17eac29 100755 --- a/tests/launch_test_lxc.sh +++ b/tests/launch_test_lxc.sh @@ -1,7 +1,7 @@ #!/bin/bash set -ux -o pipefail -IMAGE=${1:-"images:ubuntu/22.04"} +IMAGE=${1:-"ubuntu/22.04"} cd $(cd $(dirname $0); pwd) diff --git a/tests/setup_test.sh b/tests/setup_test.sh index 4ec3db0..711eb4c 100755 --- a/tests/setup_test.sh +++ b/tests/setup_test.sh @@ -28,8 +28,12 @@ echo "===== Prepare =====" sudo apt-get update sudo DEBIAN_FRONTEND=noninteractive apt-get install -y dbus-user-session docker-ce containerd.io fuse3 python3 python3-pip jq + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y git build-essential automake # for xdelta3 sudo pip3 install docker-squash matplotlib + git clone https://github.com/naoki9911/go-xdelta + cd go-xdelta && git checkout v0.0.3 && ./build_install.sh + systemctl --user start dbus curl -fsSL https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | sudo tar Cxz /usr/local diff --git a/tests/test_fast.sh b/tests/test_fast.sh index de25cf9..3708459 100755 --- a/tests/test_fast.sh +++ b/tests/test_fast.sh @@ -20,7 +20,8 @@ mkdir -p $IMAGE_DIR mkdir -p /tmp/benchmark TESTS=("apache" "mysql" "nginx" "postgres" "redis") -ENCODINGS=("bsdiffx" "xdelta3") +#ENCODINGS=("bsdiffx" "xdelta3") +ENCODINGS=("xdelta3") #TESTS=("pytorch" "tensorflow") #TESTS=("pytorch") for TEST in "${TESTS[@]}"; do