Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1947081lqb; Mon, 27 May 2024 02:56:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVw4Bxh+tYeALR5DfsKUCt5wZKQVpKOzGZ+NxjcqxjfN0GlCN7ALwQJxy7OlHl5FxVBPCeqmmWuMYH/ohsffgQii+kA7zBwqPoBllwZjA== X-Google-Smtp-Source: AGHT+IGRMu+BKLveV4J/z83pRvjCHfqzJsmcYctLsKNHtoC4kcwJz/+r3B++aS+GQ4XRJAXYHobc X-Received: by 2002:a50:cccb:0:b0:572:6249:96bc with SMTP id 4fb4d7f45d1cf-578519bdc7amr5903626a12.32.1716803809585; Mon, 27 May 2024 02:56:49 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5785246407asi3654363a12.289.2024.05.27.02.56.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 02:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190387-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=neutral (bad format) header.i=@oracle.com; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=XQWeFjGw; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-190387-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190387-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 265D01F22097 for ; Mon, 27 May 2024 09:56:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0E7C13A89B; Mon, 27 May 2024 09:56:39 +0000 (UTC) Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 512CE13A895; Mon, 27 May 2024 09:56:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716803798; cv=fail; b=L0ZEl0jzwXiL/QEMCtM/zUkxyMN/qwjunNAScowBbcUVA047T2Olb+GQ3F+Ng/pQNsJPFsVTwBq3qV6RZr6+sGsuI+j82Y2eHGGxzlfZFsufDKNQo3/VGC4Pen2Zy8gwbT4d2H+82ZIqOvHyjRqLDZ7eV+JObnKzm9XAWRjSiMg= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716803798; c=relaxed/simple; bh=sLUxJtlJkdHjHegRYf0VzdwFmA92r8CVpUPMrYx5faA=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=DYS/veJN7XZ9yAcOrpvB3gUa/+bRMfmWD65F4ppxr6tG3b7RVvtCCHzMNivEWrFmBgA4AepvndH40aAOioIpLpVDgDS83MTViUtbhLgq+R0Qa5RPFiejeTeID31n6jpfnWtG/i/svrNSXK2BJ8sHNdt+Z365qqadtlo9Y9I0ax8= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44R7nPAC024015; Mon, 27 May 2024 09:56:23 GMT DKIM-Signature: =?UTF-8?Q?v=3D1;_a=3Drsa-sha256;_c=3Drelaxed/relaxed;_d=3Doracle.com;_h?= =?UTF-8?Q?=3Dcc:content-transfer-encoding:content-type:date:from:in-reply?= =?UTF-8?Q?-to:message-id:mime-version:references:subject:to;_s=3Dcorp-202?= =?UTF-8?Q?3-11-20;_bh=3DwgrRi9ZYNRXMJhHngrg0jSmUo6me4xP5+vAOTv7YI8k=3D;_b?= =?UTF-8?Q?=3DHmDwFfn1SDEDQUrezXalytwrEs35g45u2GTOKM/qXW+azNg5m/2Gkk/yUYhc?= =?UTF-8?Q?ld6paLc8_LQD9FjWfpkifpko/IRoBFdErCWIMKTXNABv3J/P0oDXZidz7GbeTDl?= =?UTF-8?Q?WYTo6NLGQAM6M7_AX/GCLo7VXRN3daY/iu9ZzDNfn5HHc7wNtOFbk/ZB1P/43XM?= =?UTF-8?Q?WXhF1IcOk26RRNyMRBt5_sWoJmSUfvZnWKx9om3q5MXy+VRO6H2zO/PDbPLa6JQ?= =?UTF-8?Q?890XjV9pAs6VwHq9g6zvtK30+I_uyxUNE6SDG1KXVQ8+HBJ/bI+orC4nwB+7f/r?= =?UTF-8?Q?wdH81elkXd5iR5r3lmUzkKzw9+ZB9m3s_7g=3D=3D_?= Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3yb8hu2bgq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 May 2024 09:56:23 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44R9VPQS009274; Mon, 27 May 2024 09:56:22 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3yc529wha9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 May 2024 09:56:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SX4D/p4GilmjvXlJQdIpWC1GaDkBp8JtVeJeg+TAri/6/u6oHMEbwVWQNtW2VX2/EZ9OzpGFMb8vBPpydVfTvDmAHhfj/k7+59xBlxFoaJ8ALswr03iIYr0XIDKogBzGTUoZcqaw7UYIDfxNztx5SSkIqfchaYIqoIwxXTxBZhP9BvTlAamGosrij44x8YdK4kMYGZk9NdL4XGrY2iqizPQocrI6zdzk0SZwOb9GyhJzvNut+dlwDA/OYNjMB6bzUDlM6CBtdqB2xE9pE666Rrqo6yxwks2+VInoM4vA/s5To7613FN0NdaI6QLE67vggInFe+8VQcOmsmZs8K2CJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wgrRi9ZYNRXMJhHngrg0jSmUo6me4xP5+vAOTv7YI8k=; b=jmxBqh9FVGCc0xVes7MaM31oyOucwflwBkDEmkOv8q67/pTIJ5h9e+JAYcLT29ydLsxq2rKyRmzBt/lOGfW8vWCcoS1LwKRtql5w1KjiecbSrei8anoSivWYzb7GAQJfCV2LKJhhqHlL6DO3x9CR/WTb8ZO/yYnQYHQgr98X6xqOe65pYJFpanbBsDpyMm4PXSrcHONWRbBwhT2dD0NSBn3d2JbdZJsbcOc5MsHm2SIfGACKTLEcNAGgW+91pNjZsAkIuCbmk0pf1fl7P8ydad8gIiwgNdfmR+5CbClx3O+vnJqdGIONasBugUd9VKFD31q/IPmkRg7pxUismF5QcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wgrRi9ZYNRXMJhHngrg0jSmUo6me4xP5+vAOTv7YI8k=; b=XQWeFjGwpBQ+nUFXf954cFRghwEP+DEgBQy68VZfNaWapNLCXFPG6SSlU0o/6GnWs/7iQOAlBFJ8uDuEVekVK9+CI1yvD+VTp9fH5cK+e0KLQtBbwIWuKdPEOrNBeRcd6OQZzsqQDWPc8JjSrfV044GUcU0XWsBMPRN2GG3HmJo= Received: from IA1PR10MB7240.namprd10.prod.outlook.com (2603:10b6:208:3f5::9) by SN4PR10MB5608.namprd10.prod.outlook.com (2603:10b6:806:20b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.29; Mon, 27 May 2024 09:56:20 +0000 Received: from IA1PR10MB7240.namprd10.prod.outlook.com ([fe80::962f:da30:466c:6a1]) by IA1PR10MB7240.namprd10.prod.outlook.com ([fe80::962f:da30:466c:6a1%4]) with mapi id 15.20.7611.025; Mon, 27 May 2024 09:56:19 +0000 From: Gulam Mohamed To: Shinichiro Kawasaki CC: "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "axboe@kernel.dk" , "chaitanyak@nvidia.com" , "hch@lst.de" Subject: RE: [PATCH blktests] loop: Test to detect a race condition between loop detach and open Thread-Topic: [PATCH blktests] loop: Test to detect a race condition between loop detach and open Thread-Index: AQHasBwf89t+k7DPDEWtt0I+km2kdg== Date: Mon, 27 May 2024 09:56:19 +0000 Message-ID: References: <20240521224249.7389-1-gulam.mohamed@oracle.com> <20240521224249.7389-2-gulam.mohamed@oracle.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA1PR10MB7240:EE_|SN4PR10MB5608:EE_ x-ms-office365-filtering-correlation-id: a898f06b-f848-484d-e28a-08dc7e33422f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|366007|376005|1800799015|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?d+FhHnphUnKVHMfluMKeheyh408ia4v/uynOxLv5vBwW+qIqtY/8fc/l2ady?= =?us-ascii?Q?UDe5JJAHFBtCgODHZWVi3HPWkgtFKS8om5NtVt46kfmxDSV8EQHJRezin0xi?= =?us-ascii?Q?+RGbxFf8PldJdAsZmEN1bn8bnHjVcS9tIJ6UkKLplZ6Cg2dnMv7RmQSTxS6j?= =?us-ascii?Q?zwGnfkPhBKJ5/efJ0zyuMhJvr0cXt6DS9QbMuNy+YzFmI607EiBx70WoZEn2?= =?us-ascii?Q?q7XFsYYgEubAUGhTkBp3YezkDflmpxLwUijOfvCMWV0MLIb/SOUMqHkFeCFO?= =?us-ascii?Q?X86GFLXJiKRWB3JD0cOIvyD8iLfGhWmawgCeYp8Rde83UAl72UhbaX7ccOXR?= =?us-ascii?Q?LAOpKY6AyQS8mQp4tskmxqYx5/XT8UNj7gdE8UAADBiY8MpkBsSwqohYkmln?= =?us-ascii?Q?IEhZp81jFes4C8aJaRtahjsigGwvlz3JZScNPJKOxSPcmjkQ2Pc27L3PMEYa?= =?us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=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR10MB7240.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015)(38070700009);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3yvBgg/bLGNOjHbMJU+5xIFUpp8fcjBM5QemlWwc5Pa3usot4wjbdhBqNS0x?= =?us-ascii?Q?5SAGVkH2dBbvgIzS4GoVj/Ray+NDpo6epuDukp4YQACnfKYv9v5zE4WkVyvI?= =?us-ascii?Q?D6HlTBGFpe2MztfRYLlB2FB+FyyroMa3NmHfDs7vxRwOUNWHzZMoCtzoGFBt?= =?us-ascii?Q?tipHY9XtrgdM8BB2t1XaP00HIhZohhhcahEs4IsTnWhy+NXG7RMrrVj0XaEb?= =?us-ascii?Q?kbsYD89ThUXoDPbDlXM8/EVnx9lwCA8+Y+68an7XjWVvwocSmwHgcwBc9dJK?= =?us-ascii?Q?HzV9iXYEp1zkC5RZ9ocAmznpg3e8+6IK+ljp4yN7gp7bM1x8+SJU0nWSniAU?= =?us-ascii?Q?cwVFImm0LHYflpfMn5tXrIdehQQrsZnBP3cm4C/nwfK00gUxz2z5dGVp/lsa?= =?us-ascii?Q?fNjsmjmwZKXU/3lbd91uVEDmtbtDfN539fnPlEWr45BlqUfz61mqalRxLsNN?= =?us-ascii?Q?u0f+RTgm0L8tK5suN6G8lprzP/xcuqL285vw1XPAm9yLOBFX91TBVE3x9KZa?= =?us-ascii?Q?u9ur89mNiup1ymq8vSJJLfeAL0ePZ24uSQRmaF/xwghkeYEnvaAKj4lNt4dr?= =?us-ascii?Q?6o4LBbn4nLpJ9PvXks/2ORtsMAy3rNxnevAf0LxnNzWLL7OEJy5dkJoYZfiZ?= =?us-ascii?Q?DacdsX9FtDUwO4aIFNqxvDaoVB558cl0LhfMXMENOBncal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ZdP63JNZUXFDit?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: lE6Il9FSmkOFttkRS+cWi2Pzs5AwDwtNEiSgYtiac4YjnGz02MxuZD818/GCvnZI3JLlQGZU4rrODJxIEMy5u6S+eOuaiHR2Acic01ePAar6QiB3o6xfaiHURPSDh79ENChyHx8KxHzDG96Hqm6HZUFSrGxb3GljCJyLx/zErwu0b2SNEMijdfvUAfym5W+01pHfUFuAn+UVFj9zWJZK3jQ0aej2BJDY8KUIwZq8hBhmmLLWXpFlc7pnXSZvz6EXvP6kzvb+8aUb3PZc2tka0br6sUh4HOXBYWNVyEdN15aedy/rWL9Fd2SkFjNKnk2Q5gHzYtnTfgDszQzsRhqmSPWuNcl39fSTow8/5Nck0q4gvqexO4MPSlRH5AV2bVsQ7Flhqq7VVuhKSqxtdxJTmkciiUCBtNH7B52P7EbDcRos0ZYAwTj9tCJHYMCL4OkGBPBloo69gxglEYjME5UkKsvH5yOOmlrHDuHcXQw5uQoBQHNkuhv9kaYxOgL8h+E5bzIYHh76iLO/PfvtO7+ld7c9NR0Lwot9xXxTE2nRIeebhpZuDpFN2Zn7GJRiapLohsmonfcUJl/HDDHHZhaxPxiq4ikf7/WZ6OMQBrc40xA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR10MB7240.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a898f06b-f848-484d-e28a-08dc7e33422f X-MS-Exchange-CrossTenant-originalarrivaltime: 27 May 2024 09:56:19.8370 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hcZfkjOJMMMKXJM00Y0l3BCRlDSK01ZzTHmRPhVXDsROsU/u1hGxqx3nrX3DmFuQ7PHyrpx3hGXTWjCeY/iN4ennhG25CO9h3HufAZvfXvM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR10MB5608 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-26_09,2024-05-24_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405270081 X-Proofpoint-ORIG-GUID: KY1xKobOvx0sFZwpixJvTzFhQcCi5xEX X-Proofpoint-GUID: KY1xKobOvx0sFZwpixJvTzFhQcCi5xEX Hi, > -----Original Message----- > From: Shinichiro Kawasaki > Sent: Thursday, May 23, 2024 4:45 PM > To: Gulam Mohamed > Cc: linux-block@vger.kernel.org; linux-kernel@vger.kernel.org; > axboe@kernel.dk; chaitanyak@nvidia.com; hch@lst.de > Subject: Re: [PATCH 2/2] loop: Test to detect a race condition between lo= op > detach and open >=20 > On May 21, 2024 / 22:42, Gulam Mohamed wrote: > > When one process opens a loop device partition and another process > > detaches it, there will be a race condition due to which stale loop > > partitions are created causing IO errors. This test will detect the > > race >=20 > Hello Gulam, thanks for the patch. I ran the new test case on my system a= nd > observed it failed. It looks working as expected. >=20 > This is the patch not for Linux kernel but for blktests, then it's the be= tter to > separate it out. I suggest to add the subject title prefix "[PATCH blktes= ts]" > to this patch so that reviewers can tell the target repository easily. >=20 Done. Changed the subject line prefix to "[PATCH blktests]" =20 > I suggest to take a look in the "new" script. It has some guides for blkt= ests, > such as "Indent with tabs" or the global variable "TMPDIR". Also, please = run > "make check" which runs shellcheck. >=20 > $ make check > shellcheck -x -e SC2119 -f gcc check common/* \ > tests/*/rc tests/*/[0-9]*[0-9] src/*.sh > tests/loop/010:23:17: note: Instead of '[ 1 ]', use 'true'. [SC2161] > tests/loop/010:32:17: note: Instead of '[ 1 ]', use 'true'. [SC2161] > tests/loop/010:84:7: note: Double quote to prevent globbing and word > splitting. [SC2086] > make: *** [Makefile:21: check] Error 1 >=20 > Please address the shellcheck warnings above. It will help us to keep scr= ipt > quality at some level. Done. Resolved the warnings >=20 > > > > Signed-off-by: Gulam Mohamed > > --- > > tests/loop/010 | 90 > ++++++++++++++++++++++++++++++++++++++++++++++ > > tests/loop/010.out | 2 ++ > > 2 files changed, 92 insertions(+) > > create mode 100755 tests/loop/010 > > create mode 100644 tests/loop/010.out > > > > diff --git a/tests/loop/010 b/tests/loop/010 new file mode 100755 > > index 000000000000..ea93a120d51a > > --- /dev/null > > +++ b/tests/loop/010 > > @@ -0,0 +1,90 @@ > > +#!/bin/bash > > +# SPDX-License-Identifier: GPL-3.0+ > > +# Copyright (C) 2024, Oracle and/or its affiliates. > > +# > > +# Test to detect a race between loop detach and loop open which > > +creates # stale loop partitions when one process opens the loop > > +partition and # another process detaches the loop device # . > > +tests/loop/rc DESCRIPTION=3D"check stale loop partition" > > +TIMED=3D1 > > + > > +requires() { > > + _have_program parted > > + _have_program mkfs.xfs > > +} > > + > > +image_file=3D"/tmp/loopImg" >=20 > $TMPDIR is recommended instead of /tmp. $TMPDIR is cleaned up after test > run. Done. Using $TMPDIR now. >=20 > > +line1=3D"partition scan of loop0 failed (rc=3D-16)" > > + > > +function create_loop() >=20 > Nit: the "function" keyword is not used in blktests (there is one excepti= on > though). >=20 Done. Removed the keyword "function" now > > +{ > > + while [ 1 ] > > + do > > + loop_device=3D"$(losetup -P -f --show "${image_file}")= " > > + blkid /dev/loop0p1 >> /dev/null 2>&1 > > + done > > +} > > + > > +function detach_loop() > > +{ > > + while [ 1 ] > > + do > > + if [ -e /dev/loop0 ]; then > > + losetup -d /dev/loop0 > /dev/null 2>&1 > > + fi > > + done > > +} > > + > > +test() { > > + echo "Running ${TEST_NAME}" > > + local failure=3D"/tmp/failure" >=20 > Nit: some local variables are declared with "local" keyword, and some oth= er > are not. Done. Using the "local" keyword for all local variables now >=20 > > + touch $failure > > + echo 0 > $failure >=20 > Why the file is required to keep the fail/pass status? Just a bash variab= le looks > enough. In the beginning I tried with a bash variable but it was not working as the= variable need to be accessed by other two child threads also. >=20 > > + dmesg -c > /dev/null 2>&1 >=20 > This kernel ring buffer clear will likely affect test harnesses which run= blktests. > To check the kernel message generated during each test case run, please u= se > _dmesg_since_test_start(): ref nbd/004, nvme/003. Done. Used the above function >=20 > > + > > + truncate -s 2G "${image_file}" >=20 > Other test cases in loop group have 1G file size. Is 2G required for this= test? > If not, 1G size would be the better to reduce disk shortage risk. >=20 Using 1G is not an issue. Done > > + parted -a none -s "${image_file}" mklabel gpt > > + loop_device=3D"$(losetup -P -f --show "${image_file}")" > > + parted -a none -s "${loop_device}" mkpart primary 64s 109051s > > + > > + udevadm settle > > + if [ ! -e "${loop_device}" ]; then > > + return 1 > > + fi > > + > > + mkfs.xfs -f "${loop_device}p1" > /dev/null 2>&1 > > + > > + losetup -d "${loop_device}" > /dev/null 2>&1 > > + > > + create_loop & > > + create_pid=3D$! > > + detach_loop & > > + detach_pid=3D$! > > + > > + sleep "${TIMEOUT:-180}" >=20 > The default 180 seconds sounds a bit long. How about 30 seconds? Using 180 seconds is just to give more time to reproduce the issue as 30 se= conds may not be sufficient for the race condition to occur Will send the version 2 as soon as possible, with all these changes >=20 > > + { > > + kill -9 $create_pid > > + kill -9 $detach_pid > > + wait > > + sleep 1 > > + } 2>/dev/null > > + > > + losetup -D > /dev/null 2>&1 > > + dmesg | while IFS=3D read -r line2 > > + do > > + match=3D$(echo "$line2" | grep -o "$line1") > > + if [ "$line1" =3D=3D "$match" ]; then > > + echo 1 > "/tmp/failure" > > + break > > + fi > > + done > > + failed=3D$(cat $failure) > > + if [ $failed -eq 0 ]; then > > + echo "Test complete" > > + else > > + echo "Test failed" > > + fi > > + rm -f $failure > > +} > > diff --git a/tests/loop/010.out b/tests/loop/010.out new file mode > > 100644 index 000000000000..64a6aee00b8a > > --- /dev/null > > +++ b/tests/loop/010.out > > @@ -0,0 +1,2 @@ > > +Running loop/010 > > +Test complete > > -- > > 2.39.3 > >