From nobody Tue Dec 24 08:39:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YHSxl4vMsz5Ws6s; Tue, 24 Dec 2024 08:39:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YHSxl4QWKz4Ry3; Tue, 24 Dec 2024 08:39:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735029595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xmvYUp94WhCjLfm1KG8jkMEyOJnKr0LBzLbfsgtVvc=; b=G3bOWjE2po+7Q7WYYzAdQSwbOjgidWdmMunrMBQu9U8w6GxroQzJhAdlW6PSaPPUN/Tm4+ NMQan7q6LEyIfGkYWRUYZ/pV9hPsxgntodewtHXm2TqLmtLntp/OBVyz1Zkhs0eMy2ZmMR jgXVpTwfi2OdPoZTZyK63HU8vkKxxdEHl6r7IBI3fED8onK2lkwrTH02g7c4cg+SJUCB8K x+61QvIY8qr0A6y5rN0br0S96lbORalfSCpx1riVJwXiiaSS4uKdh2D0MDFXlb3qblMYe5 SswBeyUtINmDf4OHWJS6GjBEo66FkhBMimd51R6nlgaEUV1YT51/bZKNEmQNlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735029595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xmvYUp94WhCjLfm1KG8jkMEyOJnKr0LBzLbfsgtVvc=; b=mKheyYrxC8OdeCkA39/+ekJyv5AkOqaZPoeFWELsXug4rC6hX/cU+U7Mjlms8UTwa0KIYu ycHbipY0JPPK+UtPilqDLUocwIat9bwCsDLBoyK1G2PsFCXgKS4DVUCdGZqBXiuArU00H6 7XaF6mCIY8mGJiqY5RAPS6nZNNMtoL1t+isX0bxyY8g8BP7YV6P5itV4P0PqHjPiNujzO1 65B9LslVnuyckqTUsjdIm3fP1i108+A47+1zoGw8etfUmDt2LDLcO5WinVz4xvpsCwPml1 bLQcVuPTnzuB895wSQIyEAj9JFJLf49GiEe73VDKO9E5Gu3cbNyZyzx7+QFzUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735029595; a=rsa-sha256; cv=none; b=GLPLLg1Pjf+3FJEgffQUIaZ8AJWDDjOZHig+w4cFx6lfTjpL+ZWgNYm2rkCNEhKzBLCj+K hbiNqqsv5Wy9JldOzbU+85lMXOwIK8ynPeYKPyUNb7IcU77GXyN8KKj152182flQD/WVBZ qnjmdyDE+59DuNk6LPaR8FnBxSXXlw/GKf7ZhUwyIFM4mEkvufZ1bx/8IhFxwhcPbB4M6u YsE30x+Gm/PdP99aMoPqKdQ/qop76iRIHjg8s3qfygi6nsJDxjK0dtcJLnSbT9bFL8Qh7v XS5K6K6VEl6pMHSGXpaD07vsKM0N/7RlluRIkNnc2UUCaUmsfhlMG4jP+syZyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YHSxl42K5zWxY; Tue, 24 Dec 2024 08:39:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BO8dthU001842; Tue, 24 Dec 2024 08:39:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BO8dtnm001839; Tue, 24 Dec 2024 08:39:55 GMT (envelope-from git) Date: Tue, 24 Dec 2024 08:39:55 GMT Message-Id: <202412240839.4BO8dtnm001839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: 2ed24e28d1d9 - main - kyua: Support is_exclusive metadata coming from an ATF test case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ed24e28d1d95c62cc37ca3534d4d33360b4cef2 Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=2ed24e28d1d95c62cc37ca3534d4d33360b4cef2 commit 2ed24e28d1d95c62cc37ca3534d4d33360b4cef2 Author: Igor Ostapenko AuthorDate: 2024-12-24 08:36:33 +0000 Commit: Igor Ostapenko CommitDate: 2024-12-24 08:36:33 +0000 kyua: Support is_exclusive metadata coming from an ATF test case On ATF side it is named "is.exclusive". Reviewed by: ngie, markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47671 --- contrib/kyua/engine/atf_list.cpp | 2 ++ contrib/kyua/engine/atf_list_test.cpp | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/contrib/kyua/engine/atf_list.cpp b/contrib/kyua/engine/atf_list.cpp index c9c2fed70175..c4f348ada2f6 100644 --- a/contrib/kyua/engine/atf_list.cpp +++ b/contrib/kyua/engine/atf_list.cpp @@ -125,6 +125,8 @@ engine::parse_atf_metadata(const model::properties_map& props) mdbuilder.set_string("execenv", value); } else if (name == "execenv.jail.params") { mdbuilder.set_string("execenv_jail_params", value); + } else if (name == "is.exclusive") { + mdbuilder.set_string("is_exclusive", value); } else if (name == "require.config") { mdbuilder.set_string("required_configs", value); } else if (name == "require.files") { diff --git a/contrib/kyua/engine/atf_list_test.cpp b/contrib/kyua/engine/atf_list_test.cpp index 7f19ca8fbec5..7648ee2c6a80 100644 --- a/contrib/kyua/engine/atf_list_test.cpp +++ b/contrib/kyua/engine/atf_list_test.cpp @@ -64,6 +64,7 @@ ATF_TEST_CASE_BODY(parse_atf_metadata__override_all) model::properties_map properties; properties["descr"] = "Some text"; properties["has.cleanup"] = "true"; + properties["is.exclusive"] = "true"; properties["require.arch"] = "i386 x86_64"; properties["require.config"] = "var1 var2 var3"; properties["require.files"] = "/file1 /dir/file2"; @@ -93,6 +94,7 @@ ATF_TEST_CASE_BODY(parse_atf_metadata__override_all) .add_required_program(fs::path("svn")) .set_description("Some text") .set_has_cleanup(true) + .set_is_exclusive(true) .set_required_memory(units::bytes::parse("1m")) .set_required_user("root") .set_timeout(datetime::delta(123, 0)) @@ -261,6 +263,36 @@ ATF_TEST_CASE_BODY(parse_atf_list__many_test_cases) } +ATF_TEST_CASE_WITHOUT_HEAD(parse_atf_list__is_exclusive_support); +ATF_TEST_CASE_BODY(parse_atf_list__is_exclusive_support) +{ + const std::string text = + "Content-Type: application/X-atf-tp; version=\"1\"\n" + "\n" + "ident: first\n" + "is.exclusive: false\n" + "descr: This is the descr\n" + "\n" + "ident: second\n" + "is.exclusive: true\n" + "\n" + "ident: third\n"; + std::istringstream input(text); + const model::test_cases_map tests = engine::parse_atf_list(input); + + const model::test_cases_map exp_tests = model::test_cases_map_builder() + .add("first", model::metadata_builder() + .set_description("This is the descr") + .build()) + .add("second", model::metadata_builder() + .set_is_exclusive(true) + .build()) + .add("third") + .build(); + ATF_REQUIRE_EQ(exp_tests, tests); +} + + ATF_INIT_TEST_CASES(tcs) { ATF_ADD_TEST_CASE(tcs, parse_atf_metadata__defaults); @@ -275,4 +307,5 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, parse_atf_list__one_test_case_invalid_syntax); ATF_ADD_TEST_CASE(tcs, parse_atf_list__one_test_case_invalid_properties); ATF_ADD_TEST_CASE(tcs, parse_atf_list__many_test_cases); + ATF_ADD_TEST_CASE(tcs, parse_atf_list__is_exclusive_support); }