From patchwork Thu Nov 30 15:33:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 748500 Delivered-To: patch@linaro.org Received: by 2002:adf:e9c2:0:b0:32d:baff:b0ca with SMTP id l2csp949471wrn; Thu, 30 Nov 2023 07:35:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2nBTBWUid9HbIrOjhhjNjasCqiPGzSFQvc1cdoTqr429sn5wmEcBgaln9Fq8exoZx7yTj X-Received: by 2002:a05:622a:354:b0:421:b909:de9e with SMTP id r20-20020a05622a035400b00421b909de9emr26848279qtw.2.1701358502044; Thu, 30 Nov 2023 07:35:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701358502; cv=none; d=google.com; s=arc-20160816; b=aXra4EDR0BUvkvu7OCR8eWLp2UFUbtg61+k1DC+P/1ryhyrD5AzwKsvfA1x1Lbiopy b8SwydS1Jp3+hu360Ctpbj00roaDzrUaAM+4JUNYsyFni8X0jUbJsTvVAA2tZEfyb9EO OK75vYrxYF6zBKi/L0PyFpLRQW2ghl+b/sxbk77zV22piR/8kRXL9oDeWswNpA6Gu753 vPniio92Rj5V2mIvtjcIA34IqaM4n+C68sBcr9ZGMngY+H/MShg1G0M+eLBpNoEr1HLD dYe5CNYta5TyCVtK/8GjnxUle25UvWWa4428K3rgnfFLpk8LRRqHuWDpXAgPtNEJeuIR kRJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hJMauOfyWGFYkIZAfq/bsS5e9jl1HNaFLiAxTQwxJLQ=; fh=QEL8HPqYwGRdUt3uNuApdxuVe453Kai+Ga5G4X9eCVA=; b=qPYAbymy2mPGeMHhnaCgcH1FPQVFrPgcxej3a6ZHIJw32Si325lV1i/0VKDilYTw/5 qWMrwOq1sZbBCX+nPV7ngBKIn346AL42clKIs/hTL0LLbJof9rYfk4okYcpnIoo25/DK rHIrKdNgHNpqEU+knFhA5DBHYXi3gWySmidAV0PvCcR2nqQ0eRFcUB/DZBXsoAo1t73u QB8iJpoprBslNYVsvieiHwG0C1SZZmhKR4zxyOqMm9J3QEncQsXqTenDLLm4y0svsrjP ZX4pKnYkhBlsZATfSf8JRHdRBt/gwkyJAZnCWAMroe083HQPtKAvlvFdVmpJhEksWuNG BA6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hrwRl8j+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r20-20020ac87ef4000000b00423733fbed8si1173318qtc.520.2023.11.30.07.35.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Nov 2023 07:35:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hrwRl8j+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8j3O-0007g8-Dr; Thu, 30 Nov 2023 10:34:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8j2w-0007XM-Kt for qemu-devel@nongnu.org; Thu, 30 Nov 2023 10:33:49 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8j2n-0004zk-Rp for qemu-devel@nongnu.org; Thu, 30 Nov 2023 10:33:46 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40b31232bf0so9003455e9.1 for ; Thu, 30 Nov 2023 07:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701358414; x=1701963214; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hJMauOfyWGFYkIZAfq/bsS5e9jl1HNaFLiAxTQwxJLQ=; b=hrwRl8j+DADBqe0XuG2jTjWLpAl6dAjPZ9pSaSPQXzlv1U7pcrMz9OOm/qRd7TsnYb Cm2OG5Uk0FDLyhzd7kueQvgJX31IzzejpDUX7BtscetRflMeEjxXl/MxUZZPNJvO4Yyi qm8RhOdcWk2dRX7SV+63NUKrquF/GFyFWgjlfS55d5Rs4cAN8MskB42Jr2FGPK16sDYD g9uWn274tEp5chQHZUHmna5KwICFnGYtS1967moSPuXkwW7k0hXn7oEy1CB4+z5G6KDi mR9bG3Bs1m4gU/xSXdXB4AJxM5ur3u5izT5DJG5s7A1nVCEEgTI5Q6opJAG+2IJ/X1uF mW8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701358414; x=1701963214; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hJMauOfyWGFYkIZAfq/bsS5e9jl1HNaFLiAxTQwxJLQ=; b=kwC1Yz3P7QDsP4YNpnvWg5UuWaCBz1B5WlXa57GzlHbjs5DgOUtM3JKF73QbYkRocq 8dPwLdIqut2g11oc0iNuRX8aYT8wbdPi6p4OVVAeL1uzyHrB+YmE2uKWPBQpEv6iWzjH icbmI/uSf9Im+pTJfn3go4o+iyr8iIthPm5HPbzNostKypzVzzE2C+0pfnbgy/OUpL3H ooRbJJfnVLVPpm522kqyzijtpDEMg7NbM9ejuhWosY3SpnO2GmWRkSTnHEB+y7EiVqsn G6YKiB5sy6kzced6ext5VnMOwa5kXlbLo3liWJZ5c6lqd+Me5GHHvp4cafoDXqau0RIX FuOQ== X-Gm-Message-State: AOJu0YwIFAqUOXWmRRbRM9uANqrDxgh7W+3EDSB9UDigGaYWJoImFuEy HQPczmR/WbRCa+UKs1Bmo2YHmQ== X-Received: by 2002:a05:600c:314f:b0:40b:2a18:f1be with SMTP id h15-20020a05600c314f00b0040b2a18f1bemr15981841wmo.1.1701358414168; Thu, 30 Nov 2023 07:33:34 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id q15-20020adff50f000000b00332eaede976sm1822881wro.86.2023.11.30.07.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 07:33:33 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 869325FB4F; Thu, 30 Nov 2023 15:33:33 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eric Farman , Cleber Rosa , Andrew Jeffery , Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Yoshinori Sato , =?utf-8?q?C=C3=A9dric_Le_Goate?= =?utf-8?q?r?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Eric Auger , qemu-arm@nongnu.org, Peter Maydell , Halil Pasic , Pavel Dovgalyuk , Aurelien Jarno , qemu-s390x@nongnu.org, Beraldo Leal , Joel Stanley , Paolo Bonzini , Christian Borntraeger , Thomas Huth , Luis Machado Subject: [PATCH 1/3] gdbstub: use a better signal when we halt for IO reasons Date: Thu, 30 Nov 2023 15:33:31 +0000 Message-Id: <20231130153333.2424775-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231130153333.2424775-1-alex.bennee@linaro.org> References: <20231130153333.2424775-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The gdb description GDB_SIGNAL_IO is "I/O possible" and by default gdb will try and restart the guest, getting us nowhere. Report GDB_SIGNAL_STOP instead which should at least halt the session at the failure point. Signed-off-by: Alex Bennée Cc: Luis Machado Message-Id: <20231123131905.2640498-1-alex.bennee@linaro.org> --- gdbstub/internals.h | 1 + gdbstub/system.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 465c24b36e..5c0c725e54 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -24,6 +24,7 @@ enum { GDB_SIGNAL_TRAP = 5, GDB_SIGNAL_ABRT = 6, GDB_SIGNAL_ALRM = 14, + GDB_SIGNAL_STOP = 17, GDB_SIGNAL_IO = 23, GDB_SIGNAL_XCPU = 24, GDB_SIGNAL_UNKNOWN = 143 diff --git a/gdbstub/system.c b/gdbstub/system.c index 783ac140b9..83fd452800 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -183,7 +183,7 @@ static void gdb_vm_state_change(void *opaque, bool running, RunState state) break; case RUN_STATE_IO_ERROR: trace_gdbstub_hit_io_error(); - ret = GDB_SIGNAL_IO; + ret = GDB_SIGNAL_STOP; break; case RUN_STATE_WATCHDOG: trace_gdbstub_hit_watchdog(); From patchwork Thu Nov 30 15:33:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 748501 Delivered-To: patch@linaro.org Received: by 2002:adf:e9c2:0:b0:32d:baff:b0ca with SMTP id l2csp949486wrn; Thu, 30 Nov 2023 07:35:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZC7snZrygCcX2TjTHmy390tSpvh5U5y0yoHuSiu62wXoUOPSxcQt2QlRR8aK97+RcjJGZ X-Received: by 2002:a05:6808:15a3:b0:3b8:94c0:87fb with SMTP id t35-20020a05680815a300b003b894c087fbmr6090704oiw.9.1701358503521; Thu, 30 Nov 2023 07:35:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701358503; cv=none; d=google.com; s=arc-20160816; b=HVTVKh0cUPaer/6oY6ngTjaB99F13SltMJbT1kkliNBTtldGpvl2fylgOvvBHZfHsD JnVDbwbx8shL29RWXRvaPbyF+IKhLOzzfDU3DiWKFE8y83uRNtAvb7mjrn0SQU24rWbI w2rkf/SHq2FN6XrrG4JzXND7E5fYKgQQxBs070pEA1GVvDoUlopkRc9zle3uxF+s2Ak/ R+/EyEnozJ8EG39R6sIDGeG/EoZCsI9rQMrFcesmJH3ibo4s7JPGeBhfa+Vuia9Kd4pI 1DCnvwgNi4eUKnB5kQ68npUlY0yw3o4+XrV0VOMtRJOhg2mvO12+m7s8Xxj2tI0j889o HXnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZMeb0tBnatEvBTJqXNxVm5pFCTwTbhrcJJGUqWC9Se4=; fh=WE7zcanopleXfv2pHbLjdYGuHYOR3+oZ0chJ5Ujh3Ak=; b=A8TB/cn5dpXPTwNFtEHfFNjZuUskMuFNL4HnfvlCqujcYzSc23QTfht/l6QEO8oTqu MNulPQos7UPUr/mQO5i+sgwLenltS3lNjZthGSC0P2+iFnYi/D3XleqmF6wRZPzYoCyx 2wrAtEOynbZ2FeAGYeHDFCJBxk2F8Uyha4EVkJ6xmoDW2lPXh2TfJi3mtSPqo9aP0GxW nM22wnOAH4P9tfOEsaOT21HwVKa4rF/uqiBrA987UquwN7g3TlOdIHcWxI/hPu1xDSAo lYkeUXccPNR+FVbKVoS1VrLpSlONCcDpsScepHixjkvdRwaBnzKmfrHx4++102Vjae/f +lIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WPDn77gf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dt4-20020a05620a478400b0077d98a59b2csi1215275qkb.445.2023.11.30.07.35.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Nov 2023 07:35:03 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WPDn77gf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8j3S-0007sd-0Z; Thu, 30 Nov 2023 10:34:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8j31-0007Xm-QZ for qemu-devel@nongnu.org; Thu, 30 Nov 2023 10:33:56 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8j2o-00050T-9x for qemu-devel@nongnu.org; Thu, 30 Nov 2023 10:33:51 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40b595bf5d2so6483515e9.2 for ; Thu, 30 Nov 2023 07:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701358416; x=1701963216; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZMeb0tBnatEvBTJqXNxVm5pFCTwTbhrcJJGUqWC9Se4=; b=WPDn77gf9My1nWwSXCOGqKf7pYsod50DnCQ0rrrwxYExQuXNsF77siGStSVDJAQ27l XIT8J9meIiGTE6UAcV5DJOPCWV19hbVd1lTFwOtwVt8SYjGC7ynuRpT63gU+diP5djWb ZZvYx4y3iZdGBvkRnyPEWPWr0nS/Ak0xQQw3fsBmIzSzPfCjFbCfyi+GanNc6XwD7zkg duy4Vbks6wL7MHdqSyt5plxSdMIBalMAfvKT5YcrSB42ZZvZZH5KXqoFxqZjyW7OgqUc MVYcG4K9P6wmPco9EWNBcK4TOOSv7CjfGJyEPok9nIEQH/P+Bg2bKGW8i5b07IKuIEZr BTaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701358416; x=1701963216; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZMeb0tBnatEvBTJqXNxVm5pFCTwTbhrcJJGUqWC9Se4=; b=w7cRn/uX32hRU5Gf+luzsftNJYsJlupYBi7VhDfvvrcQ7y1SVJScSP8piJABoDETcg EEPPN5KnaX3S0PAn90A3UTmyd56y8fV6n5uZD1sCfFH2mOKr5MzTsCNnIW/9Wbxbr7y9 R0POwNv89l0yZ45jWtvgSKAHM0i8Oo5KajXJKGLDR4T4yldDQnl0gHTsbCeEi50URGSU Kk793jbvp4TrQ6dSBCU57Zai8dQsjAmVB1ha6xOWD2ipNxvEGVZWT5O8k/ebEGswe/0k IWhXwQBEyDrTV++du42UtoJKm7mZnEjDt/G/Vwecg+C4Uxi/5B/UswXqcchkbpPJlZ+A nUXg== X-Gm-Message-State: AOJu0Yx8zR9bFHzY80TUNcIu/alf0R2fbZmK5z9Zt0J9WE+JM/FPgHbF ip94eaMLypMDfprthvkZYck57A== X-Received: by 2002:a05:600c:1384:b0:40b:2a85:d7ae with SMTP id u4-20020a05600c138400b0040b2a85d7aemr16788813wmf.16.1701358416401; Thu, 30 Nov 2023 07:33:36 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id r21-20020a05600c35d500b0040b3e79bad3sm2359089wmq.40.2023.11.30.07.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 07:33:34 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A97CF5FB51; Thu, 30 Nov 2023 15:33:33 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eric Farman , Cleber Rosa , Andrew Jeffery , Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Yoshinori Sato , =?utf-8?q?C=C3=A9dric_Le_Goate?= =?utf-8?q?r?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Eric Auger , qemu-arm@nongnu.org, Peter Maydell , Halil Pasic , Pavel Dovgalyuk , Aurelien Jarno , qemu-s390x@nongnu.org, Beraldo Leal , Joel Stanley , Paolo Bonzini , Christian Borntraeger , Thomas Huth Subject: [PATCH 2/3] docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS Date: Thu, 30 Nov 2023 15:33:32 +0000 Message-Id: <20231130153333.2424775-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231130153333.2424775-1-alex.bennee@linaro.org> References: <20231130153333.2424775-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org It doesn't make sense to have two classes of flaky tests. While it may take the constrained environment of CI to trigger failures easily it doesn't mean they don't occasionally happen on developer machines. As CI is the gating factor to passing there is no point developers running the tests locally anyway unless they are trying to fix things. While we are at it update the language in the docs to discourage the QEMU_TEST_FLAKY_TESTS becoming a permanent solution. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- docs/devel/testing.rst | 31 +++++++++++++++--------- tests/avocado/boot_linux.py | 8 +++--- tests/avocado/boot_linux_console.py | 5 ++-- tests/avocado/intel_iommu.py | 5 ++-- tests/avocado/linux_initrd.py | 5 ++-- tests/avocado/machine_aspeed.py | 8 +++--- tests/avocado/machine_mips_malta.py | 8 +++--- tests/avocado/machine_rx_gdbsim.py | 8 +++--- tests/avocado/machine_s390_ccw_virtio.py | 2 +- tests/avocado/replay_kernel.py | 5 ++-- tests/avocado/reverse_debugging.py | 14 +++++++---- tests/avocado/smmu.py | 5 ++-- tests/avocado/tuxrun_baselines.py | 4 +-- 13 files changed, 67 insertions(+), 41 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 22218dbedb..579d1837e0 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -1371,23 +1371,32 @@ conditions. For example, tests that take longer to execute when QEMU is compiled with debug flags. Therefore, the ``AVOCADO_TIMEOUT_EXPECTED`` variable has been used to determine whether those tests should run or not. -GITLAB_CI -^^^^^^^^^ -A number of tests are flagged to not run on the GitLab CI. Usually because -they proved to the flaky or there are constraints on the CI environment which -would make them fail. If you encounter a similar situation then use that -variable as shown on the code snippet below to skip the test: +QEMU_TEST_FLAKY_TESTS +^^^^^^^^^^^^^^^^^^^^^ +Some tests are not working reliably and thus are disabled by default. +This includes tests that don't run reliably on GitLab's CI which +usually expose real issues that are rarely seen on developer machines +due to the constraints of the CI environment. If you encounter a +similar situation then mark the test as shown on the code snippet +below: .. code:: - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') def test(self): do_something() -QEMU_TEST_FLAKY_TESTS -^^^^^^^^^^^^^^^^^^^^^ -Some tests are not working reliably and thus are disabled by default. -Set this environment variable to enable them. +Tests should not live in this state forever and should either be fixed +or eventually removed. If you move a test into this category please +consider raising a bug to track progress towards a fix. + +To run such tests locally you will need to set the environment +variable. For example: + +.. code:: + + env QEMU_TEST_FLAKY_TESTS=1 ./pyvenv/bin/avocado run \ + tests/avocado/boot_linux.py:BootLinuxPPC64.test_pseries_tcg Uninstalling Avocado ~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index be30dcbd58..9e9773e6e1 100644 --- a/tests/avocado/boot_linux.py +++ b/tests/avocado/boot_linux.py @@ -12,7 +12,7 @@ from avocado_qemu import LinuxTest, BUILD_DIR -from avocado import skipIf +from avocado import skipUnless class BootLinuxX8664(LinuxTest): @@ -93,7 +93,8 @@ class BootLinuxPPC64(LinuxTest): timeout = 360 - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_pseries_tcg(self): """ :avocado: tags=machine:pseries @@ -111,7 +112,8 @@ class BootLinuxS390X(LinuxTest): timeout = 240 - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_s390_ccw_virtio_tcg(self): """ :avocado: tags=machine:s390-ccw-virtio diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 6eab515718..231b4f68e5 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -15,7 +15,7 @@ from avocado import skip from avocado import skipUnless -from avocado import skipIf +from avocado import skipUnless from avocado_qemu import QemuSystemTest from avocado_qemu import exec_command from avocado_qemu import exec_command_and_wait_for_pattern @@ -1419,7 +1419,8 @@ def test_ppc_mac99(self): # This test has a 6-10% failure rate on various hosts that look # like issues with a buggy kernel. As a result we don't want it # gating releases on Gitlab. - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_sh4_r2d(self): """ :avocado: tags=arch:sh4 diff --git a/tests/avocado/intel_iommu.py b/tests/avocado/intel_iommu.py index 77635ab56c..2dd11a6346 100644 --- a/tests/avocado/intel_iommu.py +++ b/tests/avocado/intel_iommu.py @@ -9,10 +9,11 @@ # later. See the COPYING file in the top-level directory. import os -from avocado import skipIf +from avocado import skipUnless from avocado_qemu import LinuxTest -@skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') +@skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + class IntelIOMMU(LinuxTest): """ :avocado: tags=arch:x86_64 diff --git a/tests/avocado/linux_initrd.py b/tests/avocado/linux_initrd.py index ba02e5a563..c40a987bd1 100644 --- a/tests/avocado/linux_initrd.py +++ b/tests/avocado/linux_initrd.py @@ -13,7 +13,7 @@ import tempfile from avocado_qemu import QemuSystemTest -from avocado import skipIf +from avocado import skipUnless class LinuxInitrd(QemuSystemTest): @@ -53,7 +53,8 @@ def test_with_2gib_file_should_exit_error_msg_with_linux_v3_6(self): max_size + 1) self.assertRegex(self.vm.get_log(), expected_msg) - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_with_2gib_file_should_work_with_linux_v4_16(self): """ QEMU has supported up to 4 GiB initrd for recent kernel diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index df31b2a8a8..258fb50c47 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -18,7 +18,7 @@ from avocado_qemu import interrupt_interactive_console_until_pattern from avocado_qemu import has_cmd from avocado.utils import archive -from avocado import skipIf +from avocado import skipUnless from avocado import skipUnless @@ -311,7 +311,8 @@ def do_test_arm_aspeed_sdk_start(self, image): self, 'boot', '## Loading kernel from FIT Image') self.wait_for_console_pattern('Starting kernel ...') - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_arm_ast2500_evb_sdk(self): """ :avocado: tags=arch:arm @@ -329,7 +330,8 @@ def test_arm_ast2500_evb_sdk(self): self.workdir + '/ast2500-default/image-bmc') self.wait_for_console_pattern('nodistro.0 ast2500-default ttyS4') - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_arm_ast2600_evb_sdk(self): """ :avocado: tags=arch:arm diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mips_malta.py index 9bd54518bf..959dcf5602 100644 --- a/tests/avocado/machine_mips_malta.py +++ b/tests/avocado/machine_mips_malta.py @@ -11,7 +11,7 @@ import gzip import logging -from avocado import skipIf +from avocado import skipUnless from avocado import skipUnless from avocado.utils import archive from avocado_qemu import QemuSystemTest @@ -101,7 +101,8 @@ def test_mips_malta_i6400_framebuffer_logo_1core(self): """ self.do_test_i6400_framebuffer_logo(1) - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_mips_malta_i6400_framebuffer_logo_7cores(self): """ :avocado: tags=arch:mips64el @@ -111,7 +112,8 @@ def test_mips_malta_i6400_framebuffer_logo_7cores(self): """ self.do_test_i6400_framebuffer_logo(7) - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_mips_malta_i6400_framebuffer_logo_8cores(self): """ :avocado: tags=arch:mips64el diff --git a/tests/avocado/machine_rx_gdbsim.py b/tests/avocado/machine_rx_gdbsim.py index 6cd8704b01..350a73fbbb 100644 --- a/tests/avocado/machine_rx_gdbsim.py +++ b/tests/avocado/machine_rx_gdbsim.py @@ -10,7 +10,7 @@ import os -from avocado import skipIf +from avocado import skipUnless from avocado_qemu import QemuSystemTest from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern @@ -22,7 +22,8 @@ class RxGdbSimMachine(QemuSystemTest): timeout = 30 KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_uboot(self): """ U-Boot and checks that the console is operational. @@ -46,7 +47,8 @@ def test_uboot(self): # FIXME limit baudrate on chardev, else we type too fast #exec_command_and_wait_for_pattern(self, 'version', gcc_version) - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_linux_sash(self): """ Boots a Linux kernel and checks that the console is operational. diff --git a/tests/avocado/machine_s390_ccw_virtio.py b/tests/avocado/machine_s390_ccw_virtio.py index ffd914ded9..61e75d8f9e 100644 --- a/tests/avocado/machine_s390_ccw_virtio.py +++ b/tests/avocado/machine_s390_ccw_virtio.py @@ -12,7 +12,7 @@ import os import tempfile -from avocado import skipIf +from avocado import skipUnless from avocado_qemu import QemuSystemTest from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py index 53cb7e5091..a60f1d1e54 100644 --- a/tests/avocado/replay_kernel.py +++ b/tests/avocado/replay_kernel.py @@ -15,7 +15,7 @@ import time from avocado import skip -from avocado import skipIf +from avocado import skipUnless from avocado import skipUnless from avocado_qemu import wait_for_console_pattern from avocado.utils import archive @@ -179,7 +179,8 @@ def test_arm_virt(self): self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1) - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_arm_cubieboard_initrd(self): """ :avocado: tags=arch:arm diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py index ed04e92bb4..9a468321e5 100644 --- a/tests/avocado/reverse_debugging.py +++ b/tests/avocado/reverse_debugging.py @@ -10,7 +10,7 @@ import os import logging -from avocado import skipIf +from avocado import skipUnless from avocado_qemu import BUILD_DIR from avocado.utils import datadrainer from avocado.utils import gdb @@ -206,7 +206,8 @@ def get_pc(self, g): + self.get_reg_le(g, self.REG_CS) * 0x10 # unidentified gitlab timeout problem - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_x86_64_pc(self): """ :avocado: tags=arch:x86_64 @@ -223,7 +224,8 @@ class ReverseDebugging_AArch64(ReverseDebugging): REG_PC = 32 # unidentified gitlab timeout problem - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_aarch64_virt(self): """ :avocado: tags=arch:aarch64 @@ -247,7 +249,8 @@ class ReverseDebugging_ppc64(ReverseDebugging): REG_PC = 0x40 # unidentified gitlab timeout problem - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_ppc64_pseries(self): """ :avocado: tags=arch:ppc64 @@ -260,7 +263,8 @@ def test_ppc64_pseries(self): self.reverse_debugging() # See https://gitlab.com/qemu-project/qemu/-/issues/1992 - @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + def test_ppc64_powernv(self): """ :avocado: tags=arch:ppc64 diff --git a/tests/avocado/smmu.py b/tests/avocado/smmu.py index b3c4de6bf4..05b34418a5 100644 --- a/tests/avocado/smmu.py +++ b/tests/avocado/smmu.py @@ -9,10 +9,11 @@ # later. See the COPYING file in the top-level directory. import os -from avocado import skipIf +from avocado import skipUnless from avocado_qemu import LinuxTest, BUILD_DIR -@skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') +@skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') + class SMMU(LinuxTest): """ :avocado: tags=accel:kvm diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py index c99bea6c0b..5f859f4e6f 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -13,7 +13,7 @@ import time import tempfile -from avocado import skip, skipIf +from avocado import skip, skipUnless from avocado_qemu import QemuSystemTest from avocado_qemu import exec_command, exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern @@ -551,7 +551,7 @@ def test_s390(self): haltmsg="Requesting system halt") # Note: some segfaults caused by unaligned userspace access - @skipIf(os.getenv('GITLAB_CI'), 'Skipping unstable test on GitLab') + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') def test_sh4(self): """ :avocado: tags=arch:sh4 From patchwork Thu Nov 30 15:33:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 748502 Delivered-To: patch@linaro.org Received: by 2002:adf:e9c2:0:b0:32d:baff:b0ca with SMTP id l2csp949778wrn; Thu, 30 Nov 2023 07:35:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGoi2iTvRhyNioriHRQPn4qHKJWA7/xZ2bxvYQ6jl3kjaG8wkECWGekimAKzvIYOzSuiVPr X-Received: by 2002:a0c:fed0:0:b0:67a:8f8c:885c with SMTP id z16-20020a0cfed0000000b0067a8f8c885cmr600860qvs.56.1701358531909; Thu, 30 Nov 2023 07:35:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701358531; cv=none; d=google.com; s=arc-20160816; b=fQ1d5mKTiCD9/HNrbYkrI+maZV8lNnTmfk7AFSrZFjG4fYSRny2bSYcmstf6jKMvjw aM8V81Krjce9LER0/gKnFTQa6YP6Wlr2yehl7gqPHCrFN89SXCoMbOYjxf2bLJOQHvjd 9Bf6VVmJWnKV+lbNrFfDrArooGUD4s24ScvlJYHaaT9qkiiCjdIxGg4K0YsdO4a6u4i5 zXODJFxyFnfQumqVP84ps+k4hpZV3OrOhErx7/ugFql0DEQju1wA8l6FvB4yyQZdaNiF JoF4YcYdkjWVk7LlfBHu7T1ep7j8rk9gkNbysdlfM8uxIu2gzW4Fonq9K4XWaki3mxrQ 6sHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=va2lSDWI9LZkjDO8/ReZ5EaNyJuoW3LqNMRgLhq6Y3U=; fh=WE7zcanopleXfv2pHbLjdYGuHYOR3+oZ0chJ5Ujh3Ak=; b=SKtNfQ61oDNLMl7kOu4JECMAm/fZNFsEaAJyyoBKsiyXOH/EMUW6+xbzFY2og+smbW G7/HJrv3nUcO59IE9SnXooPL66a+zXXMkAODwANCDA/ZltMmb0+IKaSqZxhLP1cl62dh BbNeE7XVsZKFY5XQrwVPJQ17YgoeSRq9CoEJqcJNMMe+Da1dm8biQRfIISpv3Nnl4yKU y0kGCgI00kLyKMGHDGjJFVA99vrFN2CbmK9f/fTFKLGtU8EQQIlk/8APYGrcUwFrGBjC MVFzdE8liE1uXSzuQPbmODbTyXNPfq81MnEcVn7wkdcRVB+NFvRZU7rMSF//bmyB0cWU pmXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yOPiNpL4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ov6-20020a05620a628600b0077d716dd357si1245778qkn.590.2023.11.30.07.35.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Nov 2023 07:35:31 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yOPiNpL4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8j3D-0007b8-TG; Thu, 30 Nov 2023 10:34:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8j2t-0007Vp-Ob for qemu-devel@nongnu.org; Thu, 30 Nov 2023 10:33:44 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8j2n-0004zx-Rl for qemu-devel@nongnu.org; Thu, 30 Nov 2023 10:33:40 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40b30308c67so9165775e9.0 for ; Thu, 30 Nov 2023 07:33:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701358415; x=1701963215; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=va2lSDWI9LZkjDO8/ReZ5EaNyJuoW3LqNMRgLhq6Y3U=; b=yOPiNpL4TrcP5O16BAhsTABYX7MURldz6kn4k2iGGCbzNKTpa3sstvHmU8v4FaP+eL Nv3R9tBMGg5v5kMyK7/d/B0A4xJSt/J+iITCu2elQmKJvC80W42cgAfJYnvf8WXLoZUE LIiNM3AJGL2apFuM4izyjkYbwdXMxJbPsP7+tfdAnYwr1PnRvjVLyS442F9zlwrpVNf9 96pz6HFLWCBZb96kIWf5FqfPqzRaX3ikQXZfzDSqz6FvGhYckpjJ+iHXZdyQm+hy6RpL IRRpgrPDtpMyrJxxBsugFuQBedRxgKSIheeGqdW8gdgvnM/vepPlkoLwt5rPSyPpWBcM b7hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701358415; x=1701963215; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=va2lSDWI9LZkjDO8/ReZ5EaNyJuoW3LqNMRgLhq6Y3U=; b=MHWAHweDQiMeW4uQA5GbxOi/DPO4W2gWd3EL44UZHbie3VisS7HJWLAQrPXAbNpYUQ aCfJqsVzMbwbayfkp9ONYN1yV3+TsOK4vEyQ3TjmkSb9vdnKOdRG3MYyxWUQ7bJ+wi5j Lvzy3KXrUQh1rw7Y8zmn+vb18rz1hD7MHmTa1rCWb/7/s2thtC3YMTzwFGCAUEmReZ8n wdtc+ESPDTh2lNYlqpPBl8Kv00AQCU/Gr5zDA/mKmOMzw5VFo+PGZ/33+hR32RsmHp6m FgeFuQRCz+wefZuX/WzgBrNDbWbWJqUPznoXDaomsA+88CeFvuCKkHcBu6V9smVAfuKO K3lQ== X-Gm-Message-State: AOJu0YzVrY3YmK9ivP6N3K5BwWpPvIYhMgCdp0OnemAB0p43tg7rcsvw KyBMv1La8/ose7p5DjObrOuf9w== X-Received: by 2002:adf:da45:0:b0:333:d38:9cf8 with SMTP id r5-20020adfda45000000b003330d389cf8mr6268560wrl.23.1701358414648; Thu, 30 Nov 2023 07:33:34 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id e12-20020adfe38c000000b00332fd9b2b52sm1829283wrm.104.2023.11.30.07.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 07:33:34 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D11295FB53; Thu, 30 Nov 2023 15:33:33 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eric Farman , Cleber Rosa , Andrew Jeffery , Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Yoshinori Sato , =?utf-8?q?C=C3=A9dric_Le_Goate?= =?utf-8?q?r?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Eric Auger , qemu-arm@nongnu.org, Peter Maydell , Halil Pasic , Pavel Dovgalyuk , Aurelien Jarno , qemu-s390x@nongnu.org, Beraldo Leal , Joel Stanley , Paolo Bonzini , Christian Borntraeger , Thomas Huth Subject: [PATCH 3/3] gitlab: add optional job to run flaky avocado tests Date: Thu, 30 Nov 2023 15:33:33 +0000 Message-Id: <20231130153333.2424775-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231130153333.2424775-1-alex.bennee@linaro.org> References: <20231130153333.2424775-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org One problem with flaky tests is they often only fail under CI conditions which makes it hard to debug. We add an optional allow_fail job so developers can trigger the only the flaky tests in the CI environment if they are debugging. Signed-off-by: Alex Bennée --- docs/devel/testing.rst | 15 ++++++------ .gitlab-ci.d/buildtest.yml | 30 ++++++++++++++++++++++++ tests/avocado/boot_linux.py | 2 ++ tests/avocado/boot_linux_console.py | 1 + tests/avocado/intel_iommu.py | 1 + tests/avocado/linux_initrd.py | 2 ++ tests/avocado/machine_aspeed.py | 2 ++ tests/avocado/machine_mips_malta.py | 2 ++ tests/avocado/machine_rx_gdbsim.py | 2 ++ tests/avocado/machine_s390_ccw_virtio.py | 1 + tests/avocado/replay_kernel.py | 2 ++ tests/avocado/reverse_debugging.py | 2 ++ tests/avocado/smmu.py | 1 + tests/avocado/tuxrun_baselines.py | 1 + 14 files changed, 57 insertions(+), 7 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 579d1837e0..fec8f06c09 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -1386,17 +1386,18 @@ below: def test(self): do_something() +You can also add ``:avocado: tags=flaky`` to the test meta-data so +only the flaky tests can be run as a group: + +.. code:: + + env QEMU_TEST_FLAKY_TESTS=1 ./pyvenv/bin/avocado \ + run tests/avocado -filter-by-tags=flaky + Tests should not live in this state forever and should either be fixed or eventually removed. If you move a test into this category please consider raising a bug to track progress towards a fix. -To run such tests locally you will need to set the environment -variable. For example: - -.. code:: - - env QEMU_TEST_FLAKY_TESTS=1 ./pyvenv/bin/avocado run \ - tests/avocado/boot_linux.py:BootLinuxPPC64.test_pseries_tcg Uninstalling Avocado ~~~~~~~~~~~~~~~~~~~~ diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 7f9af83b10..1624518d6c 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -217,6 +217,36 @@ avocado-system-opensuse: MAKE_CHECK_ARGS: check-avocado AVOCADO_TAGS: arch:s390x arch:x86_64 arch:aarch64 +# +# Flaky tests. We don't run these by default and they are allow fail +# but often the CI system is the only way to trigger the failures. +# + +build-system-flaky: + extends: + - .native_build_job_template + - .native_build_artifact_template + needs: + job: amd64-debian-container + variables: + IMAGE: debian + QEMU_JOB_OPTIONAL: 1 + TARGETS: arm-softmmu mips64el-softmmu rx-softmmu s390x-softmmu + sh4-softmmu x86_64-softmmu + MAKE_CHECK_ARGS: check-build + +avocado-system-flaky: + extends: .avocado_test_job_template + needs: + - job: build-system-flaky + artifacts: true + allow_failure: true + variables: + IMAGE: debian + MAKE_CHECK_ARGS: check-avocado + QEMU_JOB_OPTIONAL: 1 + QEMU_TEST_FLAKY_TESTS: 1 + AVOCADO_TAGS: flaky # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by # the configure script. The container doesn't contain Xen headers so diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index 9e9773e6e1..7c4769904e 100644 --- a/tests/avocado/boot_linux.py +++ b/tests/avocado/boot_linux.py @@ -99,6 +99,7 @@ def test_pseries_tcg(self): """ :avocado: tags=machine:pseries :avocado: tags=accel:tcg + :avocado: tags=flaky """ self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg") @@ -118,6 +119,7 @@ def test_s390_ccw_virtio_tcg(self): """ :avocado: tags=machine:s390-ccw-virtio :avocado: tags=accel:tcg + :avocado: tags=flaky """ self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg") diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 231b4f68e5..3f0180e1f8 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -1425,6 +1425,7 @@ def test_sh4_r2d(self): """ :avocado: tags=arch:sh4 :avocado: tags=machine:r2d + :avocado: tags=flaky """ tar_hash = 'fe06a4fd8ccbf2e27928d64472939d47829d4c7e' self.vm.add_args('-append', 'console=ttySC1') diff --git a/tests/avocado/intel_iommu.py b/tests/avocado/intel_iommu.py index 2dd11a6346..f04ee1cf9d 100644 --- a/tests/avocado/intel_iommu.py +++ b/tests/avocado/intel_iommu.py @@ -22,6 +22,7 @@ class IntelIOMMU(LinuxTest): :avocado: tags=machine:q35 :avocado: tags=accel:kvm :avocado: tags=intel_iommu + :avocado: tags=flaky """ IOMMU_ADDON = ',iommu_platform=on,disable-modern=off,disable-legacy=on' diff --git a/tests/avocado/linux_initrd.py b/tests/avocado/linux_initrd.py index c40a987bd1..aad5b19bd9 100644 --- a/tests/avocado/linux_initrd.py +++ b/tests/avocado/linux_initrd.py @@ -57,6 +57,8 @@ def test_with_2gib_file_should_exit_error_msg_with_linux_v3_6(self): def test_with_2gib_file_should_work_with_linux_v4_16(self): """ + :avocado: tags=flaky + QEMU has supported up to 4 GiB initrd for recent kernel Expect guest can reach 'Unpacking initramfs...' """ diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index 258fb50c47..6fa5459a07 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -317,6 +317,7 @@ def test_arm_ast2500_evb_sdk(self): """ :avocado: tags=arch:arm :avocado: tags=machine:ast2500-evb + :avocado: tags=flaky """ image_url = ('https://github.com/AspeedTech-BMC/openbmc/releases/' @@ -336,6 +337,7 @@ def test_arm_ast2600_evb_sdk(self): """ :avocado: tags=arch:arm :avocado: tags=machine:ast2600-evb + :avocado: tags=flaky """ image_url = ('https://github.com/AspeedTech-BMC/openbmc/releases/' diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mips_malta.py index 959dcf5602..99bee49e9a 100644 --- a/tests/avocado/machine_mips_malta.py +++ b/tests/avocado/machine_mips_malta.py @@ -109,6 +109,7 @@ def test_mips_malta_i6400_framebuffer_logo_7cores(self): :avocado: tags=machine:malta :avocado: tags=cpu:I6400 :avocado: tags=mips:smp + :avocado: tags=flaky """ self.do_test_i6400_framebuffer_logo(7) @@ -120,6 +121,7 @@ def test_mips_malta_i6400_framebuffer_logo_8cores(self): :avocado: tags=machine:malta :avocado: tags=cpu:I6400 :avocado: tags=mips:smp + :avocado: tags=flaky """ self.do_test_i6400_framebuffer_logo(8) diff --git a/tests/avocado/machine_rx_gdbsim.py b/tests/avocado/machine_rx_gdbsim.py index 350a73fbbb..412a7a5089 100644 --- a/tests/avocado/machine_rx_gdbsim.py +++ b/tests/avocado/machine_rx_gdbsim.py @@ -31,6 +31,7 @@ def test_uboot(self): :avocado: tags=arch:rx :avocado: tags=machine:gdbsim-r5f562n8 :avocado: tags=endian:little + :avocado: tags=flaky """ uboot_url = ('https://acc.dl.osdn.jp/users/23/23888/u-boot.bin.gz') uboot_hash = '9b78dbd43b40b2526848c0b1ce9de02c24f4dcdb' @@ -56,6 +57,7 @@ def test_linux_sash(self): :avocado: tags=arch:rx :avocado: tags=machine:gdbsim-r5f562n7 :avocado: tags=endian:little + :avocado: tags=flaky """ dtb_url = ('https://acc.dl.osdn.jp/users/23/23887/rx-virt.dtb') dtb_hash = '7b4e4e2c71905da44e86ce47adee2210b026ac18' diff --git a/tests/avocado/machine_s390_ccw_virtio.py b/tests/avocado/machine_s390_ccw_virtio.py index 61e75d8f9e..26e938c9e9 100644 --- a/tests/avocado/machine_s390_ccw_virtio.py +++ b/tests/avocado/machine_s390_ccw_virtio.py @@ -167,6 +167,7 @@ def test_s390x_fedora(self): :avocado: tags=device:virtio-gpu :avocado: tags=device:virtio-crypto :avocado: tags=device:virtio-net + :avocado: tags=flaky """ kernel_url = ('https://archives.fedoraproject.org/pub/archive' diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py index a60f1d1e54..010d7644c2 100644 --- a/tests/avocado/replay_kernel.py +++ b/tests/avocado/replay_kernel.py @@ -87,6 +87,7 @@ def test_x86_64_pc(self): """ :avocado: tags=arch:x86_64 :avocado: tags=machine:pc + :avocado: tags=flaky """ kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora' '/linux/releases/29/Everything/x86_64/os/images/pxeboot' @@ -185,6 +186,7 @@ def test_arm_cubieboard_initrd(self): """ :avocado: tags=arch:arm :avocado: tags=machine:cubieboard + :avocado: tags=flaky """ deb_url = ('https://apt.armbian.com/pool/main/l/' 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb') diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py index 9a468321e5..4cce5a5598 100644 --- a/tests/avocado/reverse_debugging.py +++ b/tests/avocado/reverse_debugging.py @@ -255,6 +255,7 @@ def test_ppc64_pseries(self): """ :avocado: tags=arch:ppc64 :avocado: tags=machine:pseries + :avocado: tags=flaky """ # SLOF branches back to its entry point, which causes this test # to take the 'hit a breakpoint again' path. That's not a problem, @@ -269,6 +270,7 @@ def test_ppc64_powernv(self): """ :avocado: tags=arch:ppc64 :avocado: tags=machine:powernv + :avocado: tags=flaky """ self.endian_is_le = False self.reverse_debugging() diff --git a/tests/avocado/smmu.py b/tests/avocado/smmu.py index 05b34418a5..21ff030ca7 100644 --- a/tests/avocado/smmu.py +++ b/tests/avocado/smmu.py @@ -22,6 +22,7 @@ class SMMU(LinuxTest): :avocado: tags=machine:virt :avocado: tags=distro:fedora :avocado: tags=smmu + :avocado: tags=flaky """ IOMMU_ADDON = ',iommu_platform=on,disable-modern=off,disable-legacy=on' diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py index 5f859f4e6f..a936a3b780 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -561,6 +561,7 @@ def test_sh4(self): :avocado: tags=image:zImage :avocado: tags=root:sda :avocado: tags=console:ttySC1 + :avocado: tags=flaky """ sums = { "rootfs.ext4.zst" : "3592a7a3d5a641e8b9821449e77bc43c9904a56c30d45da0694349cfd86743fd",