Hi Ben, Sorry, I forgot the sign-off.
Signed-off-by: Zoltán Balogh <zoltan.bal...@ericsson.com> diff --git a/tests/library.at b/tests/library.at index d5dcb12..f03d127 100644 --- a/tests/library.at +++ b/tests/library.at @@ -147,8 +147,25 @@ dnl a directory fd using /proc/self/fd/<dirfd>. We do not have a workaround dnl for other platforms, so we skip the test there. AT_SETUP([test unix socket, long pathname - C]) AT_SKIP_IF([test "$IS_WIN32" = "yes"]) -dnl Linux has a 108 byte limit; this is 150 bytes long. -longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 +dnl Linux has a 108 byte limit; this is 150 bytes long. If filesystem +dnl supports shorter names then let use the maximum length. + +if test -f $(which stat) && test $(stat --printf=%l -f ./) -lt 150; +then + longname="" + max_length=$(stat --printf=%l -f ./) + while test $max_length -gt 0; do + for i in 0 1 2 3 4 5 6 7 8 9; do + longname=$longname$i + max_length=$((max_length-1)) + if test $max_length -eq 0; then + break; + fi + done + done +else + +longname=01234567890123456789012345678901234567890123456789012345678901 +23456789012345678901234567890123456789012345678901234567890123456789012 +34567890123456789 +fi + mkdir $longname cd $longname AT_CHECK([ovstest test-unix-socket ../$longname/socket socket]) @@ -166,8 +183,25 @@ dnl a directory fd using /proc/self/fd/<dirfd>. We do not have a workaround dnl for other platforms, so we skip the test there. AT_SETUP([test unix socket, long pathname - Python]) AT_SKIP_IF([test $HAVE_PYTHON = no || test "$IS_WIN32" = "yes"]) -dnl Linux has a 108 byte limit; this is 150 bytes long. -longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 +dnl Linux has a 108 byte limit; this is 150 bytes long. If filesystem +dnl supports shorter names then let use the maximum length. + +if test -f $(which stat) && test $(stat --printf=%l -f ./) -lt 150; +then + longname="" + max_length=$(stat --printf=%l -f ./) + while test $max_length -gt 0; do + for i in 0 1 2 3 4 5 6 7 8 9; do + longname=$longname$i + max_length=$((max_length-1)) + if test $max_length -eq 0; then + break; + fi + done + done +else + +longname=01234567890123456789012345678901234567890123456789012345678901 +23456789012345678901234567890123456789012345678901234567890123456789012 +34567890123456789 +fi + mkdir $longname cd $longname AT_CHECK([$PYTHON $abs_srcdir/test-unix-socket.py ../$longname/socket socket]) -----Original Message----- From: Ben Pfaff [mailto:b...@ovn.org] Sent: Tuesday, February 16, 2016 6:42 PM To: Zoltán Balogh Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH] tests : fix tests #46 and #48 failing on some filesystems On Tue, Feb 16, 2016 at 04:36:50PM +0000, Zoltán Balogh wrote: > On my Ubuntu, my home folder is encrypted via ecryptfs. When I run 'make > check', the unix socket tests with long pathnames do fail. > This happens because of ecryptfs allows to create files with filename lenght > up to 143 characters and the tests try to create sockets with 150 character > long names. > With the 'stat' command it is possible to retrieve the maximum length of > filename on current filesystem. So I updated the test scripts to check if > this length is lower than 150 and use the longest filename according to this > length. Thank you for the fix! Can you provide a Signed-off-by? The syntax and meaning are describe in CONTRIBUTING.md, excerpted below. Signed-off-by: Author Name <author.name@email.address...> Informally, this indicates that Author Name is the author or submitter of a patch and has the authority to submit it under the terms of the license. The formal meaning is to agree to the Developer's Certificate of Origin (see below). If the author and submitter are different, each must sign off. If the patch has more than one author, all must sign off. Signed-off-by: Author Name <author.name@email.address...> Signed-off-by: Submitter Name <submitter.name@email.address...> Developer's Certificate of Origin --------------------------------- To help track the author of a patch as well as the submission chain, and be clear that the developer has authority to submit a patch for inclusion in openvswitch please sign off your work. The sign off certifies the following: Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev