AgeCommit message (Collapse)AuthorLines
Run the file size limit tests without ValgrindBryce Kwon-2/+6
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.
Percent-encode a submodule path in its linkBryce Kwon-0/+18
A module-link template takes the path as the tree names it, so a path holding a space or a byte past ASCII gave an href that broke there. The url is now encoded the way a clone url is.
Add filename* for a download name past ASCIIBryce Kwon-3/+38
The plain, snapshot and blob pages sent a name such as café.txt raw in filename, which a client may read as ISO-8859-1. RFC 6266 has such a name sent again as filename*, percent-encoded in UTF-8, for a client that knows the form, with filename first for one that does not. The extended form carries UTF-8 alone, so a name that is not valid UTF-8 keeps the plain filename by itself.
Percent-encode a clone url in its hrefBryce Kwon-1/+35
An href carried git://example.org/dépôt.git as it was, and the space of "with space" too, neither of which a url may hold. html_url_path would also encode the plus of git+ssh, which breaks the scheme, and the percent of an escape the url was written with, so a whole url gets a helper that encodes only the bytes RFC 3986 allows nowhere.
Keep a space in a repository url in one clone urlBryce Kwon-0/+16
The shared repository "with space" listed git://example.org/with and space.git as two clone urls, and the head linked the first alone. The manual calls clone-url a list of templates, so the list is now split before each template is expanded. A clone-prefix was right already, as the url is joined to it after the split.
Show a full index page for a negative offsetBryce Kwon-0/+18
The query parser takes an offset as low as -1, which the stats page reads as every author, so the index clamps it for itself, as the log and refs pages already do.
Move the root-readme test to the index testsBryce Kwon-12/+12
The test reads the index and the site about page, both drawn by ui-repolist.c. Its site had no repositories, so the index it read was the error page, and a readme printed below the list went unseen. The shared repositories give it a real index.
Test a repository url in UTF-8Bryce Kwon-0/+21
Test a file name in UTF-8Bryce Kwon-0/+39
Test the about path check for each kind of readmeBryce Kwon-38/+40
Three tests exercised the single path check in about_fn, each through one kind of readme, and none through a readme read from the head being browsed.
Test that a background rescan lets the request goBryce Kwon-0/+75
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.
Give the cgit hold-lock runs a time limitBryce Kwon-3/+12
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.
Check a filter never gets the client's stdoutBryce Kwon-12/+17
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.
Let the fd filter find the lock file itselfBryce Kwon-4/+9
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.
Test a cache-max-slot-size of 0 and belowBryce Kwon-0/+19
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.
Test that each page ttl of 0 leaves its page outBryce Kwon-0/+31
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.
Check the broken commit page from start to endBryce Kwon-2/+11
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.
Test the cache key length a slot can takeBryce Kwon-11/+15
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.
Write bigkeyrc and slotsizerc in the setup testBryce Kwon-7/+7
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.
Give the repository open test a config of its ownBryce Kwon-2/+5
It read the config the 404 test had written, so it could not run alone with --run.
Show the missing repository's config does cacheBryce Kwon-2/+9
An empty cache passed just as well when nothing was cached at all.
Show the second scan reads the cached listBryce Kwon-1/+4
A first request that left no list behind made the second scan again, and the test passed just the same.
Test a number left empty in cgitrcBryce Kwon-0/+9
Test a word in a scanned repository's cgitrcBryce Kwon-0/+14
Point the filter script at its SIGPIPE testBryce Kwon-0/+1
The test there fails once the child keeps cgit's ignored SIGPIPE, so a second one here would add nothing.
Describe the whole filter script in its headerBryce Kwon-5/+9
Test the ways a Lua filter can failBryce Kwon-3/+71
A script that failed to load and was carried on with would still fail at filter_open, so the two load tests also check the reason Lua gave.
Test filter commands without a known prefixBryce Kwon-0/+16
Test an exec filter killed by a signalBryce Kwon-0/+15
Check where a Lua filter's loading output landsBryce Kwon-4/+4
The test found the text anywhere on the page, so output that slipped behind the closing tag, as print once did, still passed.
Give each filter test a config of its ownBryce Kwon-18/+10
Five tests read or rewrote a config an earlier test had written, so none of them could run alone with --run.
Render each filter check in its own testBryce Kwon-19/+12
A check read the tmp an earlier test had left, so run alone or after a failed fetch it read a stale page. Each test now asks for its own page through cgit_ok_url, which renders it past the shared cache and fails on a logged error or a page cut short.
Name what the stylesheet and script tests checkBryce Kwon-5/+5
Their titles promised behaviour only a browser shows, while each reads the stylesheet, the script or the tag that loads it.
Check every selector of the monospace ruleBryce Kwon-4/+8
The test found the rule by its first selector and knew pre only by the comma after it, so reordering the list failed it while losing kbd or samp did not.
Test the settings that fill the head and headerBryce Kwon-0/+23
Test the index title and a repository's own nameBryce Kwon-1/+26
Test the settings that change the logoBryce Kwon-5/+33
Set the site title once in the markup testsBryce Kwon-6/+8
Check settings below scan-path miss the scanBryce Kwon-3/+37
Check the manual's contents against its sectionsBryce Kwon-1/+12
Read any module-link path in the sample as one keyBryce Kwon-4/+3
The sample's example passed only because its path holds a slash, which the pattern for plain keys leaves out. A path without one was read as a key of its own and reported as undocumented, and a mimetype extension holding a character outside the pattern would have been dropped.
Describe every check in the docs test headerBryce Kwon-5/+5
Test the clamp on the page offsetBryce Kwon-0/+10
Test the clamp on the diff contextBryce Kwon-0/+20
Tell the whole commit notice from the per file oneBryce Kwon-4/+4
Both open with the same sentence, so a grep for it passed on either.
Check where the oversized file diff links toBryce Kwon-4/+4
The small file test also read the page the test before it left, so it renders the commit itself now.
Count every ref a count of 0 listsBryce Kwon-2/+11
One branch and one tag stood for the whole listing, so a count of 0 that dropped the rest still passed, and -1 is only compared with it.
Match the overflow links on the refs pageBryce Kwon-2/+3
The test read the page the test before it left and looked for the bare path, which other links on the page also hold.
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.