From nobody Mon Nov 23 01:39:31 2026 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 4jXpX41Rcdz71btR for ; Mon, 23 Nov 2026 01:39:32 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX32Zq8z4lvX for ; Mon, 23 Nov 2026 01:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bW/7ctPsU0nlozSQ1RTsroIOygw7kAMF4vup5L9EELY=; b=QCbvEei/xfi0YG/eXo4mM2BIDwSrIDDvsJtmAaS8AiIWxDi1HFUC/1yezJgOChrkgYEDGc ICUdSvHNvq01iVRUZR8W1wM7xWwMC8jGiAVQGalAEB5hjAGyOeMOw7Fz3EsfcEI5SVprQ+ 9QCwUm1uIuXzJooWBlpVesoyideh6Hpu0TwFt6QMteExxar7OzKjbuT+NuEecnLpRDlMWz 2zWeX+ma4ZsbNQTb3hBjk7VtaUasy8aWX+aHw6Qf1Fbo2vM4D6v4kXXQY1hrTTbHxb5Kyt TsfNr3OsKhbLIQdAM1kWyPkhST1nVYkhXFYU7E/Z+eKjiLntGYlwLhzSfifb8A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397971; b=JWLYKvNkvCwKvldvAmcnyNQgQIEU9rxJR3Jr0vdaJ7+dvyBxKg2cnHbQct2ccD3ILApuaY F7sLJlvY3r09BxeJ54RT3UfLfx7KQFpqpyvJtLyI6ouc/B0CbsQhJtluQMCP9xiENXFDDT /KGFWLO3HFe7p7vm/5xxEgLLanC5x8Mta3+ihUUXVM2/WeLbf2vPYXiaB7tRFXiHwnH1zn /G0hE4yri0pMaoW7aMMwZgwqgdHHuXtoPi/k4G3vyL4owxOpsLC9T48xRCKKpz9ZqESeEj hHMQ6n/JMVIDJItWhKqT8JRnbGNcRtMDVhNS3S375VsDrdn39+S+kaNnRp0MCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bW/7ctPsU0nlozSQ1RTsroIOygw7kAMF4vup5L9EELY=; b=g7/A/lyXPH4VtqB9uwy9qZhTSL3JxBpY8igE0gpuIh6HmNDq4i+DG/Hu0WMJvTuaHKYiD+ NbIhiewVEb9lun+jU/ye+Pv/p8W3apjtGQ80+IyLtVXpL/Nf0zLFYWOzrVWZoe3bdo+QP7 Pck2mDPKsyVvNTGOfGJsCrLaKYpWk4V0tr8iFD5Y3rZyzKnrU/ZYfG6vIDoEclJtmZT57M k4u2xDTh4s4xhju4x3h4Zg56UfDw8Hp9uk5D4NL8ilcKQGonVW3vmtAg3eley4A/smETMi ZOkoqcDH1X3UloS8+dw/Kjd1fcBPSYG7Ts1RL74xp3PBIX8J03y4KSO+NJxwWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX327qVzSk5 for ; Mon, 23 Nov 2026 01:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 5532 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: 5ffb27477ba0 - stable/14 - kyua: Make "debug -p" skip writing stdout/stderr to tmp files List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5ffb27477ba09f4400ee4e3e5784887d139069f1 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:31 +0000 Message-Id: <6b039953.5532.54f83cd2@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5ffb27477ba09f4400ee4e3e5784887d139069f1 commit 5ffb27477ba09f4400ee4e3e5784887d139069f1 Author: Igor Ostapenko AuthorDate: 2025-12-26 20:06:56 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:34:33 +0000 kyua: Make "debug -p" skip writing stdout/stderr to tmp files Reviewed by: kp, ngie Differential Revision: https://reviews.freebsd.org/D54363 (cherry picked from commit 350f319731897f741b516db99636e7ced071dfa4) --- contrib/kyua/cli/cmd_debug.cpp | 6 +++++- contrib/kyua/engine/scheduler.cpp | 20 +++++++++++++++----- contrib/kyua/engine/scheduler.hpp | 6 +++++- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp index 700c4b3ea851..978ccae0fdf1 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -149,7 +149,11 @@ cmd_debug::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, const engine::test_filter filter = engine::test_filter::parse( test_case_name); - auto debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline)); + engine::debugger_ptr debugger = nullptr; + if (cmdline.has_option(pause_before_cleanup_upon_fail_option.long_name()) + || cmdline.has_option(pause_before_cleanup_option.long_name())) { + debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline)); + } const drivers::debug_test::result result = drivers::debug_test::drive( debugger, diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index 4c40bf31046e..a0719ec461ab 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -1283,7 +1283,9 @@ scheduler::exec_handle scheduler::scheduler_handle::spawn_test( const model::test_program_ptr test_program, const std::string& test_case_name, - const config::tree& user_config) + const config::tree& user_config, + const utils::optional& stdout_target, + const utils::optional& stderr_target) { _pimpl->generic.check_interrupt(); @@ -1305,7 +1307,7 @@ scheduler::scheduler_handle::spawn_test( run_test_program(interface, test_program, test_case_name, user_config), test_case.get_metadata().timeout(), - unprivileged_user); + unprivileged_user, stdout_target, stderr_target); const exec_data_ptr data(new test_exec_data( test_program, test_case_name, interface, user_config, handle.pid())); @@ -1563,8 +1565,16 @@ scheduler::scheduler_handle::debug_test( const fs::path& stdout_target, const fs::path& stderr_target) { + optional out = none; + optional err = none; + const model::test_case& test_case = test_program->find(test_case_name); + if (test_case.get_debugger() != nullptr) { + out = stdout_target; + err = stderr_target; + } + const exec_handle exec_handle = spawn_test( - test_program, test_case_name, user_config); + test_program, test_case_name, user_config, out, err); result_handle_ptr result_handle = wait_any(); // TODO(jmmv): We need to do this while the subprocess is alive. This is @@ -1574,12 +1584,12 @@ scheduler::scheduler_handle::debug_test( // Unfortunately, we cannot do so. We cannot just read and block from a // file, waiting for further output to appear... as this only works on pipes // or sockets. We need a better interface for this whole thing. - { + if (test_case.get_debugger() == nullptr) { std::unique_ptr< std::ostream > output = utils::open_ostream( stdout_target); *output << utils::read_file(result_handle->stdout_file()); } - { + if (test_case.get_debugger() == nullptr) { std::unique_ptr< std::ostream > output = utils::open_ostream( stderr_target); *output << utils::read_file(result_handle->stderr_file()); diff --git a/contrib/kyua/engine/scheduler.hpp b/contrib/kyua/engine/scheduler.hpp index ee01c83b4991..508a0c0cbfd9 100644 --- a/contrib/kyua/engine/scheduler.hpp +++ b/contrib/kyua/engine/scheduler.hpp @@ -74,6 +74,8 @@ #include "utils/process/executor_fwd.hpp" #include "utils/process/status_fwd.hpp" +using utils::none; + namespace engine { namespace scheduler { @@ -248,7 +250,9 @@ public: const utils::config::tree&); exec_handle spawn_test(const model::test_program_ptr, const std::string&, - const utils::config::tree&); + const utils::config::tree&, + const utils::optional& = none, + const utils::optional& = none); result_handle_ptr wait_any(void); result_handle_ptr debug_test(const model::test_program_ptr,