From nobody Sat Jan 25 19:46:59 2025 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 4YgQDg3tVpz5lqGB; Sat, 25 Jan 2025 19:46:59 +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 4YgQDg2pf8z3VB7; Sat, 25 Jan 2025 19:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737834419; 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=KHWsm3KrDMGos0Xf85z5Z130f/rC3mM2D0z0o1WQqeY=; b=W7wrR8atA3sNm9YKvWUfG2lJDzp7pipmfJ864sZOSndHlA7sD4jT3uK1Fe69TdpXtWjhCN 4kMHdzFkuAdT4vBvoKjoZYN6IeWFGF+QMvOHiytJZ78Hq+p89k1nhoELDfv50NddkLk4Cp st1IUN3q5Jw3leeM1mN9UcNiqm/RCw7mEVKOas0SmsmXB/x6fM4kMdbf7479IfJz29GBvb AQFHnrVnmiBmHHRBpfQXMVQDqorbQqX2DNfUHHBq9NJHNlLMxZrz6yY8eUESQRGXuIgN1l VOktjBzRyzmqtY6uZNr/kftpggi4mG9gU3SrWqz6rrB5fqaqSskh/ySHj9PBtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737834419; 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=KHWsm3KrDMGos0Xf85z5Z130f/rC3mM2D0z0o1WQqeY=; b=H6tTh7eEop3VO8IFTl3uHsFxuqNxVXz+yc3u/4trwxH4Pa7OJn4swJlgC5dexGk7d1tihK CH1/zS0HnZ2frLpOBRYbW8w19ixptrpTKO2ZOjkXgZEeJz0PMX0+4kSA9h3pV+Rw4K4I1u VkIxMXExz13Uco9PIBIx6+Fu26Wo0AfHQhJo1h1+YZP/+f0d+8QC66x+VCILG3C/D5py0n PdXKVAuPSBpxCQrO0JXNTaIuuOHm8QwXdbeO1t+59ADfJps2yCeSAv+d3BD9GnJWFaQfTj rLcWltsJHBdhhMbPtdDrWS3gOONcp2yRpy8tJVX25HjsUSTYmdROv8UFwUHzzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737834419; a=rsa-sha256; cv=none; b=n4lE5gVncLWv9ptBDBHKFbXwK5Jy52n83Bp0spWh8Eo+DVsSTqkkm5K7tHZeI8zds0VoVz 9pjOtUjwAmVeTMMRRtlQoBD0CyjS2rF+KReVkTppDFeD4kTlwpj5Q38yUr5vhs4GtDetCK rb/FAfoAZBbBkOcAP68mJ0Y1S6LIejAaV9FaNGCSvygHE6pzM8uGYBYCOgrF9vlFL17MUV JwhMgBhoXkYWMRmU9PAIu+YfcTHamz+OMLTAyO2IjMNBll96AmII3ngDTO4xxzhcAC8vb9 VcS8cCMYzFdXvUJ+Qfa1XPInOPT8t/LoWPOuJFceFpuPw2/aXZgZSM3sF+cJAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YgQDg2M9Kz1PbT; Sat, 25 Jan 2025 19:46:59 +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 50PJkxIL088454; Sat, 25 Jan 2025 19:46:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50PJkxpK088450; Sat, 25 Jan 2025 19:46:59 GMT (envelope-from git) Date: Sat, 25 Jan 2025 19:46:59 GMT Message-Id: <202501251946.50PJkxpK088450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Igor Ostapenko Subject: git: b40ca26721d7 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: b40ca26721d70c76a4a4953ebe90b27daf0b3d58 Auto-Submitted: auto-generated The branch stable/14 has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=b40ca26721d70c76a4a4953ebe90b27daf0b3d58 commit b40ca26721d70c76a4a4953ebe90b27daf0b3d58 Author: Igor Ostapenko AuthorDate: 2024-12-24 08:36:33 +0000 Commit: Igor Ostapenko CommitDate: 2025-01-25 19:42:59 +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 (cherry picked from commit 2ed24e28d1d95c62cc37ca3534d4d33360b4cef2) --- 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); }