diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Find libc's write when git writes first
A Lua build replaces write, and git can write before cmd_main reaches
cgit_init_filters, as it does when GIT_TRACE2 is set, which called
through a null pointer and crashed every request.
Diffstat (limited to 'tests/t0201-filters.sh')
| -rwxr-xr-x | tests/t0201-filters.sh | 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 8 insertions, 0 deletions
diff --git a/tests/t0201-filters.sh b/tests/t0201-filters.sh index 1ffb973..3987bdc 100755 --- a/tests/t0201-filters.sh +++ b/tests/t0201-filters.sh @@ -163,4 +163,12 @@ test_expect_success CGIT_LUA 'a lua filter that writes while loading still rende grep "</html>" tmp ' +# A Lua build replaces write, and git writes its trace before cgit has run a +# line of its own. +test_expect_success CGIT_LUA 'git can trace before the filters are set up' ' + CGIT_CONFIG="$PWD/cgitrc" GIT_TRACE2="$PWD/trace2.out" QUERY_STRING="url=foo/" cgit >tmp && + grep "</html>" tmp && + test -s trace2.out +' + test_done |
