Patch "selftests: openvswitch: Use bash as interpreter" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests: openvswitch: Use bash as interpreter

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-openvswitch-use-bash-as-interpreter.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 70d45ea111f3cf35390b5b069dfab74eb294e26a
Author: Simon Horman <horms@xxxxxxxxxx>
Date:   Mon Jun 17 09:28:33 2024 +0100

    selftests: openvswitch: Use bash as interpreter
    
    [ Upstream commit e2b447c9a1bba718f9c07513a1e8958209e862a1 ]
    
    openvswitch.sh makes use of substitutions of the form ${ns:0:1}, to
    obtain the first character of $ns. Empirically, this is works with bash
    but not dash. When run with dash these evaluate to an empty string and
    printing an error to stdout.
    
     # dash -c 'ns=client; echo "${ns:0:1}"' 2>error
     # cat error
     dash: 1: Bad substitution
     # bash -c 'ns=client; echo "${ns:0:1}"' 2>error
     c
     # cat error
    
    This leads to tests that neither pass nor fail.
    F.e.
    
     TEST: arp_ping                                                      [START]
     adding sandbox 'test_arp_ping'
     Adding DP/Bridge IF: sbx:test_arp_ping dp:arpping {, , }
     create namespaces
     ./openvswitch.sh: 282: eval: Bad substitution
     TEST: ct_connect_v4                                                 [START]
     adding sandbox 'test_ct_connect_v4'
     Adding DP/Bridge IF: sbx:test_ct_connect_v4 dp:ct4 {, , }
     ./openvswitch.sh: 322: eval: Bad substitution
     create namespaces
    
    Resolve this by making openvswitch.sh a bash script.
    
    Fixes: 918423fda910 ("selftests: openvswitch: add an initial flow programming case")
    Signed-off-by: Simon Horman <horms@xxxxxxxxxx>
    Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20240617-ovs-selftest-bash-v1-1-7ae6ccd3617b@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh
index 36e40256ab92a..bab7436c68348 100755
--- a/tools/testing/selftests/net/openvswitch/openvswitch.sh
+++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 #
 # OVS kernel module self tests




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux