From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id C3EDC803BB for ; Fri, 13 Nov 2026 04:25:58 +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 6AD4NaYM014374; Fri, 13 Nov 2026 07:23:37 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AD4NaYM014374 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="TlYCVhqu" 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 6AD4NZkN014362 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Fri, 13 Nov 2026 07:23:36 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AD4NZkN014362 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48fcb657f32so255137f8f.2 for ; Thu, 12 Nov 2026 20:23:36 -0800 (PST) X-Gm-Message-State: APuU4Z/TzKtVq70/VxSdMucdZNIO66EyEXfFeolnXQwc3a/Nyit20lyZ rLdB5lPCkZNz5+rBqTwpL5pnKFnR1J3pYsgIIUDzaQJERNbqga6HNZ0EWQ78esJvYudkLgaVzoG OxDWXf2BVSrqjFmZvND8kEbZN3SXmXh4LcJdpf/UtieJUNex2Jy7Q9A== X-Gm-Gg: AYBFou0r7aEMvSgB4odSSoOOIEU7/6BpiFnUaFcyPJ3jtuqEHWA9BzfY+oaUiDDxneS uXrEVKy5nMPDZHgd2J0TELrwkD8E3Kk+MdQKqMQWBTEyna6pDpJequ6xbcVPpeRIzADLoSFSPRT xU6Dh3NBv7t/rceMDyqem8/gtRKP1YObkMGuw83WiRfsb0fnzx0+NNyI8nV6WSF48VDt3K3zTUW 4BkQ/Bo/QdO0Ie6aC66q9tBOZdSBc5z2XfdcML9xLIHS9oB5+a1PwRxZMYR2taHOxRWghKL6iUi ic9z6ppUN3drOZIKziFnFXxPsJaJ+BtI4+X7E+PpPjIhZxEEvs6UnN2XDtnRC6ZzgNF6V7Pl7X3 v3J8xgfeArle9QJqxNW1B4HOR X-Received: by 2002:a05:6000:2082:b0:48e:7470:9e98 with SMTP id ffacd0b85a97d-49c726dadb2mr3129725f8f.39.1794543815793; Thu, 12 Nov 2026 20:23:35 -0800 (PST) X-Received: by 2002:a05:6000:2082:b0:48e:7470:9e98 with SMTP id ffacd0b85a97d-49c726dadb2mr3129707f8f.39.1794543815356; Thu, 12 Nov 2026 20:23:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794543815; cv=none; d=google.com; s=arc-20260327; b=m6pe90yw/fzXkF5q5ZP+kFxFfvWqlU90RLT61Jp8Qsoom7Ap2ggjF2Z6QNFcx6YsM1 d3Bb6bZc5AVJMDeUe1PUH5QLojjtpjfj0EKOjLGiaQYrisW9fE2quYYFR/Pwf5jFbfDi 7M05zjPtIfU+AZUVZ95qBZ9o8cMZwHs+Vp0i5xaUSMLuV1BheqT6RS6FoPeySplVdPFg ma2Zrr3DIQ/Qr39V4vEJMJIT0ymQORtaScW8wpZc/CF4G7MXWoj/3knuOrUk/NPL/rAE 0VrXaZn/zY5VN0eOcWO/KITuhQvBvD7eDbMb6Cy8fVQYcA7yRNpECuUGTMoWxsRVu7km S/ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=r07wK98d+1E9Yg1Ln+hMYE1gKqn6gjPTLWhqgF4QJCM=; fh=WpT6aB7RBAGHZeWZzqAr71yzRFbPTYkPWKsRagLn48Q=; b=SPEvCfup2/TlZia691rWTCyAZkAO2nR0WpfsBMkGT2KmGzKz1YUCKREjgxtI0mk+Vd zwvdm6FkE1xbNOhXVTJBX9x5pJmJt3We3pzW5f8i8dmoWp3s4Eqe2svxY9MRk/U+ws6Y LpZe7kQxF6M/g20JRpxiNl5VPyCCJDu7Qd+Qn59rEjhNDiy0QnnKHZD4takSwqhDO9kn aLR+mWALch0uyHfXGx0FOJcXWSonCwUoTQAkvWsImTaWtln0PYYjAtzxjMDepOgUxq8v DH9AZsojKpSxjtIYBdvwbIc7daLzN6GjkE+EYFdFP1fCDhNyj0X4ZuyG+eXh850t/bRF 9mRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=TlYCVhqu; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@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-49c650cbafbsi3193249f8f.488.2026.11.12.20.23.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2026 20:23:35 -0800 (PST) Received-SPF: pass (google.com: domain of eva.kurchatova@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=TlYCVhqu; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@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=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=r07wK98d+1E9Yg1Ln+hMYE1gKqn6gjPTLWhqgF4QJCM=; b=TlYCVhqu4nQh fRS2B8qN6Xbc3rpMEIRckdxxqVaTPXVcGreJi9YGhKZ3L2PO3DNf1cmDAxdpn+7MTPwXKVNGzZfI6 8N7t496WhTGX6Z9Dkcu6wsCV0+OzwV15qPa7tf6oiWVZz7a8Ewg53StvNxMl04ot3wXlSfUG637iN mAWiTK9QDFNq8ztEbLokZf0o/tGjc2ENu9VMYKPlZ2msmiYLM4M6Gqw5pKcu9uMK/5SjGJVZGQAZ1 VvsCyDGMaAm9plsrR2zLtgKPc4xTx0J2Gj237qAO97O3P3G7UXfAEjiy/zK0fu3APinIeE7w7GvHK XU0pY29bMjpXfmiyt7BYuQ==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=LekKit-T14) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xRikv-00GsIK-0X; Fri, 13 Nov 2026 05:23:31 +0100 From: Eva Kurchatova To: khorenko@virtuozzo.com Date: Fri, 13 Nov 2026 06:19:58 +0200 Message-ID: <20261113042331.517488-2-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261113042331.517488-1-eva.kurchatova@virtuozzo.com> References: <20261113042331.517488-1-eva.kurchatova@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 1/3] selftests: harness: run the fixture teardown after a failed ASSERT 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 When an ASSERT fails in a TEST_F(), __bail() longjmp()s back to the setjmp() in the test wrapper, where the grandchild that ran the test should see child == 0 and run the fixture teardown. child is a local that fork() sets after setjmp(), so its value after longjmp() is indeterminate. With -O2 it comes back as 1, its value at setjmp(): the grandchild takes the parent's path, skips the teardown and aborts. A failed test then leaves its cgroups, files or mounts behind, and the next test can fail on them, as test_cache does on the cgroup that a failed test_numa_migrate left. Make the variable volatile, so it keeps the value fork() returned. Mainline no longer uses setjmp() here since commit 869c788909b9 ("selftests: harness: Stop using setjmp()/longjmp()"), which was a large rewrite, and out of scope for this series. https://virtuozzo.atlassian.net/browse/VSTOR-154520 Feature: fix selftests Signed-off-by: Eva Kurchatova --- tools/testing/selftests/kselftest_harness.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 19b05734b18c..5c46b8a854cf 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -407,7 +407,7 @@ { \ /* fixture data is alloced, setup, and torn down per call. */ \ FIXTURE_DATA(fixture_name) self_private, *self = NULL; \ - pid_t child = 1; \ + volatile pid_t child = 1; \ int status = 0; \ /* Makes sure there is only one teardown, even when child forks again. */ \ bool *teardown = mmap(NULL, sizeof(*teardown), \ -- 2.56.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel