diff --git a/SOURCES/openvswitch-2.11.3.patch b/SOURCES/openvswitch-2.11.3.patch index d637ff7..3d9ccbc 100644 --- a/SOURCES/openvswitch-2.11.3.patch +++ b/SOURCES/openvswitch-2.11.3.patch @@ -1,3 +1,207 @@ +diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh +new file mode 100755 +index 0000000000..ab0089d554 +--- /dev/null ++++ b/.ci/linux-build.sh +@@ -0,0 +1,131 @@ ++#!/bin/bash ++ ++set -o errexit ++ ++KERNELSRC="" ++CFLAGS="-Werror" ++SPARSE_FLAGS="" ++EXTRA_OPTS="" ++TARGET="x86_64-native-linuxapp-gcc" ++ ++function install_kernel() ++{ ++ if [[ "$1" =~ ^4.* ]]; then ++ PREFIX="v4.x" ++ elif [[ "$1" =~ ^3.* ]]; then ++ PREFIX="v3.x" ++ else ++ PREFIX="v2.6/longterm/v2.6.32" ++ fi ++ ++ wget https://www.kernel.org/pub/linux/kernel/${PREFIX}/linux-${1}.tar.gz ++ tar xzvf linux-${1}.tar.gz > /dev/null ++ cd linux-${1} ++ make allmodconfig ++ ++ # Cannot use CONFIG_KCOV: -fsanitize-coverage=trace-pc is not supported by compiler ++ sed -i 's/CONFIG_KCOV=y/CONFIG_KCOV=n/' .config ++ ++ # stack validation depends on tools/objtool, but objtool does not compile on travis. ++ # It is giving following error. ++ # >>> GEN arch/x86/insn/inat-tables.c ++ # >>> Semantic error at 40: Unknown imm opnd: AL ++ # So for now disable stack-validation for the build. ++ ++ sed -i 's/CONFIG_STACK_VALIDATION=y/CONFIG_STACK_VALIDATION=n/' .config ++ make oldconfig ++ ++ # Older kernels do not include openvswitch ++ if [ -d "net/openvswitch" ]; then ++ make net/openvswitch/ ++ else ++ make net/bridge/ ++ fi ++ ++ KERNELSRC=$(pwd) ++ if [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then ++ EXTRA_OPTS="--with-linux=$(pwd)" ++ fi ++ echo "Installed kernel source in $(pwd)" ++ cd .. ++} ++ ++function install_dpdk() ++{ ++ if [ -n "$DPDK_GIT" ]; then ++ git clone $DPDK_GIT dpdk-$1 ++ cd dpdk-$1 ++ git checkout tags/v$1 ++ else ++ wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz ++ tar xvf dpdk-$1.tar.xz > /dev/null ++ DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/") ++ if [ $DIR_NAME != "dpdk-$1" ]; then mv $DIR_NAME dpdk-$1; fi ++ cd dpdk-$1 ++ fi ++ find ./ -type f | xargs sed -i 's/max-inline-insns-single=100/max-inline-insns-single=400/' ++ find ./ -type f | xargs sed -i 's/-Werror/-Werror -Wno-error=inline/' ++ echo 'CONFIG_RTE_BUILD_FPIC=y' >>config/common_linuxapp ++ sed -ri '/EXECENV_CFLAGS = -pthread -fPIC/{s/$/\nelse ifeq ($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS = -pthread -fPIC/}' mk/exec-env/linuxapp/rte.vars.mk ++ if [ "$DPDK_SHARED" ]; then ++ sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' config/common_base ++ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib ++ fi ++ make config CC=gcc T=$TARGET ++ make CC=gcc RTE_KERNELDIR=$KERNELSRC ++ echo "Installed DPDK source in $(pwd)" ++ cd .. ++} ++ ++function configure_ovs() ++{ ++ ./boot.sh && ./configure $* ++} ++ ++if [ "$KERNEL" ] || [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then ++ install_kernel $KERNEL ++fi ++ ++if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then ++ if [ -z "$DPDK_VER" ]; then ++ DPDK_VER="18.11.9" ++ fi ++ install_dpdk $DPDK_VER ++ if [ "$CC" = "clang" ]; then ++ # Disregard cast alignment errors until DPDK is fixed ++ CFLAGS="$CFLAGS -Wno-cast-align" ++ fi ++ EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=./dpdk-$DPDK_VER/build" ++elif [ "$CC" != "clang" ]; then ++ # DPDK headers currently trigger sparse errors ++ SPARSE_FLAGS="$SPARSE_FLAGS -Wsparse-error" ++fi ++ ++configure_ovs $EXTRA_OPTS $* ++ ++make selinux-policy ++ ++# Only build datapath if we are testing kernel w/o running testsuite ++if [ "$KERNEL" ] && [ ! "$TESTSUITE" ] && \ ++ [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then ++ cd datapath ++fi ++ ++if [ "$CC" = "clang" ]; then ++ make -j2 CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument" ++elif [[ $BUILD_ENV =~ "-m32" ]]; then ++ # Disable sparse for 32bit builds on 64bit machine ++ make -j2 CFLAGS="$CFLAGS $BUILD_ENV" ++else ++ make -j2 CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1 ++fi ++ ++if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then ++ if ! make distcheck TESTSUITEFLAGS=-j4 RECHECK=yes; then ++ # testsuite.log is necessary for debugging. ++ cat */_build/tests/testsuite.log ++ exit 1 ++ fi ++fi ++ ++exit 0 +diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh +new file mode 100755 +index 0000000000..89770c28d9 +--- /dev/null ++++ b/.ci/linux-prepare.sh +@@ -0,0 +1,14 @@ ++#!/bin/bash ++ ++set -ev ++ ++# Build and install sparse. ++# ++# Explicitly disable sparse support for llvm because some travis ++# environments claim to have LLVM (llvm-config exists and works) but ++# linking against it fails. ++git clone git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git ++cd sparse && make HAVE_LLVM= install && cd .. ++ ++pip install --disable-pip-version-check --user six flake8 hacking ++pip install --user --upgrade docutils +diff --git a/.ci/osx-build.sh b/.ci/osx-build.sh +new file mode 100755 +index 0000000000..f11d7b9af5 +--- /dev/null ++++ b/.ci/osx-build.sh +@@ -0,0 +1,28 @@ ++#!/bin/bash ++ ++set -o errexit ++ ++CFLAGS="-Werror $CFLAGS" ++EXTRA_OPTS="" ++ ++function configure_ovs() ++{ ++ ./boot.sh && ./configure $* ++} ++ ++configure_ovs $EXTRA_OPTS $* ++ ++if [ "$CC" = "clang" ]; then ++ make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument" ++else ++ make CFLAGS="$CFLAGS $BUILD_ENV" ++fi ++if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then ++ if ! make distcheck RECHECK=yes; then ++ # testsuite.log is necessary for debugging. ++ cat */_build/tests/testsuite.log ++ exit 1 ++ fi ++fi ++ ++exit 0 +diff --git a/.ci/osx-prepare.sh b/.ci/osx-prepare.sh +new file mode 100755 +index 0000000000..4725fd829d +--- /dev/null ++++ b/.ci/osx-prepare.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++set -ev ++pip2 install --user six ++pip2 install --user --upgrade docutils ++ ++brew update || true ++brew uninstall libtool && brew install libtool || true diff --git a/.cirrus.yml b/.cirrus.yml index eb6af0a719..14d0cbec9f 100644 --- a/.cirrus.yml @@ -28,19 +232,172 @@ index eb6af0a719..14d0cbec9f 100644 - pkg install -y ${DEPENDENCIES} configure_script: -diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh -index de8e76f192..ab0089d554 100755 ---- a/.travis/linux-build.sh -+++ b/.travis/linux-build.sh -@@ -88,7 +88,7 @@ fi - - if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then - if [ -z "$DPDK_VER" ]; then -- DPDK_VER="18.11.2" -+ DPDK_VER="18.11.9" - fi - install_dpdk $DPDK_VER - if [ "$CC" = "clang" ]; then +diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml +new file mode 100644 +index 0000000000..8131a27cb6 +--- /dev/null ++++ b/.github/workflows/build-and-test.yml +@@ -0,0 +1,160 @@ ++name: Build and Test ++ ++on: [push, pull_request] ++ ++jobs: ++ build-linux: ++ env: ++ dependencies: | ++ automake libtool gcc bc libjemalloc1 libjemalloc-dev \ ++ libssl-dev llvm-dev libelf-dev libnuma-dev \ ++ python-sphinx selinux-policy-dev gcc-multilib ++ CC: ${{ matrix.compiler }} ++ DPDK: ${{ matrix.dpdk }} ++ DPDK_SHARED: ${{ matrix.dpdk_shared }} ++ KERNEL: ${{ matrix.kernel }} ++ LIBS: ${{ matrix.libs }} ++ BUILD_ENV: ${{ matrix.build_env }} ++ OPTS: ${{ matrix.opts }} ++ TESTSUITE: ${{ matrix.testsuite }} ++ ++ name: linux ${{ join(matrix.*, ' ') }} ++ runs-on: ubuntu-16.04 ++ timeout-minutes: 30 ++ ++ strategy: ++ fail-fast: false ++ matrix: ++ compiler: [gcc, clang] ++ kernel: ['4.18.20', '4.17.19', '4.16.18', '4.15.18', '4.14.111', ++ '4.9.149', '4.4.148', '3.16.57'] ++ opts: [''] ++ testsuite: [''] ++ dpdk: [''] ++ dpdk_shared: [''] ++ build_env: [''] ++ include: ++ - compiler: gcc ++ opts: --disable-ssl ++ - compiler: clang ++ opts: --disable-ssl ++ ++ - compiler: gcc ++ testsuite: test ++ kernel: 3.16.54 ++ - compiler: clang ++ testsuite: test ++ kernel: 3.16.54 ++ ++ - compiler: gcc ++ testsuite: test ++ opts: --enable-shared ++ - compiler: clang ++ testsuite: test ++ opts: --enable-shared ++ ++ - compiler: gcc ++ testsuite: test ++ libs: -ljemalloc ++ - compiler: clang ++ testsuite: test ++ libs: -ljemalloc ++ ++ - compiler: gcc ++ dpdk: dpdk ++ kernel: 3.16.54 ++ - compiler: clang ++ dpdk: dpdk ++ kernel: 3.16.54 ++ ++ - compiler: gcc ++ dpdk: dpdk ++ kernel: 3.16.54 ++ opts: --enable-shared ++ - compiler: clang ++ dpdk: dpdk ++ kernel: 3.16.54 ++ opts: --enable-shared ++ ++ - compiler: gcc ++ dpdk_shared: dpdk-shared ++ kernel: 3.16.54 ++ - compiler: clang ++ dpdk_shared: dpdk-shared ++ kernel: 3.16.54 ++ ++ - compiler: gcc ++ dpdk_shared: dpdk-shared ++ opts: --enable-shared ++ kernel: 3.16.54 ++ - compiler: clang ++ dpdk_shared: dpdk-shared ++ kernel: 3.16.54 ++ opts: --enable-shared ++ ++ - compiler: gcc ++ build_env: -m32 ++ opts: --disable-ssl ++ ++ steps: ++ - name: checkout ++ uses: actions/checkout@v2 ++ ++ - name: install common dependencies ++ run: sudo apt install -y ${{ env.dependencies }} ++ - name: install libunbound ++ if: matrix.build_env == '' ++ run: sudo apt install -y libunbound-dev ++ ++ - name: prepare ++ run: ./.ci/linux-prepare.sh ++ ++ - name: build ++ run: PATH="$PATH:$HOME/bin" ./.ci/linux-build.sh ${{ env.OPTS }} ++ ++ - name: copy logs on failure ++ if: failure() || cancelled() ++ run: | ++ # upload-artifact@v2 throws exceptions if it tries to upload socket ++ # files and we could have some socket files in testsuite.dir. ++ # Also, upload-artifact@v2 doesn't work well enough with wildcards. ++ # So, we're just archiving everything here to avoid any issues. ++ mkdir logs ++ cp config.log ./logs/ ++ cp -r ./*/_build/sub/tests/testsuite.* ./logs/ || true ++ tar -czvf logs.tgz logs/ ++ ++ - name: upload logs on failure ++ if: failure() || cancelled() ++ uses: actions/upload-artifact@v2 ++ with: ++ name: logs-linux-${{ join(matrix.*, '-') }} ++ path: logs.tgz ++ ++ build-osx: ++ env: ++ CC: clang ++ OPTS: --disable-ssl ++ ++ name: osx clang --disable-ssl ++ runs-on: macos-latest ++ timeout-minutes: 30 ++ ++ strategy: ++ fail-fast: false ++ ++ steps: ++ - name: checkout ++ uses: actions/checkout@v2 ++ - name: install dependencies ++ run: brew install automake libtool ++ - name: prepare ++ run: ./.ci/osx-prepare.sh ++ - name: build ++ run: PATH="$PATH:$HOME/bin" ./.ci/osx-build.sh ++ - name: upload logs on failure ++ if: failure() ++ uses: actions/upload-artifact@v2 ++ with: ++ name: logs-osx-clang---disable-ssl ++ path: config.log diff --git a/AUTHORS.rst b/AUTHORS.rst index f3237e1828..e1e1e5fa36 100644 --- a/AUTHORS.rst @@ -116,6 +473,25 @@ index eeb949d4a6..302da72fcd 100644 Q: Are all the DPDK releases that OVS versions work with maintained? +diff --git a/Documentation/internals/contributing/submitting-patches.rst b/Documentation/internals/contributing/submitting-patches.rst +index 5a314cc60a..f2039595e7 100644 +--- a/Documentation/internals/contributing/submitting-patches.rst ++++ b/Documentation/internals/contributing/submitting-patches.rst +@@ -68,11 +68,9 @@ Testing is also important: + feature. A bug fix patch should preferably add a test that would + fail if the bug recurs. + +-If you are using GitHub, then you may utilize the travis-ci.org CI build system +-by linking your GitHub repository to it. This will run some of the above tests +-automatically when you push changes to your repository. See the "Continuous +-Integration with Travis-CI" in :doc:`/topics/testing` for details on how to set +-it up. ++If you are using GitHub, then you may utilize the GitHub Actions CI build ++system. It will run some of the above tests automatically when you push ++changes to your repository. + + Email Subject + ------------- diff --git a/Documentation/internals/mailing-lists.rst b/Documentation/internals/mailing-lists.rst index 33f20277be..e8b3440943 100644 --- a/Documentation/internals/mailing-lists.rst @@ -298,6 +674,86 @@ index 33361ec359..3bd2dc608a 100644 vhost-user Dequeue Zero Copy (experimental) ------------------------------------------- +diff --git a/Documentation/topics/testing.rst b/Documentation/topics/testing.rst +index a8892e1c1c..b74653436d 100644 +--- a/Documentation/topics/testing.rst ++++ b/Documentation/topics/testing.rst +@@ -372,45 +372,17 @@ You should invoke scan-view to view analysis results. The last line of output + from ``clang-analyze`` will list the command (containing results directory) + that you should invoke to view the results on a browser. + +-Continuous Integration with Travis CI +-------------------------------------- ++Continuous Integration with GitHub Actions ++------------------------------------------ + +-A .travis.yml file is provided to automatically build Open vSwitch with various +-build configurations and run the testsuite using Travis CI. Builds will be +-performed with gcc, sparse and clang with the -Werror compiler flag included, +-therefore the build will fail if a new warning has been introduced. ++A ``.github/workflows/*.yml`` files provided to automatically build ++Open vSwitch with various build configurations and run the testsuite using ++GitHub Actions. Builds will be performed with gcc, sparse and clang with the ++-Werror compiler flag included, therefore the build will fail if a new warning ++has been introduced. + + The CI build is triggered via git push (regardless of the specific branch) or +-pull request against any Open vSwitch GitHub repository that is linked to +-travis-ci. +- +-Instructions to setup travis-ci for your GitHub repository: +- +-1. Go to https://travis-ci.org/ and sign in using your GitHub ID. +-2. Go to the "Repositories" tab and enable the ovs repository. You may disable +- builds for pushes or pull requests. +-3. In order to avoid forks sending build failures to the upstream mailing list, +- the notification email recipient is encrypted. If you want to receive email +- notification for build failures, replace the the encrypted string: +- +- 1. Install the travis-ci CLI (Requires ruby >=2.0): gem install travis +- 2. In your Open vSwitch repository: travis encrypt mylist@mydomain.org +- 3. Add/replace the notifications section in .travis.yml and fill in the +- secure string as returned by travis encrypt:: +- +- notifications: +- email: +- recipients: +- - secure: "....." +- +- .. note:: +- You may remove/omit the notifications section to fall back to default +- notification behaviour which is to send an email directly to the author and +- committer of the failing commit. Note that the email is only sent if the +- author/committer have commit rights for the particular GitHub repository. +- +-4. Pushing a commit to the repository which breaks the build or the +- testsuite will now trigger a email sent to mylist@mydomain.org ++pull request against any Open vSwitch GitHub repository. + + vsperf + ------ +diff --git a/Makefile.am b/Makefile.am +index ff1f94b484..4f9f1866c0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -76,12 +76,12 @@ EXTRA_DIST = \ + MAINTAINERS.rst \ + README.rst \ + NOTICE \ ++ .ci/linux-build.sh \ ++ .ci/linux-prepare.sh \ ++ .ci/osx-build.sh \ ++ .ci/osx-prepare.sh \ + .cirrus.yml \ +- .travis.yml \ +- .travis/linux-build.sh \ +- .travis/linux-prepare.sh \ +- .travis/osx-build.sh \ +- .travis/osx-prepare.sh \ ++ .github/workflows/build-and-test.yml \ + appveyor.yml \ + boot.sh \ + poc/builders/Vagrantfile \ diff --git a/NEWS b/NEWS index f177d7efc1..b0d3022eb6 100644 --- a/NEWS @@ -323,6 +779,21 @@ index f177d7efc1..b0d3022eb6 100644 v2.11.3 - 06 Sep 2019 --------------------- - Fix compilation issue with Ubuntu kernel 4.15.60. +diff --git a/README.rst b/README.rst +index 54d06d04be..37d7685c88 100644 +--- a/README.rst ++++ b/README.rst +@@ -6,8 +6,8 @@ + Open vSwitch + ============ + +-.. image:: https://travis-ci.org/openvswitch/ovs.png +- :target: https://travis-ci.org/openvswitch/ovs ++.. image:: https://github.com/openvswitch/ovs/workflows/Build%20and%20Test/badge.svg ++ :target: https://github.com/openvswitch/ovs/actions + .. image:: https://ci.appveyor.com/api/projects/status/github/openvswitch/ovs?branch=master&svg=true&retina=true + :target: https://ci.appveyor.com/project/blp/ovs/history + diff --git a/acinclude.m4 b/acinclude.m4 index f15b1ff670..71813077c6 100644 --- a/acinclude.m4 @@ -585,6 +1056,36 @@ index fd050d5dd8..bc12e1166d 100644 const struct ovs_key_ipv4 *ipAttr); NDIS_STATUS +diff --git a/datapath/conntrack.c b/datapath/conntrack.c +index 83840f9579..974387addb 100644 +--- a/datapath/conntrack.c ++++ b/datapath/conntrack.c +@@ -1895,7 +1895,8 @@ static void ovs_ct_limit_exit(struct net *net, struct ovs_net *ovs_net) + struct hlist_head *head = &info->limits[i]; + struct ovs_ct_limit *ct_limit; + +- hlist_for_each_entry_rcu(ct_limit, head, hlist_node) ++ hlist_for_each_entry_rcu(ct_limit, head, hlist_node, ++ lockdep_ovsl_is_held()) + kfree_rcu(ct_limit, rcu); + } + kfree(ovs_net->ct_limit_info->limits); +diff --git a/datapath/datapath.c b/datapath/datapath.c +index 2febcb3f2a..c645c2b797 100644 +--- a/datapath/datapath.c ++++ b/datapath/datapath.c +@@ -2383,8 +2383,10 @@ static void __net_exit ovs_exit_net(struct net *dnet) + + ovs_netns_frags6_exit(dnet); + ovs_netns_frags_exit(dnet); +- ovs_ct_exit(dnet); + ovs_lock(); ++ ++ ovs_ct_exit(dnet); ++ + list_for_each_entry_safe(dp, dp_next, &ovs_net->dps, list_node) + __dp_destroy(dp); + diff --git a/datapath/linux/compat/include/linux/openvswitch.h b/datapath/linux/compat/include/linux/openvswitch.h index 9b087f1b06..3369c8630d 100644 --- a/datapath/linux/compat/include/linux/openvswitch.h @@ -684,6 +1185,41 @@ index 7c346aa31a..a039142e22 100644 #if !defined this_cpu_read #define this_cpu_read(ptr) percpu_read(ptr) #endif +diff --git a/datapath/linux/compat/include/linux/rculist.h b/datapath/linux/compat/include/linux/rculist.h +index 8df8ad8a27..40fd5e1710 100644 +--- a/datapath/linux/compat/include/linux/rculist.h ++++ b/datapath/linux/compat/include/linux/rculist.h +@@ -9,9 +9,28 @@ + #define hlist_pprev_rcu(node) (*((struct hlist_node __rcu **)((node)->pprev))) + #endif + ++/* ++ * Check during list traversal that we are within an RCU reader ++ */ ++ ++#define check_arg_count_one(dummy) ++ ++#ifdef CONFIG_PROVE_RCU_LIST ++#define __list_check_rcu(dummy, cond, extra...) \ ++ ({ \ ++ check_arg_count_one(extra); \ ++ RCU_LOCKDEP_WARN(!cond && !rcu_read_lock_any_held(), \ ++ "RCU-list traversed in non-reader section!"); \ ++ }) ++#else ++#define __list_check_rcu(dummy, cond, extra...) \ ++ ({ check_arg_count_one(extra); }) ++#endif ++ + #undef hlist_for_each_entry_rcu +-#define hlist_for_each_entry_rcu(pos, head, member) \ +- for (pos = hlist_entry_safe (rcu_dereference_raw(hlist_first_rcu(head)),\ ++#define hlist_for_each_entry_rcu(pos, head, member, cond...) \ ++ for (__list_check_rcu(dummy, ## cond, 0), \ ++ pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\ + typeof(*(pos)), member); \ + pos; \ + pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu(\ diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h index 4a6ac2384c..9828f811d9 100644 --- a/datapath/linux/compat/include/linux/skbuff.h @@ -19708,6 +20244,20 @@ index 0000000000..67d1a4aa23 + +OVS_VSWITCHD_STOP(["/|WARN|/d"]) +AT_CLEANUP +diff --git a/tests/library.at b/tests/library.at +index a30d362e34..49d90f4303 100644 +--- a/tests/library.at ++++ b/tests/library.at +@@ -53,7 +53,8 @@ AT_CHECK([ovstest test-packets]) + AT_CLEANUP + + AT_SETUP([SHA-1]) +-AT_CHECK([ovstest test-sha1], [0], [......... ++AT_KEYWORDS([sha1]) ++AT_CHECK([ovstest test-sha1], [0], [.......... + ]) + AT_CLEANUP + diff --git a/tests/odp.at b/tests/odp.at index 86a918e662..a172c49fe1 100644 --- a/tests/odp.at @@ -20106,6 +20656,19 @@ index 6ae3470425..82c89686f0 100644 NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,zone=5) NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[])) NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127])) +diff --git a/tests/ovsdb-cluster.at b/tests/ovsdb-cluster.at +index c7f1e344c9..115c9f7978 100644 +--- a/tests/ovsdb-cluster.at ++++ b/tests/ovsdb-cluster.at +@@ -152,7 +152,7 @@ ovsdb|WARN|schema: changed 2 columns in 'OVN_Southbound' database from ephemeral + # Use file instead of var because code inside "while" runs in a subshell. + echo 0 > phase + i=0 +- (while :; do echo; sleep 1; done) | while read REPLY; do ++ (while :; do echo || exit 0; sleep 1; done) | while read REPLY; do + printf "t=%2d s:" $i + done=0 + for j in $(seq 0 $(expr $n1 - 1)); do diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at index 8981b5e2f9..3661816f6d 100644 --- a/tests/ovsdb-idl.at @@ -20575,6 +21138,61 @@ index 187eb28671..c49f084b5f 100644 ovsdb_idl_track_clear(idl); } else { print_idl(idl, step++); +diff --git a/tests/test-sha1.c b/tests/test-sha1.c +index b7279db6aa..cc80888a7d 100644 +--- a/tests/test-sha1.c ++++ b/tests/test-sha1.c +@@ -137,6 +137,42 @@ test_big_vector(void) + free(vec.data); + } + ++static void ++test_huge_vector(void) ++{ ++ enum { SIZE = 1000000000 }; ++ struct test_vector vec = { ++ NULL, SIZE, ++ /* Computed by the sha1sum utility for a file with 10^9 symbols 'a'. */ ++ { 0xD0, 0xF3, 0xE4, 0xF2, 0xF3, 0x1C, 0x66, 0x5A, 0xBB, 0xD8, ++ 0xF5, 0x18, 0xE8, 0x48, 0xD5, 0xCB, 0x80, 0xCA, 0x78, 0xF7 } ++ }; ++ int chunk = random_range(SIZE / 10000); ++ uint8_t md[SHA1_DIGEST_SIZE]; ++ struct sha1_ctx sha1; ++ size_t i, sz; ++ ++ /* It's not user-friendly to allocate 1GB of memory for a unit test, ++ * so we're allocating only a small chunk and re-using it. */ ++ vec.data = xmalloc(chunk); ++ for (i = 0; i < chunk; i++) { ++ vec.data[i] = 'a'; ++ } ++ ++ sha1_init(&sha1); ++ for (sz = 0; sz < SIZE; sz += chunk) { ++ int n = sz + chunk < SIZE ? chunk : SIZE - sz; ++ ++ sha1_update(&sha1, vec.data, n); ++ } ++ sha1_final(&sha1, md); ++ ovs_assert(!memcmp(md, vec.output, SHA1_DIGEST_SIZE)); ++ ++ free(vec.data); ++ putchar('.'); ++ fflush(stdout); ++} ++ + static void + test_shar1_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) + { +@@ -147,6 +183,7 @@ test_shar1_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) + } + + test_big_vector(); ++ test_huge_vector(); + + putchar('\n'); + } diff --git a/tests/testsuite.at b/tests/testsuite.at index b840dbfa70..922ba48fdf 100644 --- a/tests/testsuite.at diff --git a/SPECS/openvswitch2.11.spec b/SPECS/openvswitch2.11.spec index fbd24b4..f5fa486 100644 --- a/SPECS/openvswitch2.11.spec +++ b/SPECS/openvswitch2.11.spec @@ -66,7 +66,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.11.3 -Release: 74%{?dist} +Release: 75%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -745,6 +745,10 @@ exit 0 %changelog +* Wed Dec 02 2020 Open vSwitch CI - 2.11.3-75 +- Merging upstream branch-2.11 + [838f461d65b104b814f1f6857710c0221f50ca3f] + * Tue Nov 17 2020 Open vSwitch CI - 2.11.3-74 - Merging upstream branch-2.11 [757d6ce62c7f7fe77533f6d632f515db847c4145]