From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id D0DE18013F for ; Wed, 2 Sep 2026 14:31:04 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 682ETiRB024203; Wed, 2 Sep 2026 17:29:45 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 682ETiRB024203 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="pY7UNLTC" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 682ETi8r024199 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 2 Sep 2026 17:29:44 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 682ETi8r024199 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-484337a63bbso752603f8f.3 for ; Wed, 02 Sep 2026 07:29:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AHgh+RpyMj0ClWCWZs2sIfHH/chCi2hAdJYz6V5tfWLjevCfU1c+sP/j5I1FpaE+pwhkBMwsvyS6KQ==@openvz.org X-Gm-Message-State: AFuF++mMWRnVUeKqFMk25uyC5Pn03/fgDvobjOUD8JwU05mnFcXGVoX8 dW9JLe8V4ffv+hNhOiSBIx/E8nHaPGI7NyFuGP7pxQsl44L+nD4EElHRlP9ayqASCczXS5YK9Vt rIF5UkeDjPz3B5D1siCUnZrwzZGRU6PK4FEPKdVpnCyBxGAFAWi1+Qg== X-Gm-Gg: AR+sD10GP1zFPu6diGslcuK5/Oq9LRsc/ZE8AyKYca1481IxJD3Wj3Aera3SKLs6iIn HJiRgrWtk7dHWFhXGHKQAzZEs7ibxAG3fRS4VS02Fnb28AlQKc9OwO5rT3D01Gg+NKqcZnZ6ylt Y/c/EcmguZ6OHELjLR9QgnXZ4ERccG/WLL52z1a3TXCzQlaz9gi3icRuN0VdPj+D/WVioj+Hybp G/frBABT56hu/XVfGsvb39XRAyU//9p6VsKAtMCEmppxlsMnbJMPo1Vx4eZOAt9/+CURcI5g0Rc d5L2kASwfOyG5nj1QYLiqzBjIBH+VsPEsWl9opdid5iErnOYG8tE9hPWOjcwudp9zVUc15tfTCA Cxw7oiXVA14ZzcdEd X-Received: by 2002:a05:600c:3496:b0:493:f5bf:4dc6 with SMTP id 5b1f17b1804b1-49ce57fb12cmr106907625e9.7.1788359383649; Wed, 02 Sep 2026 07:29:43 -0700 (PDT) X-Received: by 2002:a05:600c:3496:b0:493:f5bf:4dc6 with SMTP id 5b1f17b1804b1-49ce57fb12cmr106906035e9.7.1788359383079; Wed, 02 Sep 2026 07:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788359383; cv=none; d=google.com; s=arc-20260327; b=bEnIQ5xqBIpLRvZWc1QMmJ0Muyi81WtGJNg+49cFG9As2xT4g5zDdZreyH2pPP2ry6 k4ryBFfn9XnVVV/uuDkPqwuJMgHC48PWq1wHtWMEmLBkV5XiRXqMyL05eo6zDdBVW4BJ YG3cNokt4VSQYwgajYVrE35OtOl+koUOVui6hpA4Kl0xWJFMnsUoYUbtawbf7nTJfCbA bkmRbVY4i2SiKREiW8FF8Kk82VMFIS65rgjpe+22WMt/7YUcYlld7Tknrr+pnovQ08Pz 1DNubKJ8YeHtUqaT7Z1U7f8+3Z6SD6WN2cng6Ys2jpMcF5gPAsruK8Iy7nMyTPByyEjC N71Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:mime-version:dkim-signature; bh=Hgmpm5G2P19n/kh97KX0PZ21trW8HZe92wDTRx3WaCg=; fh=CTF2GHyV+XdzB5TROrdG4fdLri6JSHNOBC+LNuNq5bA=; b=Paz3mp+CkIHviPml5lAn/zGBJ8iyigZ3aoX1vdypV0d7zYfWL1YxdCbxfMNZse4AVl tkbXh621H8Sp35SsJin7zZuJ9tKL837NhP9GhHvaSS0bnLRDVF2zigSuUqh7myt6rLYm ze7EySprTV6Sq9fHVI6g3MPZj52/zlqOqMfta7cQGosxaE0cnrJmpyq1nUMVFw8trdoB JI9bTCx+YB+AoYqM598ngzfcQgpnDw4HpPm4nzpSjoNh1Cf330sb7gwWvbtIZPBouuF+ sW5LTdoTM4m8MuCjYnO9Z1bA0wIx3Pk2iRNOsUPg1TYqRtU4psutaR1fQ1II45hfVkMp 35nw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=pY7UNLTC; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48448e74a67si6214060f8f.40.2026.09.02.07.29.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 07:29:43 -0700 (PDT) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=pY7UNLTC; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Date:From:Subject:Content-Type: MIME-Version; bh=Hgmpm5G2P19n/kh97KX0PZ21trW8HZe92wDTRx3WaCg=; b=pY7UNLTCiDMh /2TY9BoGaKP1kyK6z20PjPj9w0foQFPaYCAryGX+7g4v4ji+mR/nMbgkzQXLJ06ST1oEvoOG65j8O G0ayUm5N8qlcb346d4eJ302JmG0M4/HASu2PHwxr743uw8DJ5BD3kceAkwtg8+ZO4H2MqUMSRfSq+ j2KSCAlq2vm18k5I6QU9eHUJBmxyjhY6GdcM3gfOXuZ1AekhTv9eCnevUf/yeMHQErgu0ZzXXa2Z6 8M1AjIVCVdpB70dQDksiM9ch1axMnNHuG8V6avpGUVj60Di4K4rXzmKZfbSLCWya9dgth9jvomUiC ceGGBvFXomjDWNaWvfuI2A==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1x1lvl-002lI4-15; Wed, 02 Sep 2026 16:29:41 +0200 MIME-Version: 1.0 From: Konstantin Khorenko To: Eva Kurchatova In-Reply-To: <20260831234808.1650699-1-eva.kurchatova@virtuozzo.com> References: <20260831234808.1650699-1-eva.kurchatova@virtuozzo.com> Date: Wed, 02 Sep 2026 16:29:39 +0200 Message-Id: <178835937988.1227296.17142575742987608953.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4567; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=QjaJ4UMaVNNxyzKS2bVAMU+LzajH15Xd0hX5nwuM2WY=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBqmDLVW7v61FiA24qgR/3G+3W27VZEhncEyAvtY s4Tnm/hGi+JAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCapgy1QAKCRBRlgpH+WFc KpM+D/9rPFT+9Q4jOC9arMOw33Zw4haCMJwaXOvu5ZaNvQ4jp2f3xfEJKbTsdkJPqFVXCtj4OhU hYZMJOz7jkfU6qs6B0hUte7J8iWOf1rbcMKTDCHWraEA7wMwdnHqYIs5GdErqTnmLLQTEbWPh8a fuaHS1vWIMHPAlQxgbmwpw2KHGXMlK4hPNuqPGarRDBuHk3H2onpQEOhiYU9KctofgO7ypR17JK yYlkw462k+0Z2acjmu+aZ+/9VeK5G13U0b5G8JoRw0Jivp6PzXfKkuTSljAGSKPncFoO5UmsUCm 7n1urHQVRDzI3nPv2tjbszv6ZEsDOE/6cUm6qrYXlGPeBJ9nLcB6rBVMMNZYSXlQq4M2MJ+CGRx XR9ANGYb8oFd1nhNJ2EACv+Hir0Myjh1zwN16PC+zLYNqQMad5HNXBtGuNmgfKVGqsRUhRZnsFN O+f402O7rvfk870GQ2jMHhQ5jy2a2HMHwojk/pr9bVS1/3Eo8lnwE+vUj960XYp+lFdcMT3WXuP op4NmMjCvNryO2b22vvsfiGarr/fxWduxvw27ikwsnP0DUagI6KHkBY39Xb7V07ntVUWkcI48Zm LNFxRscpIDjx59AGm08qtEJZm0sOI6JoxGMb+zu872c3F0r2JlrzmYkGxzlfEIkIdtfCQSm2cTa 3rJ/7GaNjkgMAYw== X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: devel@openvz.org Subject: Re: [Devel] [PATCH vz10] selftests: pstore: skip when no backend is registered X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org > Without a pstore backend the console, /dev/pmsg0 and every write check > fail. > > https://virtuozzo.atlassian.net/browse/VSTOR-142447 > Feature: fix selftests > Signed-off-by: Eva Kurchatova > > diff --git a/tools/testing/selftests/pstore/common_tests b/tools/testing/selftests/pstore/common_tests > index 4509f0cc9c918..e486a5a111d8d 100755 > --- a/tools/testing/selftests/pstore/common_tests > +++ b/tools/testing/selftests/pstore/common_tests > @@ -55,6 +55,7 @@ operate_files() { # tested value, files, operation > > # Parameters > TEST_STRING_PATTERN="Testing pstore: uuid=" > +ksft_skip=4 > UUID=`cat /proc/sys/kernel/random/uuid` > TOP_DIR=`absdir $0` > LOG_DIR=$TOP_DIR/logs/`date +%Y%m%d-%H%M%S`_${UUID}/ > @@ -81,3 +82,7 @@ prlog -e "\tcmdline=`cat /proc/cmdline`" > if [ $rc -ne 0 ]; then > exit 1 > fi > +if [ -z "$backend" -o "$backend" = "(null)" ]; then > + prlog "pstore backend is not registered, skipping" > + exit $ksft_skip > +fi The goal is right, and it is actually what this test set has claimed to do since 2015: pstore_crash_test:10 carries the comment # exit if pstore backend is not registered . ./common_tests but common_tests never implemented it. The existing check at common_tests:77-79 tests cat's exit status, i.e. only whether the sysfs file is readable, not what it contains. So the patch finally implements what the comment promises. Upstream common_tests is identical to ours, so this is worth sending to mainline too. ================================================ And send to mainstream in parallel, do not wait! ================================================ 1) The output now contradicts itself: Checking pstore backend is registered ... ok backend=(null) cmdline=... pstore backend is not registered, skipping Since the patch is about exactly this check, please fix its verdict instead of appending a second check at the end of the file. Keep the backend= and cmdline= diagnostics - they are useful in the skip case too. 2) CONFIG_PSTORE=n (and pstore built as a module but not loaded) still FAILs instead of skipping. CONFIG_PSTORE is tristate (fs/pstore/Kconfig:3), so /sys/module/pstore/parameters/backend may not exist at all; then cat fails, show_result reports FAIL, rc=1, and common_tests:82-84 exits 1 before the new check is reached. That is the most direct "feature not built" case and it should skip too. One extra condition. 3) More important in practice: on our config the patch is not enough once a backend does register. We have CONFIG_PSTORE=y # CONFIG_PSTORE_CONSOLE is not set # CONFIG_PSTORE_PMSG is not set CONFIG_PSTORE_RAM=m CONFIG_EFI_VARS_PSTORE=y CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y while pstore_tests checks precisely the frontends we do not have: the pstore console (pstore_tests:13) and /dev/pmsg0 (:17, :21). The test's own config file asks for CONFIG_PSTORE_PMSG=y and CONFIG_PSTORE_CONSOLE=y. What saves us today is only that no backend registers by default: efi_pstore is off (pstore_disable = IS_ENABLED(CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE), drivers/firmware/efi/efi-pstore.c:22, early return at :261), ERST registers only if the platform provides an ERST range (drivers/acpi/apei/erst.c:1266), and ramoops is a module that is not autoloaded. Hence backend=(null) and the skip fires. But on hardware with ERST, or when booted with efivars.pstore_disable=0, or after modprobe ramoops, pstore_tests fails again - for a reason unrelated to the backend. If the goal is a green run under any conditions, the frontend checks need their own skips: the console check only when a pstore console is actually registered, the pmsg checks only when /dev/pmsg0 exists. That can be a separate patch, but it should be decided now, otherwise the task gets closed while the test still fails on some machines. Nits: - [ -z "$backend" -o "$backend" = "(null)" ]: -o inside [ is obsolescent in POSIX; prefer [ -z "$backend" ] || [ "$backend" = "(null)" ]. - pstore_post_reboot_tests:10-11 has the canonical comment above the same variable ("# Kselftest framework requirement - SKIP code is 4."); worth repeating it. After that the duplicate ksft_skip=4 in pstore_post_reboot_tests can be dropped, since it sources common_tests (line 13) before first using the variable (line 19). -- Konstantin Khorenko _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel