summaryrefslogtreecommitdiff
path: root/regress/usr.bin
AgeCommit message (Collapse)Author
2022-07-04Add TEST_REGRESS_CACHE_DIR which, if set, is used to cache regress testDarren Tucker
names that have succeeded and skip those on a re-run.
2022-06-26In groff commit 78e66624 on May 7 20:15:33 2021 +1000,Ingo Schwarze
G. Branden Robinson changed the -T ascii rendering of \(sd, the "second" symbol, U+2033 DOUBLE PRIME, from '' to ". Follow suit in mandoc.
2022-06-19Make expected output match reality again.Theo Buehler
2022-06-19Since rtsock.c -r1.329 routes sent via sysctl(2) are now marked RTF_DONE.Theo Buehler
Adjust expected output.
2022-06-08Surprisingly, every escape sequence can also be used as an argumentIngo Schwarze
delimiter for an outer escape sequence, in which case the delimiting escape sequence retains its syntax but usually ignores its argument and loses its inherent effect. Add rudimentary support for this syntax quirk in order to improve parsing compatibility with groff.
2022-06-07Split the excessively generic diagnostic message "invalid escape sequence"Ingo Schwarze
into the more specific messages "invalid escape argument delimiter" and "invalid escape sequence argument".
2022-06-06adjust two desired error messages after roff_escape.c rev. 1.11Ingo Schwarze
improved diagnostics for the \C escape sequence
2022-06-05With the improved escape sequence parser, it becomes easy to also improveIngo Schwarze
diagnostics. Distinguish "incomplete escape sequence", "invalid special character", and "unknown special character" from the generic "invalid escape sequence", also promoting them from WARNING to ERROR because incomplete escape sequences are severe syntax violations and because encountering an invalid or unknown special character makes it likely that part of the document content intended by the authors gets lost.
2022-06-03oops, update forgotten date in the footerIngo Schwarze
2022-06-03During identifier parsing, handle undefined escape sequencesIngo Schwarze
in the same way as groff: * \\ is always reduced to \ * \. is always reduced to . * other undefined escape sequences are usually reduced to the escape name, for example \G to G, except during the expansion of expanding escape sequences having the standard argument form (in particular \* and \n), in which case the backslash is preserved literally. Yes, this is confusing indeed. For example, the following have the same meaning: * .ds \. and .ds . which is not the same as .ds \\. * \*[\.] and \*[.] which is not the same as \*[\\.] * .ds \G and .ds G which is not the same as .ds \\G * \*[\G] and \*[\\G] which is not the same as \*[G] <- sic! To feel less dirty, have a leaning toothpick, if you are so inclined. This patch also slightly improves the string shown by the "escaped character not allowed in a name" error message.
2022-06-03test setenv in both client and server, test first-match-wins tooDamien Miller
2022-05-30Dummy implementation of the roff(7) \V (interpolate environment variable)Ingo Schwarze
escape sequence. This is needed to get \V into the correct parsing class, ESCAPE_EXPAND. It is intentional that mandoc(1) output is *not* influenced by environment variables, so interpolate the name of the variable with some decorating punctuation rather than interpolating its value.
2022-05-20Re-classify the roff(7) \r (reverse line feed) escape sequenceIngo Schwarze
from "ignore" to "unsupported" because when an input file uses it, mandoc(1) is likely to significantly misformat the output, usually showing parts of the output in a different order than the author intended.
2022-05-20Test the handling of some additional one-character escape sequencesIngo Schwarze
that take no argument and are ignored: \% \& \^ \a \d \t \u \{ \| \} No change to parsing or formatting needed.
2022-05-19following the fixed parsing direction of roff_expand() in roff.c rev. 1.260,Ingo Schwarze
some diagnostics now appear in a more reasonable order, too
2022-05-19Adjust a column number in an error messageIngo Schwarze
after the roff_expand() reorganization in roff.c rev. 1.260. The new parsing direction has two effects: 1. Correct output when a line contains more than one expanding escape sequence that has a side effect. 2. Column numbers in diagnostic messages now report the changed column numbers after any expansions left of them have taken place; in the past, column numbers refered to the original input line. Arguably, item 2 was a bit better in its old state, but slightly less helpful diagnostics are a small price to pay for correct output. Besides, when the expansion of user-defined strings or macros is involved, in many cases, mandoc(1) is already unable to report meaningful line and column numbers, so item 2 is not a noteworthy regression. The effort and code complication for fixing that would probably be excessive, in particular since well-written manual pages are not supposed to use such features in the first place.
2022-05-19fix a wrong column number that got fixed as a side effectIngo Schwarze
of the roff_expand() reorganization in roff.c rev. 1.260
2022-05-19remove a bogus warning that went away as a side effectIngo Schwarze
of the roff_expand() reorganization in roff.c rev. 1.260
2022-05-15regress test for in-place transfers and clobbering larger files withDamien Miller
smaller ones; would have caught last regression in scp(1)
2022-05-01Split a new function roff_parse_comment() out of roff_expand() because thisIngo Schwarze
functionality is not needed when called from roff_getarg(). This makes the long and complicated function roff_expand() significantly shorter, and also simpler in so far as it no longer needs to return ROFF_APPEND. No functional change intended.
2022-04-30Provide a new function roff_req_or_macro() to parse and handle a requestIngo Schwarze
or macro, including context-dependent error handling inside tbl(7) code and inside .ce/.rj blocks. Use it both in the top level roff(7) parser and inside conditional blocks. This fixes an assertion failure triggered by ".if 1 .ce" inside tbl(7) code, found by tb@ using afl(1). As a side benefit for readability, only one place remains in the code that calls the main handler functions for the various roff(7) requests. This patch also improves column numbers in some error messages and various comments.
2022-04-28The syntax of the roff(7) .mc request is quite specialIngo Schwarze
and the roff_onearg() parsing function is too generic, so provide a dedicated parsing function instead. This fixes an assertion failure when an \o escape sequence is passed as the argument; the bug was found by tb@ using afl(1). It also makes mandoc output more similar to groff in various cases.
2022-04-28oops, fix wrong .TH nameIngo Schwarze
2022-04-28Element next-line scopes may nest, so man_breakscope() may have toIngo Schwarze
break multiple element next-line scopes at the same time, similar to what man_descope() already does for unconditional rewinding. This fixes an assertion failure that tb@ found with afl(1), caused by .SH .I .I .BI and similar sequences of macros without arguments.
2022-04-27The .AT, .DT, and .UC macros are allowed inside next-line scopeIngo Schwarze
and never produce output at the place of their invocation. Minibugs found while investigating unrelated afl(1) reports from tb@.
2022-04-27Fix three bugs regarding the interaction of \z and \h:Ingo Schwarze
1. The combination \z\h is a no-op whatever the argument may be. In the past, the \z only affected the first space character generated by the \h, which was wrong. 2. For the conbination \zX\h with a positive argument, the first space resulting from the \h is not printed but consumed by the \z. 3. For the combination \zX\h with a negative argument, application of the \z needs to be completed before the \h can be started. In the past, if this combination occurred at the beginning of an output line, the \h backed up to the beginning of the line and after that, the \z attempted to back up even further, triggering an assertion. Bugs found during an audit of assignments to termp->col that i started after the bugfix tbl_term.c rev. 1.65. The assertion triggered by bug 3 was *not* yet found by afl(1).
2022-04-26typo in example text: unsused -> unused; noticed by tb@Ingo Schwarze
2022-04-26At the end of every tbl(7) cell, clear the \z state.Ingo Schwarze
This is needed because the TERMP_MULTICOL mode is designed such that term_tbl() buffers all the cells of the table row before the normal reset logic near the end of term_flushln() can be reached. This fixes an assertion failure triggered by \z near the end of a table cell, found by tb@ using afl(1).
2022-04-26If a node is tagged explicitly, skip implicit tagging for that node.Ingo Schwarze
Apart from making sense in the first place, this fixes an assertion failure that happened when the calculated implicit tag did not match the string value of the first child of the node, Bug found by tb@ using afl(1).
2022-04-24If a .shift request has a negative argument, do not use a negative arrayIngo Schwarze
index but use 0 instead of the argument, just like groff. Warn about the invalid argument. While here, fix the column number in another warning message. Segfault reported by tb@, found with afl(1).
2022-04-22Remove some of the workarounds for the tests by inputing the right numbersOtto Moerbeek
(without impliciit conversion from int to long double). The previous commit message talked about reading numbers, but the issue (loss of precision due to too little digits) actually occurred when printing the input to be read by bc.
2022-04-22arm64 has real IEEE quads, it needs more digits when reading theOtto Moerbeek
bc results otherwise truncation and loss of precision occurs, making the test fail. Test failure on arm64 noted by anton@ and bluhmn@
2022-04-22Only run agent-ptrace.sh if gdb is available as all architectures do notAnton Lindqvist
ship with gdb.
2022-04-21It looks like we can't completely avoid waiting for processes toDarren Tucker
exit so retrieve the pid via controlmaster and use that.
2022-04-20Use ssh -f and ControlPersist to start up test forwards and ssh -O stopDarren Tucker
to shut them down intead of sleep loops. This speeds up the test by an order of magnitude.
2022-04-20Simplify forward-control test. Since we no longer need to support SSH1Darren Tucker
we don't need to run shell commands on the other end of the connection and can use ssh -N instead. This also makes the test less racy.
2022-04-13To prevent infinite recursion while expanding eqn(7) definitions,Ingo Schwarze
we must not reset the recursion counter when moving beyond the end of the *previous* expansion, but we may only do so when moving beyond the rightmost position reached by *any* expansion in the current equation. This matters because definitions can nest; consider: .EQ define inner "content" define outer "inner outer" outer .EN This endless loop was found by tb@ using afl(1). Incidentally, GNU eqn(1) also performs an infinite loop in this situation and then crashes when memory runs out, but that's not an excuse for nasty behaviour of mandoc(1). While here, consistently print the expanded content even when the expansion is finally truncated. While that is not likely to help end-users, it may help authors of eqn(7) code to understand what's going on. Besides, it sends a very clear signal that something is amiss, which was easy to miss in the past unless people enabled -W error or used -T lint.
2022-04-13Do not die on an assertion if an input file contains no sectionIngo Schwarze
whatsoever and ends with a broken next-line scope. Obviously, this cannot happen in a real manual page, but mandoc(1) should not die even when fed absurd input. This bug was independently reported by both jsg@ and tb@ who both found it with afl(1).
2022-04-13Surprisingly, groff supports multiple copy mode escapes at theIngo Schwarze
beginning of an escape sequence: \, \E, \EE, \EEE, and so on all do the same outside copy mode, so let them do the same in mandoc(1), too. This fixes an assertion failure triggered by \EE*X that tb@ found with afl(1). The first E was consumed by roff_expand(), but that function failed to recognize the escape sequence as the expansion of a user-defined string and handed it over to mandoc_escape(), which consumed the second E and then died on an assertion because it is not prepared to handle user-defined strings. Fix this by letting *both* functions handly arbitrary numbers of 'E's correctly.
2022-03-31regression test for sftp cp commandDamien Miller
2022-03-01ci(1) populates the author keyword using getlogin(2), therefore favorAnton Lindqvist
logname(1) when normalizing the output.
2022-02-23Interface index 1 doesn't need to have an lladdr.Martijn van Duren
Found by anton@ who has enc0 on index 1 on his arm64 regress machine. with and OK anton@
2022-02-20Aproximate realpath on the expected output by deduping leading slashes.Darren Tucker
Fixes test failure when user's home dir is / which is possible in some portable configurations.
2022-02-06Add test for empty hostname with port.Darren Tucker
2022-02-05Adapt appstest.sh for the new TLS_ names.Theo Buehler
2022-02-04Add unit tests for hpdelim.Darren Tucker
2022-02-01test 'ssh-keygen -Y find-principals' with wildcard principals;Damien Miller
from Fabian Stelzer
2022-01-21Enable all supported ciphers and macs in the server before tryingDarren Tucker
to benchmark them. Increase the data file size to get more signal.
2022-01-19Mark regress set requests as expected failure now that snmpd(8) doesn'tMartijn van Duren
support set requests anymore. Fix up multi-varbind bulkget requests now that the new application layer returns the correct order. OK jmatthew@
2022-01-13Set LC_ALL in both local and remote shells so that sorted outputDarren Tucker
matches regardless of what the user's shell sets it to. ok djm@