From nobody Sun Nov 22 21:38:30 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 4jXj9y4cLyz70xNN for ; Sun, 22 Nov 2026 21:38:30 +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 4jXj9y3c8hz3FtV for ; Sun, 22 Nov 2026 21:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795383510; 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=tZfgu3d2NQikfnOHO0EkM2FaCQHBdYFGfukAYKB+2h8=; b=vH0+JspiIUbRGWwSDhe+ShpChr9G+Ngp4kNBoiUITcNH8A7xUHxZfx87+XLNblOUdk0tTA WN3RdKSWZuLEYpQ7l1iXuhVUqVbVHIy9VIP2gKRr4QvGFnSNy7WorJJMw0wFTz+r+jVnnV 4ZRcmJAq3TZSRYGIX8uHRkbDuPLbHSza7LdelaKd52QgqXii4/PcW+6dyQd5EIVwVvq+11 BTNCbEImwcRmwHGb0FHJR5DRSGmqqq4rOK53NiUHdEMq4pFCC2xpjxLk2pJMRnCLRSHcEm xlyhXFZTV6ZIjLcveQ7uH/OOFNMqIFA+7cB6k96wF9/lfwzIOleXCBnX62scnA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795383510; b=NViTCFggDH7ONZqgz96fZVhxkPcsoP8a2AGXtR8Szfg7KguPcUyCQRvEZM3ILeIkOw8Lp/ JdhndktYR8CKk68FtW2FWXtHFwLEmS/izP2LkO+NIPFBz3ItHQ18kn9O+idHAJ+tZ3XbQi Pwd2LzHViMS16rwCfJd1uKxUQawvuxxsTXkKC3hfaaU7UpvWWuuxyQEBX1OMNw6X/U1Iy3 dbKfFKJy2RNrj8AyNPM7QjX8n25tYTR9z14jLBQGuLY/y8KdeAdBxVJ77F5sXdwAfwNsgj msnZoYohkUwJmupinipETrT6JlYs6x/4wS/AjhBB9/pV7pRQc9iUfkoGcCw3sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795383510; 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=tZfgu3d2NQikfnOHO0EkM2FaCQHBdYFGfukAYKB+2h8=; b=xEepsMvCIjLcRGoNZUgLNc/XRT+Huak1ouLQJNXc3TZ6+Q09h9f6s3292/vpzb5XRi12jM SkK3Bh/4aouPxv9dBI6lOvKCCYgnTkFy2oKAfhLojOuPoLuakZCSmzdDBDCLlLDZTaq0MN 70FxRbT+jDAjBlcBt/CvHWn7qKFn6CwFdllDOcn/J1lJHPcZz0fubiZRX/5W7j+NPsBBtO bOEjBGI8o6QB5OVEoEGVYYWIZiGcEWTfbVb+7cGd5ZK7bevGid9UXQdiMYC8xvYHVZW4fo iiKMa2z0P5mAXT4M+nXwGWmk+HdiSQ4DNW8quaOBm3gYhCgcoIU2LNp4c3MVZw== 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 4jXj9y3Gr4zLwH for ; Sun, 22 Nov 2026 21:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9cf3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 22 Nov 2026 21:38:30 +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: f616c8f24601 - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: f616c8f246010ce45e5d76e5230f956fd67fce66 Auto-Submitted: auto-generated Date: Sun, 22 Nov 2026 21:38:30 +0000 Message-Id: <6b0360d6.9cf3.4fc259a3@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f616c8f246010ce45e5d76e5230f956fd67fce66 commit f616c8f246010ce45e5d76e5230f956fd67fce66 Author: Igor Ostapenko AuthorDate: 2025-12-26 20:06:56 +0000 Commit: Enji Cooper CommitDate: 2026-11-22 21:36:41 +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 6964c688c6a1..f04b28104bbf 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -150,7 +150,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,