AgeCommit message (Collapse)AuthorLines
Share the security tests' repeated setupBryce Kwon-36/+35
Share the robustness tests' repeated setupBryce Kwon-182/+88
The status check now also fails on a second status line, which a page that dies after its headers puts out, so every request is held to one answer rather than the few that counted.
Move the snapshot name tests to the snapshot testsBryce Kwon-23/+29
They take a plain tar, which needs no compressor on the machine.
Move the directory diff caps test to the limitsBryce Kwon-21/+19
Move the odd dates test to the dates testsBryce Kwon-41/+43
The notes test had borrowed its repository, so it now builds one.
Move the Conflicts test to the trailers testsBryce Kwon-25/+20
Its message came from a here-document with a dash, which stripped the tab git knows a Conflicts path by. git then found no trailer block at all, so the test passed with the guard it is about removed. The message is now written with printf.
Give each robustness test a fixture of its ownBryce Kwon-106/+143
repos/rob took commits, refs, tags, a repack and a moved HEAD from test after test, so what a test checked hung on the ones before it. A test that changes a repository, or needs one in a shape of its own, now builds it, and rob is only read. The tests that leaned on a config or a scanned repository an earlier test left build their own too.
Move the mimetype file tests to the plain testsBryce Kwon-22/+23
Each now writes a types file and config of its own rather than rewriting the one the test before it left.
Move the tree grouping test to the tree testsBryce Kwon-17/+22
Grouping folders first is tree page behaviour rather than a security fix, so it joins the tree tests on a repository of its own.
Check the submodule pin against the MakefileBryce Kwon-7/+25
The commit named is the one Git's v2.56.0 tag peels to upstream.
Share the rename fixture of the diff pagesBryce Kwon-31/+25
Each repository is built tree for tree as before. A helper that lost the caller's change would still fail t0107, where following no path shows file-1, but t0108 passed without its added line, so it now looks for that line.
Add a helper for configs of several repositoriesBryce Kwon-49/+32
The configs a run of t0101 writes are byte for byte what they were. The scan configs name no repository and descrc adds one to a copy of the shared config, so those keep their own form.
Say logins need virtual-root to be a pathBryce Kwon-1/+3
Say which test checks the login form hooksBryce Kwon-1/+3
Show the lua filter pass as skipped without LuaBryce Kwon-16/+13
A build without Lua left the eight tests of that pass out of the run, where the rest of the script counts its Lua tests as skipped.
Ask for a missing commit of the hash under testBryce Kwon-3/+2
The id was written as 40 hex digits, which failed the test in a run with GIT_TEST_DEFAULT_HASH=sha256.
Check the reference config changes nothingBryce Kwon-0/+21
Check the manual against the keys cgit acceptsBryce Kwon-0/+35
Report a max-stats value that names no periodBryce Kwon-4/+57
A value cgit does not know as a period turns the statistics page off, so a typo such as "decade" read the same as leaving stats off on purpose. The empty value stays quiet because a cached repolist writes it for a repository that turned stats off.
Pass further release build arguments on to makeBryce Kwon-20/+15
The release build took lua alone, so its binary could not be tested as built, and a Mac without pkg-config could not name LuaJIT for it.
Replace a read-only age file without askingBryce Kwon-1/+1
mv asks before replacing a file it cannot write when stdin is a terminal, and the age hook sends the question to /dev/null. git always gives a hook a pipe, but a hook run by hand from a terminal waited on an answer no one could see and then kept the old date.
Link a file name of stray bytes percent-encodedBryce Kwon-0/+18
No test gave a file name invalid UTF-8 or a control byte, which APFS refuses on disk, so the tree is built through the index.
Ask for gzip where the tag snapshot needs itBryce Kwon-5/+8
The test ran gzip without the GZIP prerequisite t0110 uses for the same need, and it took a file-1 anywhere in the listing rather than under the tag's own prefix.
Keep the robustness tests to portable shellBryce Kwon-5/+5
An unquoted $cgitbin breaks in a checkout whose path holds a space, and head -c and head -1 are not POSIX. The status of the disconnected request is still read right after its pipeline, which assumes the shell waits for the left side as dash, bash, ksh and busybox ash all do.
Hold hand-written refs to the files backendBryce Kwon-16/+20
A loose ref written by hand needs the files backend, so under GIT_TEST_DEFAULT_REF_FORMAT=reftable the broken tree test failed, and the die test after it with it, since it borrowed that clone. It now makes its own. Both index tests that stat a path through refs/heads also passed there with their checks gone, as reftable keeps refs/heads as a file. The commit is rewritten through files rather than a pipeline that hid cat-file failing.
Read the expected blob through its own tagBryce Kwon-5/+7
The expected content was "more" only because an earlier test had rewritten file-1, and the next test reused that file and the tag. The tag.gpgsign override did nothing, since test-lib already keeps the user's config out.
Give the symlink cycle a scan directory of its ownBryce Kwon-3/+11
The expected count of 2 held only because earlier tests had made a.git and b.git and one of them had dropped b.git's cgitrc.
Drop the loose directory chain boundBryce Kwon-13/+0
The count was bounded only from above, and loosely, so a page listing no directories passed, as would a limit of 16. t0104's long directory chain test already pins the bound exactly.
Check the row of a symlink to a large blobBryce Kwon-4/+6
The blob came out of a pipeline whose failure would have left it empty and the test passing, and nothing looked at the row itself. head -c is not POSIX either.
Restore HEAD however the fallback test endsBryce Kwon-10/+7
HEAD was put back inside the && chain after cgit ran, so a failure left repos/rob on a missing branch for every later test. The switcher check also read the page this test left, and now runs in the same test.
Count the answers to a corrupt blob in a diffBryce Kwon-3/+4
Unlike its siblings the test never counted status lines, so a second page after the first went unnoticed. The headers are out by the time the diff is collected, so the one answer stays a 200 holding the error.
Prove the cache keeps what the ttl test refusesBryce Kwon-11/+14
cache_process bypasses a ttl of 0 and fails quietly in many ways, so with a dead cache the test passed whatever ttl the page got. A second config that keeps the same page for ever now has to replay it, from a cache of its own, since slots are keyed on the request alone.
Pair each absence check with what has to be thereBryce Kwon-12/+17
Every page ends in </html>, the 404 for no repositories included, and an index, an error page or a page cut short lacks most things, so the path-less repository, the empty url, the page without an auth filter and the refused id each now show the page that was meant to render.
Expect working pages beside a notes ref at a blobBryce Kwon-10/+7
The loop asserted only absences, so a 404 or any error but the die text passed, and the final 404 is also what a name that resolves to nothing gets.
Follow the link from an outer tag to its inner oneBryce Kwon-4/+6
The test opened the inner tag by id and never looked at the outer tag's page or the link the title is about.
Name what a missing parent really does to the logBryce Kwon-8/+14
The log walks the history before it prints a row, so nothing ahead of the gap ever renders and the title promised more than the page shows. The test also took its gap from the shared repository, where HEAD~2 was a given commit only because of tests run before it.
Make the early-exit filter meet a closed pipeBryce Kwon-7/+10
The email filter was handed a few bytes, which usually sit in the pipe before the filter has even exited, so a cgit that died of SIGPIPE passed most runs. A source filter handed more than a pipe holds has to see the write fail.
Hold the mailmap to max-blob-sizeBryce Kwon-4/+47
git's read_mailmap_blob inflates the whole blob, so a pusher could make every page of a repository read as much as they liked. git reads a note and the .gitmodules file whole as well, and capping those would mean bounding the lookups where the log, commit and tree pages make them, so the manual names them instead. Nothing tested that mailmap.file and mailmap.blob are ignored either.
Test markup in a scanned repository's own wordsBryce Kwon-0/+26
A scanned repository sets its description, owner and section without trust, and no test gave them any markup.
Test blame on a binary fileBryce Kwon-0/+21
t0104's binary fixture never turns blame on, so neither the blame page's own refusal nor the missing link on the file's page had a test.
Test a HEAD aimed outside its repositoryBryce Kwon-0/+18
The defbranch check had a test while its twin for a crafted HEAD, which the index reads the same way to date a repository, had none.
Pin the robots.txt rulesBryce Kwon-0/+13
Nothing in tests/ read robots.txt, so dropping the trailing slashes again went unnoticed.
Feed the Location header every kind of byteBryce Kwon-0/+13
Only a benign query had been redirected, so nothing showed that a space, a control byte or a byte past ASCII in the query string is encoded before it reaches the Location header.
Test the download names a request choosesBryce Kwon-0/+18
The plain page's header was the only one fed a newline. A snapshot asked for with h= keeps the name it was requested under, and a blob fetched by id takes any path, so both put visitor bytes into Content-Disposition.
Check the empty author on every page it reachesBryce Kwon-9/+22
The title claimed every page, but only the log, commit and atom pages were asked for. The commit now changes a file, since the patch page leaves out a commit with nothing to show, and its parent is read before the printf, where a failed rev-parse would have gone unnoticed.
Test the dumb transport allowlist in one tableBryce Kwon-24/+18
The allowlist was tested in two places, and the 404 alone did not show the transport was live behind the auth filter, since a page that does not exist answers the same. A loose object and HEAD now have to come through, and the planted alternates file is removed even when the test fails, where it used to leave rob borrowing foo's objects.
Ask for the two 404 pages with the cache offBryce Kwon-10/+9
Both requests went through the shared page cache, and the clone one only worked because clone pages are never stored, which is what the cgitrc_copy comment warns of.
Check the order of branches at odd objectsBryce Kwon-14/+27
points-at-tree only ever matched its entry in the branch switcher, and points-at-tag was never looked for. Every branch also shared one date, so the age and name sorts gave the same rows, and nothing showed the name setting had applied. The loose refs written by hand need the files backend.
Read the surplus conversions from their own pageBryce Kwon-6/+3
The check read the page the previous test had left, and it took any hex where the commit goes and only two of the eight conversions.
Try every risky scheme in a .gitmodules urlBryce Kwon-12/+29
Only a lowercase javascript url was tried, so a denylist of that one spelling would have passed. The quote test also read the page the test before it had left.