| Age | Commit message (Collapse) | Author | Lines |
|
Under --valgrind both tests failed with an exit status of 1 and no page,
because Valgrind gave up as it started when the write of its gdbserver
file was refused, so cgit never ran.
|
|
The child that rebuilds an expired list drops the request's stdin,
stdout and stderr, and nothing showed it, so a child that kept them
would hold the visitor's connection open for the whole scan.
|
|
hold-lock has to start cgit inside its hold, so it could not use
cgit_rc, and a cgit that blocked on the held lock stalled the run for
good instead of failing. The strace helper cannot use cgit_rc either,
and now says so.
|
|
The copy of the client's stdout kept during a fill is marked
close-on-exec, but nothing checked it, so a filter left holding the
connection after the request ended passed.
|
|
The test named the lock file through a variable set for cgit alone,
which kept it from going through cgit_rc, as a variable set ahead of a
shell function call does not portably reach the commands it runs. The
slot names fixed at 00000000 were never explained either.
|
|
No test set either value, so a size check that took 0 as a limit of no
bytes, or a parser that ignored such a value, passed. Under the 64 MB
default an ignored value still keeps the big page, so each one follows a
limit the page is past.
|
|
cache-about-ttl and cache-snapshot-ttl were never set, cache-index-ttl
only by the way and cache-summary-ttl only elsewhere at 0, so a page
that took the wrong ttl, or a setting that was never read, passed.
|
|
The test looked only for the error and a single status line, so a page
that stopped at the error passed. The empty cache-root proved nothing
either without a page that brokenrc does cache.
|
|
The over-long key was 6000 bytes and the ordinary one about 30, so the
limit could move by kilobytes either way and pass, and the warning went
to /dev/null.
|
|
About ten tests use bigkeyrc and one more uses slotsizerc, and each was
written inside an earlier test, so a --run that left that test out
failed the ones after it.
|
|
The id was written as 40 hex digits, which failed the test in a run
with GIT_TEST_DEFAULT_HASH=sha256.
|
|
The PERL prerequisite comes from NO_PERL in the build options, not from
an interpreter being there, so a host without perl and with the chain
linter off failed these tests instead of skipping them.
|
|
|
|
After the write fails the scan runs a second time, and that run adds
nothing only because scan-tree.c never resets the directories it has
visited. Nothing showed it, so a reset would have listed every
repository twice and passed.
|
|
The listing exposes the urls other visitors asked for, and every
request for it used the shared config, which turns it on.
|
|
No test showed a refresh serving and storing the page as it is now, and
the too-large refill could not tell a fresh render from the expired
copy, since nothing changed in between. A negative page ttl was proven
never to expire only for the scan list.
|
|
MANUAL says such a request serves the expired copy and logs nothing,
and only the case where the lock file cannot be opened was tested.
|
|
With no list the glob stayed unmatched, grep failed on it and the
negated check passed. The meta check had no proof that the summary had
rendered either.
|
|
Piping cgit into cat threw away its exit status, so a crash or
valgrind's 126 could not fail the no-key and negative ttl tests. Under
ulimit -f 0 not even a status file can be written, so that status goes
down the pipe with the page. The negative ttl test also leaned on the
list an earlier test left, and its last check passed on a missing file.
|
|
Nothing showed that the limited write failed at all, so a limit that
did not bite passed, as did a lock file left behind, a doubled prefix
or a page resumed from the wrong offset. The pipe to cat also threw
away cgit's exit status.
|
|
Two identical fresh renders passed the replay test, and the two tests
after it read its output, so a slot cut short was caught only because
tree pages happen to be cached.
|
|
The lock tests leaned on a three second sleep in the filter and gave up
the wait for its marker in silence, so on a slow run the requests need
not overlap at all and every check held trivially. A bare wait also
hid any crash of the first request, and the second request's page was
never looked at. The filter now holds the first request until the test
lets it go.
The strace test gets the same hold, released once the trace shows the
second request has opened the lock file. It checks that the delayed
flock then succeeded, since a refusal would mean the inode check was
never reached.
|
|
Only strict-export and the global filters were ever varied against one
cache-root, so dropping any of the other inputs passed. Leaving out
trust-scan-config is the one that matters most. A list scanned under
it carries the filters pushers set, the list is read back with no trust
check, and a site that does not trust its scans would run them.
|
|
The scan half grepped the page of the request that rebuilt the list,
and that page is drawn from the scan in memory, so the ghost could
never show there. Had the truncate moved out of cache_lock_file, every
later read of the list would have taken in the stale tail and the test
would still have passed.
|
|
Nothing requested a page pinned to an id with the static ttl in force,
so dropping the full id check would cache a page pinned to master or
an abbreviation for ever and the suite would pass.
|
|
The one-slot test threw every response away, so a slot that stopped
comparing keys and served whatever page it held still left one file
and passed. The collision MANUAL promises to log was never checked
either. The size tests also rewrote the shared cgitrc in place, and
the listing replay held only while the dynamic ttl did.
|
|
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.
|
|
"The cache" promises that a negative ttl never expires, but no age was
ever below a negative cache-scan-ttl, so every request started a
background rescan.
|
|
Two cgitrc files sharing a cache-root read one list, so strict-export
and trust-scan-config set in one applied to the other, and a changed
setting stayed stale until the list expired. The first request after
an upgrade scans again, and the files under the old names are never
read.
|
|
|
|
The helpers are named by kind. cgitrc_repo and cgitrc_copy write the
config file named first, and cgit_url, cgit_query and cgit_rc run cgit,
each named after what it is handed first. A repository copies its
defaults from the globals read before its repo.url, so cgitrc_repo
places every setting itself, and a global can no longer land where it
silently stops applying. The t00xx and t01xx files move to them here.
|
|
|
|
A failed truncate or key write returned with the descriptor still open,
so the lock was held while the page rendered uncached and the file was
left behind. It is removed before its last close, as every holder does.
|
|
process_slot logged every failure to lock, so each request that found
its slot being filled left a line, while refresh_slot logged none, so an
expired slot in a directory the server cannot write was served stale for
good without a word. lock_slot now logs the step that failed, as the
scan does, and leaves out only another request at work.
|
|
The slot lock has to be an flock, since an exec filter drops a record
lock when it closes the stdout a fill writes through. The scan only got
by with fcntl because nothing reopens its file while it runs. One kind
of lock lets the two share their code, and on Linux, where the kinds
never see each other, an flock on the scan's file now holds a scan off
like any other.
|
|
Each exec filter and snapshot compressor a fill runs inherited the
slot's lock descriptor beside the stdout it writes into. An flock lasts
until its last copy closes and nothing waits for a process a filter
leaves behind, so a fill killed before its rename could leave the slot
locked, and served stale or uncached, for as long as such a process
lived.
The scan holds its lock across no exec and opens the same way so that
the two stay alike.
|
|
The header's last sentence named two of the many later subjects, so it
goes too. The second request's stderr is still kept, for the lock tests
that come next.
|
|
The library's check also lists whatever was left behind when it fails.
|
|
The slot lock was a POSIX record lock, which a process loses the moment
any descriptor on the file closes, and the fill puts the lock file on
stdout, which every exec filter and snapshot compressor closes with its
dup2. A second request on the slot could then rebuild it under the first
and splice the two pages. An flock holds until the last descriptor goes.
|
|
The slot being filled was forgotten before the page's final flush, so a
write that failed there, on a full disk for one, could not abandon the
fill. cgit died into the lock file instead and the visitor got nothing.
The mid-page path already delivered the page from the lock file.
|
|
The footer lost the time it was generated at, and both runs come from
the same binary, so the two pages have nothing to differ in.
|
|
The dynamic ttl only applied when the url named a branch with h=, so
the log, tree and refs of the default branch, which never carry one,
fell back to cache-summary-ttl. The manual already gives each ttl the
scope the code now uses.
|
|
The dumb transport reads files that already sit on the disk, so a pack
copied into a slot cost that disk twice and the request a second write
of every byte. A snapshot took a slot whatever its size, so a visitor
naming distinct refs and ids could fill the cache root with archives.
cache-max-slot-size, 64 MB unless set, now serves a larger response from
the lock file and drops it, along with any expired copy it would have
replaced.
|
|
|
|
|
|
|
|
|
|
The numbering walks outward from the ground the suite stands on.
- t000x for the git version, html validity and the cache
- t01xx for page content, one script per page
- t02xx for filters, submodule links, dates and limits, which cut
across pages
- t03xx for defence, the security regressions and the $HOME promise
- t04xx for the helper tools under tools/
|