Failing tests (Re: [PATCH v6 00/15] Static: Implement new "index" option)

Alejandro Colomar (man-pages) alx.manpages at gmail.com
Tue Feb 15 15:01:51 UTC 2022


On 2/15/22 15:57, Alejandro Colomar wrote:
> Changes:
> 
> v2:
> - Add support for variables in "index"
> - Don't move share_idx, since that caused unnecessary padding.
> - Use <stdbool.h>
> 
> v3 <https://mailman.nginx.org/pipermail/unit/2021-December/000304.html>:
> - Don't use <stdbool.h> (as previously discussed).
> - Add a .gitignore:
>    While doing this work, I had quite some accidents.  This
>    prevented them from happening again.  I based it on the
>    .gitignore of the Linux man-pages
>    <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/.gitignore>
>    <https://lore.kernel.org/linux-man/20210509213930.94120-35-alx.manpages@gmail.com/>.
> - Treat non-arrays as arrays of size 1
>    (as discussed earlier today:
>    <https://mailman.nginx.org/pipermail/unit/2021-December/000300.html>).
> - Simplify all of the code that can be simplified thanks to the
>    change mentioned above (arrays of size 1).
> - Fix the indentation of some random lines that I found to have an
>    incorrect indentation.
> - Reduce branching (especially 'else's), to improve readability.
>    I didn't merge this change into the patch that adds the feature
>    because there it adds too much complexity for nothing, and the
>    patches read better separately.  However, I patched it previous
>    to the third step to simplify that patch too, so this change
>    sits on a patch of its own better, I think.
> - Use const for a read-only parameter of a function.  I didn't
>    change other functions (not even in the same file), since that
>    would mean a huuuge diff, and for consistency we would need to
>    do it everywhere.  So I only did it where I *needed* it to
>    compile, for now.
> 
> v4 <https://mailman.nginx.org/pipermail/unit/2021-December/000327.html>:
> - Actually iterate.
> 
> v5 <https://mailman.nginx.org/pipermail/unit/2021-December/000346.html>:
> - Remove spurious 'else' [Valentin]
> 
> v6:
> - Add Andrei's tests (and remove my changes to the existing tests).
> - Fix bugs reported by Andrei:
>    - Reject [].
>    - Don't return 301 for a directory (maybe I should add a check
>      that the string can't be empty; do we want that?)
>    - Fix non-compiling debug code.
> 
> 
> Alejandro Colomar (14):
>    .gitignore: ignore new files
>    nxt_conf.c: Treat non-arrays as arrays of size 1
>    Remove special cases for non-NXT_CONF_VALUE_ARRAY
>    Fix indentation
>    nxt_http_static_ctx_t: rename field 'index' to 'share_idx'
>    test_static.py: formatting fix
>    Static: return 404 when "index" is a non-regular file
>    Static: add "index" option
>    nxt_http_static_iterate(): generalize code
>    Static: variables in the "index" option
>    nxt_conf_set_string_dup(): Use 'const' for read-only parameter
>    nxt_http_static_init(): Simplify branching
>    Static: multiple paths in the "index" option
>    Static: optimize "index" iteration
> 
> Andrei Zeliankou (1):
>    Tests: added tests for "index" option.
> 

I forgot to write in this cover letter:

Some of Andrei's tests fail.  I'm not sure why, since I'm not used to 
them yet.  Please, Andrei, help me with that.  Also, as I pointed out in 
the RFC I sent a few minutes ago, the fix for the 301 error also makes 
some existing tests fail, and I also don't know why.

Thanks,

Alex

-- 
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



More information about the unit mailing list