[ovs-dev] [PATCH] ovs-vsctl.at: Fix a ssl unit test on Windows.

Gurucharan Shetty shettyg at nicira.com
Mon Aug 24 21:27:50 UTC 2015


On Mon, Aug 24, 2015 at 10:16 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, Aug 24, 2015 at 07:45:22AM -0700, Gurucharan Shetty wrote:
>> In Windows, when we do a 'pwd', it calls 'pwd -W' to give
>> a Windows path. ovs-pki utility does not understand Windows
>> path style, so the test fails. This commit prevents the
>> overloading of 'pwd' command to let ovs-pki generate the
>> certificates correctly.
>>
>> Reported-by: Ben Pfaff <blp at nicira.com>
>> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
>
> I don't see very complicated use of the pkidir in ovs-pki.  Do you have
> an idea of what the problem is?  It might be nice to fix ovs-pki, if
> possible, to accept the other format.

The summary of the problem is that, when ovs-pki is called like this:
$ sh /c/Shares/openvswitch/utilities/ovs-pki.in --dir="c:/Shares/openvswitch/te
sts/testsuite.dir/1591/pki" --log="C:/Shares/openvswitch/tests/testsuite.dir/15
91/ovs-pki.log" init

ovs-pki does a test for logdir like this:
case $log in
    /*) ;;
    *) log=`pwd`/$log ;;
esac

Since the path does not start with '/', it assumes that it is a
relative path and prepends a `pwd`.

If your preference is to fix this issue in ovs-pki, then I suppose we
can do it.


>
> Would you mind adding a comment here explaining what's going on?
>
>> -PKIDIR=`pwd`
>> +PKIDIR=`command pwd`
>>  OVS_PKI="sh $abs_top_srcdir/utilities/ovs-pki.in --dir=$PKIDIR/pki --log=$PKIDIR/ovs-pki.log"
>>  $OVS_PKI -B 1024 init && \
>
> Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list