From patchwork Fri Oct 11 10:00:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3861 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 11 Oct 2024 12:01:10 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pf1-f186.google.com (mail-pf1-f186.google.com [209.85.210.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49BA18DL008686 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2024 12:01:09 +0200 Received: by mail-pf1-f186.google.com with SMTP id d2e1a72fcca58-71e108cc964sf2094508b3a.3 for ; Fri, 11 Oct 2024 03:01:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728640863; cv=pass; d=google.com; s=arc-20240605; b=jAmtQ1iPelT/RmGUsn+N3VGmpCParf5Uak5T3E0FbMz4VUOSs8qoDBwpgi7Rb1+Y4J bIpqvAijj4rbia82hqVHDOwrX9zf+u2mGlnhecRHBpSBzf974/5Rb+sdBHthPk13+bxs nQBsXgvddUuVX43KDCdsFJ0ugudVgv7eIKqNNlOztrwUH68ijhDx3nTqJY8tpxVpJxBD OiYDJCQAlS7xve8xv+MSOKU792se5wMmXzF7Lln9JtmUiHN2QqjCNk2xdVAWDhcIWLSW kD0Yn7pQEKtS0eldEmWQT1djVCcTSK7rzR3OiWtnI/FmeYkwkkkl/7Lb5u0CC73+PIqB i72Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=zvaPtv5j008YOFOZ99aaBe+7/F22BQuzMUT7LIPvBFM=; fh=I5kzIE4/+fx0TllKw+j/8GvGWx8IzPPf4/k9V0lZqo4=; b=fXwCf/EuxFScaWDMhbtEOc375oQ1UsxuTm7LyhGBufazh2VN5/pMyuYFgGe2nTbVOt H6mgiVGbMTo0PQ//CzxvowDRflzTEU7cTBseqiz5Qv0q/D0Aw1k6BjBVgm2zVApgVD46 D/JmPbB6+kajpAouyOQGnUrkmjmR0MXCUy4oeyYBXuF6z0ZkPKFXFM2TIcXSUgWYauHF +NJwDD9DNCNRgrIWBJGSMiCOJ0Aa0rO9oyO1Ipfx54ukbgppKLUmJlHyJwaDf0KupDBB BKL4vrSjTrXd6zHI0J+tvA3j7jpTbmOO4wajzWnG20+YPvMhw3qGtq3rqA6DUpO0Zpmd OnaA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728640863; x=1729245663; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=zvaPtv5j008YOFOZ99aaBe+7/F22BQuzMUT7LIPvBFM=; b=BIBscG4OaC6v4zSoj5VF8s07TQgPoO8b752RwXmn20sXVU75g/2zm1funCIY9wXIoU Sv3Vtuqf0UGngq9PbWC13ULYbWax32FZ+iySgcbO2CShUinMDASFkDqG/22h/6eXcTew IHsgBVItot36cnWO4Zdlk4aBtpkbjeTQ9iiM/R7c6g9/kPuvO5ju8Nbt2fSu+kJRmJQc 2/92ZRX6uVWH4oS9ME2hSUvRIjiJYQdCB+ROBrxUiYPNJiWJGo5GwvyQXSR5HmjmNVtr 5GamUEUypLnscQou5Tqt/ZSuCVrjCkvU4qi9GhatvgC6MWG6C3dFIlfFBidX3o2XtAo0 Iy+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728640863; x=1729245663; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=zvaPtv5j008YOFOZ99aaBe+7/F22BQuzMUT7LIPvBFM=; b=EKNDMTp7/OEIijQWzeHe20CU0lZ3Bnpyg8KZZaf1fTvqNdp/wCbAJMBCHW2qyC7T1S PefkdwX1atTFiGgw/6IgDUzV3obkOZ57J6wglUJm8ypjs++M7td8xQ0nkMZHEwxR+0/y jyRQYkgkgE6P6Pdj6gHGYUUV4ZZBsVHLeilFXsCvyWU5FPxtcDdHZ1Uu60kg4Ejyfqx6 G5j5042LojjBJorpfMUNPMGLFwxHFmhyBe1UP7EFNhTcDa0HsEycRGLvy1aH1YhgsDrS BNzpy6ZWiJfU/ZV3M0ZHejyh6sw1Ag2fsz6Lv3PFb6YYZSZBDwFMDf8j6JqXEe9CSojc n7XQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWR6j/UH8TEcKQcenIKojTAv0+I2ChfQu5S6dc3zSHT1CdoQxC4kBlzoH6O0cEqSEbbhrN1TCQ=@isar-build.org X-Gm-Message-State: AOJu0Ywc33FuaZ+kw4lS1tapzMcFiGN2F44ijDuv2VXtOBjbTHILmwF7 JihwrG+B9vvdfUQeKGZceu4HfswqB2R2Cr1aLMgxBoH7ykSatBfW X-Google-Smtp-Source: AGHT+IF0/SVU8RhxYhos71BK5H6HkVL66jpZk995b4BTiQP57wV6Hfy8+bn4C9Di22yYuSERM/SrXQ== X-Received: by 2002:a05:6a00:92a6:b0:71d:ebac:c5e with SMTP id d2e1a72fcca58-71e380c3e25mr3527017b3a.25.1728640862874; Fri, 11 Oct 2024 03:01:02 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:ccd:b0:714:24c0:3a4b with SMTP id d2e1a72fcca58-71e270598d7ls1822180b3a.1.-pod-prod-09-us; Fri, 11 Oct 2024 03:01:01 -0700 (PDT) X-Received: by 2002:a05:6a21:1192:b0:1d8:a49b:ee71 with SMTP id adf61e73a8af0-1d8bcf50852mr3157175637.29.1728640861474; Fri, 11 Oct 2024 03:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728640861; cv=none; d=google.com; s=arc-20240605; b=ERGF9VWtO2hWzzS14zAtA2I34LITIVGJcPrJVcZUfvbe4x+O8QXHj+d3mRBDDueUYK Wgxa+FrG1gCSBrA5BU+5ObPxooOHwyYuKcXzKO2JjrEJkRJTkr/Q32zKZIVCkGDl72Lp k7rS3CMkMdVCVuJB5IMt6xhF3dKyEwrKhLPVaVPZ8G7NzPkQKWh02EXEl/gCpskLuXur rhVh85Y/i483gyRtAeyK+xIu1FWQy+CIcFKo9/0imK1jUCtk9pLIP4VB9lPMfyRt9GBn WRluhtUJmtVm/2OSGvI4PWcjtYsCE+8kWgndh3+BJKk3+aTMhJB4iK+NfWniWyOnFSgN JjjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=AYFEroLKHKq1GvznrCw9qWQqx9Xvm9zmd45euIzjARM=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=Z5vh04L7YrzF5hlXi9uBwlFhIIH3mwjUlCpv/yEZGPp6oL9qRDN0ssgnRlsvlAFrgD KpDMNSp+fDpolsfdBUNeqcKWCHBbkcD9qDYsedFAduUmwRqzkQhemoyDDKTjWCn6EW+o ln5tWm7sCcjXfayoeTPto+VD8zKKpB0fHIsyeY/geSXR01YkwZtimCtsujxQ6o8PV9tF /7rGzBgLRjNUI4A3vURwD5HXn3DElynw4Gc8m56dtuzPj2/KeydfLbJu8eoZSLfL0c2d DYaEcFdyLiMvCI8DHyDQyy3NkP/3SmsZpjm06FTex4KB3KaVj8PF/JEEWvgW10g/7+aT KlVQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 41be03b00d2f7-7ea448e38cdsi174267a12.1.2024.10.11.03.01.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2024 03:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49BA0vWI008632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 12:00:58 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v3 1/8] CI: Do not lose output on bitbake / qemu exit Date: Fri, 11 Oct 2024 13:00:43 +0300 Message-Id: <20241011100050.322686-2-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011100050.322686-1-amikan@ilbers.de> References: <20241011100050.322686-1-amikan@ilbers.de> MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= If bitbake or qemu exit before we completely read their stdout/stderr, messages are lost. With this change, we read the subprocess output before terminating ourselves. Signed-off-by: Anton Mikanovich --- testsuite/cibuilder.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py index 4a605f50..0d0de99e 100755 --- a/testsuite/cibuilder.py +++ b/testsuite/cibuilder.py @@ -257,7 +257,7 @@ class CIBuilder(Test): poller = select.poll() poller.register(p1.stdout, select.POLLIN) poller.register(p1.stderr, select.POLLIN) - while p1.poll() is None: + while True: events = poller.poll(1000) for fd, event in events: if event != select.POLLIN: @@ -266,6 +266,8 @@ class CIBuilder(Test): self.log.info(p1.stdout.readline().rstrip()) if fd == p1.stderr.fileno(): app_log.error(p1.stderr.readline().rstrip()) + if p1.poll() is not None: + break p1.wait() if p1.returncode: self.fail("Bitbake failed") @@ -533,7 +535,7 @@ class CIBuilder(Test): databuf = bytearray(b'') databuf_size = 1024 * 2 + len(login_prompt) - while time.time() < timeout and p1.poll() is None: + while time.time() < timeout: events = poller.poll(1000 * (timeout - time.time())) for fd, event in events: if event != select.POLLIN: @@ -547,6 +549,8 @@ class CIBuilder(Test): return 0 if fd == p1.stderr.fileno(): app_log.error(p1.stderr.readline().rstrip()) + if p1.poll() is not None: + break self.log.error("Didn't get login prompt") return 1