From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 193E0199243 for ; Thu, 27 Jun 2024 15:35:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719502532; cv=none; b=f+E3i6IbrBRvdiKVcpkjv1+HHrs3MOjj9lNIYwWE7LW5hjvpD2dhm4iQUqg0RqSWVI9QK91Se4c1VokXTB1vAIwazaa0ssmRQE+pvNfRUUfrBpeZ5iBY9TjTx4df4aajfNBv4sNi4u2QB466EHHWW99LORl/J+C/bkVfWu5w4to= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719502532; c=relaxed/simple; bh=tQqmTtoXh0rhnRHGSuR5mSbSCsB4JcmmN29toYcRM6Q=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J6ubNX54X4N0iE5cd3aUzDDjq3OCBLlr9MqB3I3j9biQMuXf7dEgZoFWVGCIvuYlWHVzzs/iKIWOqcyuGMOPjquBaTtrP/avnvWp90Pi5HQIUCgZcDyMVzSYkdIbYC4Zh8vJTRaYl/Y7qhvb8NMZNTSd8+9lIuWB6lcB4b9MfrY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FYRJzKLU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FYRJzKLU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C635C2BBFC; Thu, 27 Jun 2024 15:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719502530; bh=tQqmTtoXh0rhnRHGSuR5mSbSCsB4JcmmN29toYcRM6Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FYRJzKLUSn52DtBw7vlv37QkpHE+S2k+RehkiDrGkDg0QmY3KZ54t3LNG4aK6vlqr aUBkXH08VFw0pvrrhvY+kocufZoeumN321E0osBgHLSYrTEqbZVXkfyEzWdT+xjUDh BRWVl3Lp4yOsrQZErEmbH/diMiwamwexfAk2fSDw0HtURQY1laW70EswZ6b2SrDxpw 4Fuma6OTLDG2kvEplA2ApvRcRAmB8Og3AMkqxT1QFZL3Dh9m1+pc7IKkXqz7AGs2DM +18qxzh4VGmkJ2MQnIhie8/Qkey+tlMUuEYmnnVJKdIRP14haiC2u6dZPqcTxWe5Cb eyYypX1BdtUUA== Date: Thu, 27 Jun 2024 08:35:29 -0700 From: Jakub Kicinski To: Przemek Kitszel Cc: , , , , , , Subject: Re: [RFC net-next 1/2] selftests: drv-net: add ability to schedule cleanup with defer() Message-ID: <20240627083529.3befe119@kernel.org> In-Reply-To: <49fcfb78-32ac-49de-8e83-2e12bc04fff2@intel.com> References: <20240626013611.2330979-1-kuba@kernel.org> <20240626013611.2330979-2-kuba@kernel.org> <20240626094932.1495471b@kernel.org> <49fcfb78-32ac-49de-8e83-2e12bc04fff2@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 27 Jun 2024 10:40:31 +0200 Przemek Kitszel wrote: > > Hm... not a bad point, defer() cycles are possible. > > But then again, we don't guard against infinite loops > > in tests either, and kselftest runner (the general one, > > outside our Python) has a timeout, so it will kill the script. > > I mean the flow: > $EDITOR mytest.py > ./mytest.py > # output: Exception while handling defer / cleanup (at 4 out of 13 cleanups) > > then repeat with the hope that fix to cleanup procedure will move us > forward, say: > $EDITOR mytest.py; ./mytest.py > #output: ... (at 7 of 13 cleanups) > > just name of failed cleanup method is not enough as those could be > added via loop Oh, yes, nice one!