| Age | Commit message (Collapse) | Author | Lines |
|
Only split_cgi_output was ever run. The handler, which builds the CGI
environment, guards the asset directory, caps the body, times cgit out,
turns a failed run into a 500 and answers HEAD, ran in no test at all.
The server listens on a port the system picks, so parallel runs cannot
collide.
|
|
The five cases ran as one test, and their names reached the log only
with -v. python3 also ran under the trash directory's HOME, where a
version manager's shim may find no interpreter, and without -I, so
PYTHONPATH or the user's site packages could shadow a module.
|
|
Nothing checked that the traced request worked, and one that failed
early opened fewer files and passed. cgit unsets HOME, so a read that
fell back on the account's entry in the password database would name
that home rather than the missing one the test set. Under Valgrind
every test would have failed, as strace follows valgrind into the
.valgrindrc it reads from the home directory.
|
|
test_url failed only on tidy's own errors, so a 404 or a 500 page in
place of the stats or the blame page validated as well as the real
one, and an empty body drew no more than warnings.
|
|
CGIT_TEST_NO_GIT_VERSION ended t0001 before the test library started,
so it wrote no counts and printed nothing. Without vendor/git/.git the
submodule check passed with a note on stderr, which is the case for a
tree from get-git or git archive, so the pin was checked nowhere.
|
|
t0006 ran build/nolua/cgit by its path, so Valgrind never saw it, and
its page checks passed a page that logged an error. The Makefile and
README said the suite runs both binaries the same way, though only
these four tests run the one without Lua.
|
|
The library runs a script again for --tee, --verbose-log and --stress
with the arguments setup.sh left it, and --valgrind was no longer among
them, so -V --valgrind ran cgit bare. --valgrind=<tool> reached the
library instead, which then wrapped every Git command and left cgit
alone. --valgrind-only is refused, as it would need the library's own
per-test switching.
|
|
Nothing could make a missing prerequisite fail. A host without
pkg-config builds without Lua, and make test then passed with every
Lua test skipped and the lua pass of t0201 never run. The whole-script
skips become named prerequisites so the same list covers them, and the
strace probe now traces the file class of calls the tests use, so an
strace too old for it skips rather than fails.
|
|
Only the source tree list mentioned the suite, so nothing said how to
run one script, pass options or see why a test failed, or which tools
the skipped tests want.
|
|
Without -v a report went to /dev/null with the rest of stderr, and one
from a process whose status a pipeline or a background job loses
failed nothing at all.
|
|
A regression that blocked, such as a lock never let go or a filter
that never returns, hung make test rather than failing it. The alarm
is set in Perl, which the test library already wants for its chain
lint, since a pending alarm survives the exec into cgit.
|
|
It is only ever sourced, as extensions/lib.sh is.
|
|
The arguments were split back apart with globbing on, so one that
matched a file in tests/ reached the library as that file's name.
|
|
cgit_rc keeps its name, close as it is to cgitrc_repo and cgitrc_copy,
since every script calls it, so a comment now says what it runs.
|
|
A script stopped by -i or --debug inside one of the SANITY tests leaves
a directory without permissions, and make clean then failed on it.
|
|
make stopped at the first failing script and left every later one
unrun. Each script's closing line also counts its skipped tests as
passes, so a run that skipped half the suite read like a full one, and
the counts the library writes for each script were never read.
|
|
Only the counts were re-pointed at results/. The --tee, --verbose-log
and --stress logs, the leak logs and the counts of a script skipped
through GIT_SKIP_TESTS still went to test-results/, which nothing
ignored or cleaned, so a summary read from one place would miss them.
|
|
An exported TEST_OUTPUT_DIRECTORY made every script bail out, and an
exported GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main failed t0102.
|
|
cgit exits 0 whatever goes wrong, and a die after the headers leaves a
page cut short behind a 200 status, so cgit_rc and its siblings pass
any page that does not crash. Only 71 of the 337 tests that request a
page checked a status line. cgit_ok also wants an empty stderr and,
for HTML, the closing tag. cgit_ok_url renders afresh with the page
cache off, since the shared config caches a page under its request
alone.
|
|
mkrepo had no && chain, so a failed add or commit went unnoticed and
every mkrepo call in the tests passed on a broken repository. The
shared fixtures were built the same way. They are still built when
setup.sh is sourced, so --run can pick out any test, but a failure now
stops the run where it broke.
|
|
The Lua probe piped cgit --version into grep, so a crash there, or a
change of wording, turned every Lua test into a skip and the run still
passed. The answer is now also held against the flags the binary was
built with in build/CGIT-CFLAGS.
|
|
The test library clears only Git's variables, so a CGI variable or
CGIT_SCINTILLUA_PATH exported in the shell reached every request, and
NO_HTTP alone strips every header. LUA_INIT runs code in each
standalone interpreter. The umask is pinned so files the tests create
get the same modes everywhere.
|
|
|
|
The icons came from Gravatar or Libravatar with the page's url as the
Referer, so the service learned which repositories and commits each
visitor looked at.
|
|
|
|
The old file was a complete lighttpd.conf with its own user, modules
and MIME table. As a snippet it takes those from the distribution and
loads only the three modules it uses, which lighttpd skips when the
main config loads them already. It takes the nginx config's header and
commented examples. The host block matches on every socket, so HTTPS
needs only the socket, and the redirect is a condition on the scheme
inside it.
The stock lighttpd.conf on Debian, Alpine and Fedora refuses urls
ending in ~ or .inc, so a repository's config.inc answered 403 until
the host block cleared the list.
git-http-backend's cgi.assign sits outside the url condition because
lighttpd checks it after splitting the path, when that condition no
longer matches, and inside it the program itself was served as a file.
|
|
The old file was a complete httpd.conf that named RHEL's paths and
user and loaded its own modules, so on Debian it had to be rewritten
before Apache would start. As a virtual host it leaves all of that to
the distribution, and it takes the nginx config's header and commented
examples. For HTTPS the one virtual host moves to port 443 rather than
a second host repeating its routing, and a small host on port 80 sends
plain HTTP on to it.
|
|
The old file was a complete nginx.conf with TLS, compression, catch-all
hosts and security headers, and it had to be taken apart before it ran
beside a distribution's own nginx.conf. A server block included from
the http block leaves the user, the MIME types and the logs to the
distribution. Its header gives one default path per thing, adjusted
where a system differs, which leaves packagers a plain base to adapt
rather than a table for each distribution.
HTTPS and git-http-backend are commented examples, so the file serves
plain HTTP as shipped. The backend takes only the three smart HTTP
paths at cgit's own repository urls, so every page still reaches cgit.
git refuses a repository another user owns, which failed every clone
until safe.directory was set for the backend, and a 3 MB push got 413
until the location lifted nginx's body limit.
The split empties SCRIPT_NAME because a second SCRIPT_NAME after the
include reaches fcgiwrap as well, and cgit reads the first one, which
put every link under the request path.
cgit sends nosniff and a locked policy on raw output itself, so the
configs no longer carry one. The t0004 check that all three agree goes
here, with the first of them to drop it.
|
|
|
|
|
|
Without one a repository has no about tab and its about url redirects
to the summary, so a site that sets only about-filter never sees the
renderer run.
|
|
add_repo reads the git config before it applies section-from-path, and
the repository's cgitrc after both. A repository too shallow for the
count takes no section from its path and keeps its gitweb.category.
|
|
Without generation numbers, git can sort the log topologically only
after walking the whole history. On a 20,000-commit scratch repository
the graph and both commit-sort orders took the log page from 5 ms to
between 56 and 64 ms, and the split graph post-receive.commit-graph
writes brought all three back to 5 ms.
|
|
On a scratch repository with 400-line files, the line count took a
50-row log from 5 ms to 38 ms, while the file count alone added 3 ms.
A commit-graph file changes neither, since the diffs read trees and
blobs rather than commits.
|
|
It scrolls sideways like the hex dump, with nothing inside a keyboard
can reach, so it takes focus and the shared focus ring the same way.
|
|
|
|
Chrome and Firefox already let an overflowing box take focus, with
their own ring, but WebKit does not. The table takes focus on a mouse
click as well, where focus-visible keeps the ring off.
|
|
The file view's table only sets the line numbers beside the code, and
the unified diff's is a single cell holding every file.
|
|
|
|
|
|
|
|
LuaJIT and Lua 5.1 leave print's line in stdio's buffer until cgit
exits, after the end of the page.
|
|
|
|
cgit.conf was read only after Git's Makefile, which had already settled
NO_REGEX and the other options it tests as it read them, so setting one
there changed nothing in Git's part of the build. The second read stays
for the defaults Git assigns outright, such as CC and CFLAGS. A "+="
there now appends twice to a variable nothing resets in between, such
as CGIT_CFLAGS, which only repeats the flag.
|
|
|
|
A scanned repository is read back from the cached list under the global
settings, so a setting that only differed from them by being off, or by
naming the default value, came back as the global one. branch-sort was
written only for age, per-path module links not at all, and a filter a
repository turned off left no line behind.
Writing an empty value for a filter turned off makes the list depend on
whether each global filter is set, so the scan key names that too.
|
|
The cached list wrote "[no description]" like any other description,
so once read back it no longer counted as the placeholder and became
the meta description of every repository without one. Repositories
read back from the list are also marked as having had their
description file read, since the scan already did, so the index does
not open those files again on every request.
|
|
The page cache counts a cache-size of 0 or less as off, but scan-path
cached its list for any value other than 0, so a negative one still
wrote a list into cache-root.
|
|
|
|
|