Update devel/kyua to 0.13 from 0.11:

**Released on August 26th, 2016.**

* Fixed execution of test cases as an unprivileged user, at least under
  NetBSD 7.0.  Kyua-level failures were probably a regression introduced
  in Kyua 0.12, but the underlying may have existed for much longer:
  test cases might have previously failed for mysterious reasons when
  running under an unprivileged user.

* Issue #134: Fixed metadata test broken on 32-bit platforms.

* Issue #139: Added per-test case start/end timestamps to all reports.

* Issue #156: Fixed crashes due to the invalid handling of cleanup
  routine data and triggered by the reuse of PIDs in long-running Kyua
  instances.

* Issue #159: Fixed TAP parser to ignore case while matching `TODO` and
  `SKIP` directives, and to also recognize `Skipped`.

* Fixed potential crash due to a race condition in the unprogramming of
  timers to control test deadlines.

The above are the major changes in 0.13.  Note that, however, this commit
upgrades devel/kyua from 0.11 because 0.12 was rolled back.  For details
on the changes that went into 0.12, see the log for r402256.

Reviewed by:	ngie
Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D7642
This commit is contained in:
Julio Merino 2016-08-26 14:58:33 +00:00
parent a03e26e477
commit e54716198e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=420923
4 changed files with 31 additions and 122 deletions

View File

@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= kyua
PORTVERSION= 0.11
PORTREVISION= 1
PORTVERSION= 0.13
PORTEPOCH= 3
CATEGORIES= devel
MASTER_SITES= https://github.com/jmmv/kyua/releases/download/${PORTNAME}-${PORTVERSION}/ \
@ -20,7 +19,7 @@ RUN_DEPENDS:= ${BUILD_DEPENDS}
CONFLICTS= kyua-atf-compat-[0-9]* kyua-cli-[0-9]* kyua-testers-[0-9]*
GNU_CONFIGURE= yes
USES= pkgconfig
USES= lua pkgconfig
TESTS_USER= tests
USERS= ${TESTS_USER}

View File

@ -1,2 +1,3 @@
SHA256 (kyua-0.11.tar.gz) = 2b8b64a458b642df75086eeb73e8073d105b8d9cff04c9b1a905b68bc8502560
SIZE (kyua-0.11.tar.gz) = 611865
TIMESTAMP = 1472222340
SHA256 (kyua-0.13.tar.gz) = db6e5d341d5cf7e49e50aa361243e19087a00ba33742b0855d2685c0b8e721d6
SIZE (kyua-0.13.tar.gz) = 663776

View File

@ -1,87 +0,0 @@
diff --git utils/text/operations.cpp utils/text/operations.cpp
index 736e7f3..5a4345d 100644
--- utils/text/operations.cpp
+++ utils/text/operations.cpp
@@ -38,6 +38,9 @@ namespace text = utils::text;
/// Replaces XML special characters from an input string.
///
+/// The list of XML special characters is specified here:
+/// http://www.w3.org/TR/xml11/#charsets
+///
/// \param in The input to quote.
///
/// \return A quoted string without any XML special characters.
@@ -46,25 +49,34 @@ text::escape_xml(const std::string& in)
{
std::ostringstream quoted;
- const char* delims = "\"&<>'"; // Keep in sync with 'switch' below.
- std::string::size_type start_pos = 0;
- std::string::size_type last_pos = in.find_first_of(delims);
- while (last_pos != std::string::npos) {
- quoted << in.substr(start_pos, last_pos - start_pos);
- switch (in[last_pos]) {
- case '"': quoted << "&quot;"; break;
- case '&': quoted << "&amp;"; break;
- case '<': quoted << "&lt;"; break;
- case '>': quoted << "&gt;"; break;
- case '\'': quoted << "&apos;"; break;
- default: UNREACHABLE;
+ for (std::string::const_iterator it = in.begin();
+ it != in.end(); ++it) {
+ unsigned char c = (unsigned char)*it;
+ if (c == '"') {
+ quoted << "&quot;";
+ } else if (c == '&') {
+ quoted << "&amp;";
+ } else if (c == '<') {
+ quoted << "&lt;";
+ } else if (c == '>') {
+ quoted << "&gt;";
+ } else if (c == '\'') {
+ quoted << "&apos;";
+ } else if ((c >= 0x01 && c <= 0x08) ||
+ (c >= 0x0B && c <= 0x0C) ||
+ (c >= 0x0E && c <= 0x1F) ||
+ (c >= 0x7F && c <= 0x84) ||
+ (c >= 0x86 && c <= 0x9F)) {
+ // for RestrictedChar characters, escape them
+ // as '&amp;#[decimal ASCII value];'
+ // so that in the XML file we will see the escaped
+ // character.
+ quoted << "&amp;#" << static_cast< std::string::size_type >(*it)
+ << ";";
+ } else {
+ quoted << *it;
}
- start_pos = last_pos + 1;
- last_pos = in.find_first_of(delims, start_pos);
}
- if (start_pos < in.length())
- quoted << in.substr(start_pos);
-
return quoted.str();
}
diff --git utils/text/operations_test.cpp utils/text/operations_test.cpp
index 769b7d4..2d5ab36 100644
--- utils/text/operations_test.cpp
+++ utils/text/operations_test.cpp
@@ -77,6 +77,7 @@ ATF_TEST_CASE_BODY(escape_xml__no_escaping)
{
ATF_REQUIRE_EQ("a", text::escape_xml("a"));
ATF_REQUIRE_EQ("Some text!", text::escape_xml("Some text!"));
+ ATF_REQUIRE_EQ("\n\t\r", text::escape_xml("\n\t\r"));
}
@@ -90,6 +91,8 @@ ATF_TEST_CASE_BODY(escape_xml__some_escaping)
ATF_REQUIRE_EQ("&quot;&amp;&lt;&gt;&apos;", text::escape_xml("\"&<>'"));
ATF_REQUIRE_EQ("&amp;&amp;&amp;", text::escape_xml("&&&"));
+ ATF_REQUIRE_EQ("&amp;#8;&amp;#11;", text::escape_xml("\b\v"));
+ ATF_REQUIRE_EQ("\t&amp;#127;BAR&amp;", text::escape_xml("\t\x7f""BAR&"));
}

View File

@ -1,8 +1,5 @@
bin/kyua
etc/kyua/kyua.conf
libexec/kyua-atf-tester
libexec/kyua-plain-tester
libexec/kyua-tap-tester
man/man1/kyua-about.1.gz
man/man1/kyua-config.1.gz
man/man1/kyua-db-exec.1.gz
@ -25,9 +22,10 @@ man/man5/kyuafile.5.gz
%%DATADIR%%/store/migrate_v2_v3.sql
%%DATADIR%%/store/schema_v3.sql
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTING.md
%%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTORS
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
%%PORTDOCS%%%%DOCSDIR%%/NEWS.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Kyuafile.top
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/kyua.conf
%%TEST%%tests/Kyuafile
@ -53,15 +51,22 @@ man/man5/kyuafile.5.gz
%%TEST%%tests/kyua/drivers/report_junit_test
%%TEST%%tests/kyua/drivers/scan_results_test
%%TEST%%tests/kyua/engine/Kyuafile
%%TEST%%tests/kyua/engine/atf_helpers
%%TEST%%tests/kyua/engine/atf_list_test
%%TEST%%tests/kyua/engine/atf_result_test
%%TEST%%tests/kyua/engine/atf_test
%%TEST%%tests/kyua/engine/config_test
%%TEST%%tests/kyua/engine/exceptions_test
%%TEST%%tests/kyua/engine/filters_test
%%TEST%%tests/kyua/engine/kyuafile_test
%%TEST%%tests/kyua/engine/plain_helpers
%%TEST%%tests/kyua/engine/plain_test
%%TEST%%tests/kyua/engine/scanner_test
%%TEST%%tests/kyua/engine/scheduler_test
%%TEST%%tests/kyua/engine/requirements_test
%%TEST%%tests/kyua/engine/runner_test
%%TEST%%tests/kyua/engine/test_case_atf_helpers
%%TEST%%tests/kyua/engine/test_case_plain_helpers
%%TEST%%tests/kyua/engine/testers_test
%%TEST%%tests/kyua/engine/tap_helpers
%%TEST%%tests/kyua/engine/tap_parser_test
%%TEST%%tests/kyua/engine/tap_test
%%TEST%%tests/kyua/examples/Kyuafile
%%TEST%%tests/kyua/examples/syntax_test
%%TEST%%tests/kyua/integration/Kyuafile
@ -80,10 +85,12 @@ man/man5/kyuafile.5.gz
%%TEST%%tests/kyua/integration/helpers/bad_test_program
%%TEST%%tests/kyua/integration/helpers/bogus_test_cases
%%TEST%%tests/kyua/integration/helpers/config
%%TEST%%tests/kyua/integration/helpers/dump_env
%%TEST%%tests/kyua/integration/helpers/expect_all_pass
%%TEST%%tests/kyua/integration/helpers/expect_some_fail
%%TEST%%tests/kyua/integration/helpers/interrupts
%%TEST%%tests/kyua/integration/helpers/metadata
%%TEST%%tests/kyua/integration/helpers/race
%%TEST%%tests/kyua/integration/helpers/simple_all_pass
%%TEST%%tests/kyua/integration/helpers/simple_some_fail
%%TEST%%tests/kyua/model/Kyuafile
@ -113,25 +120,6 @@ man/man5/kyuafile.5.gz
%%TEST%%tests/kyua/store/transaction_test
%%TEST%%tests/kyua/store/write_backend_test
%%TEST%%tests/kyua/store/write_transaction_test
%%TEST%%tests/kyua/testers/Kyuafile
%%TEST%%tests/kyua/testers/atf_helpers
%%TEST%%tests/kyua/testers/atf_inttest
%%TEST%%tests/kyua/testers/atf_list_test
%%TEST%%tests/kyua/testers/atf_result_test
%%TEST%%tests/kyua/testers/cli_test
%%TEST%%tests/kyua/testers/env_test
%%TEST%%tests/kyua/testers/error_test
%%TEST%%tests/kyua/testers/fs_test
%%TEST%%tests/kyua/testers/plain_helpers
%%TEST%%tests/kyua/testers/plain_inttest
%%TEST%%tests/kyua/testers/result_test
%%TEST%%tests/kyua/testers/run_test
%%TEST%%tests/kyua/testers/stacktrace_helper
%%TEST%%tests/kyua/testers/stacktrace_test
%%TEST%%tests/kyua/testers/tap_helpers
%%TEST%%tests/kyua/testers/tap_inttest
%%TEST%%tests/kyua/testers/tap_parser_test
%%TEST%%tests/kyua/testers/text_test
%%TEST%%tests/kyua/utils/Kyuafile
%%TEST%%tests/kyua/utils/auto_array_test
%%TEST%%tests/kyua/utils/cmdline/Kyuafile
@ -157,6 +145,7 @@ man/man5/kyuafile.5.gz
%%TEST%%tests/kyua/utils/format/formatter_test
%%TEST%%tests/kyua/utils/fs/Kyuafile
%%TEST%%tests/kyua/utils/fs/auto_cleaners_test
%%TEST%%tests/kyua/utils/fs/directory_test
%%TEST%%tests/kyua/utils/fs/exceptions_test
%%TEST%%tests/kyua/utils/fs/lua_module_test
%%TEST%%tests/kyua/utils/fs/operations_test
@ -169,28 +158,35 @@ man/man5/kyuafile.5.gz
%%TEST%%tests/kyua/utils/passwd_test
%%TEST%%tests/kyua/utils/process/Kyuafile
%%TEST%%tests/kyua/utils/process/child_test
%%TEST%%tests/kyua/utils/process/deadline_killer_test
%%TEST%%tests/kyua/utils/process/exceptions_test
%%TEST%%tests/kyua/utils/process/executor_test
%%TEST%%tests/kyua/utils/process/fdstream_test
%%TEST%%tests/kyua/utils/process/helpers
%%TEST%%tests/kyua/utils/process/isolation_test
%%TEST%%tests/kyua/utils/process/operations_test
%%TEST%%tests/kyua/utils/process/status_test
%%TEST%%tests/kyua/utils/process/systembuf_test
%%TEST%%tests/kyua/utils/releaser_test
%%TEST%%tests/kyua/utils/sanity_test
%%TEST%%tests/kyua/utils/signals/Kyuafile
%%TEST%%tests/kyua/utils/signals/exceptions_test
%%TEST%%tests/kyua/utils/signals/interrupts_test
%%TEST%%tests/kyua/utils/signals/misc_test
%%TEST%%tests/kyua/utils/signals/programmer_test
%%TEST%%tests/kyua/utils/signals/timer_test
%%TEST%%tests/kyua/utils/sqlite/Kyuafile
%%TEST%%tests/kyua/utils/sqlite/c_gate_test
%%TEST%%tests/kyua/utils/sqlite/database_test
%%TEST%%tests/kyua/utils/sqlite/exceptions_test
%%TEST%%tests/kyua/utils/sqlite/statement_test
%%TEST%%tests/kyua/utils/sqlite/transaction_test
%%TEST%%tests/kyua/utils/stacktrace_helper
%%TEST%%tests/kyua/utils/stacktrace_test
%%TEST%%tests/kyua/utils/stream_test
%%TEST%%tests/kyua/utils/text/Kyuafile
%%TEST%%tests/kyua/utils/text/exceptions_test
%%TEST%%tests/kyua/utils/text/operations_test
%%TEST%%tests/kyua/utils/text/regex_test
%%TEST%%tests/kyua/utils/text/table_test
%%TEST%%tests/kyua/utils/text/templates_test
%%TEST%%tests/kyua/utils/units_test