From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4439FC761A6 for ; Mon, 27 Mar 2023 09:13:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233129AbjC0JNh (ORCPT ); Mon, 27 Mar 2023 05:13:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233038AbjC0JNd (ORCPT ); Mon, 27 Mar 2023 05:13:33 -0400 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEFBC133; Mon, 27 Mar 2023 02:13:31 -0700 (PDT) Received: by mail-qv1-f54.google.com with SMTP id qh28so6218224qvb.7; Mon, 27 Mar 2023 02:13:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679908411; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Umb9hUbfu4RXL6KlGkF01LiyDptRngvjLvFGabW/70w=; b=y1UaIbGx+4wKJ2wk2Hub37TFJ1cq0ubQFNw7MbfK5zJo7kamFg9kcUFo1bo6vX85GD 0NgtVXOjl3gB5GET1x1dEO1BbQ/CH9FmGeccEnci2nA2VVURepTTpTkSsoT8qaM4GJ3q 4ilX+X0FYhgvrI9fuHm3YDqUmmAPk+hEP0/bqbJ/2kdD4Wvj75zofWirmTv8jRSHgSF5 A3BuMEiadcNudFab+MhENmM2Liv1zZs473N+ffl8rb+t0sMIGsQJCz40ogT55jy66QKw 14hAnbjtRLZRQywLCBdnkCWOruVVgUNI6VVzsf0oaGpQ+gGMv1aVcDs1GOvdShvP2+CK zXxg== X-Gm-Message-State: AAQBX9empRtKgnBzrEQiW2cufujT9sU1OJzbDNH4fokqny65V0xpg/3C 1s4HHHBMj8kT4Q8aU/J5Bi8= X-Google-Smtp-Source: AKy350Y06rMs/401uxhflhl8CYmN7DqjbNmD9t0V5jGwKE6OwXPeDLRcEQJJWCwLvw2M9hVJch4zPw== X-Received: by 2002:ad4:5dc1:0:b0:5ad:e777:1fc2 with SMTP id m1-20020ad45dc1000000b005ade7771fc2mr14569629qvh.15.1679908410637; Mon, 27 Mar 2023 02:13:30 -0700 (PDT) Received: from maniforge ([24.1.27.177]) by smtp.gmail.com with ESMTPSA id t2-20020a374602000000b00746ac14e29asm6562753qka.5.2023.03.27.02.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 02:13:30 -0700 (PDT) Date: Mon, 27 Mar 2023 04:13:27 -0500 From: David Vernet To: Markus Elfring Cc: kernel-janitors@vger.kernel.org, linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Jay Kamat , Johannes Weiner , Michal Hocko , Muchun Song , Roman Gushchin , Shakeel Butt , Shuah Khan , Tejun Heo , Zefan Li , Lorenzo Stoakes , cocci@inria.fr, LKML Subject: Re: [PATCH] selftests: cgroup: Fix exception handling in test_memcg_oom_group_score_events() Message-ID: <20230327091327.GK363182@maniforge> References: <5b7921c9-ee5d-c372-b19b-2701bcf33148@web.de> <20230326213900.GJ363182@maniforge> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.9 (2022-11-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 27, 2023 at 07:56:03AM +0200, Markus Elfring wrote: > >> 2. Can a cg_destroy() call ever work as expected if a cg_create() call failed? > > > > Perhaps next time you can answer your own question by spending 30 > > seconds actually reading the code you're "fixing": > > > > int cg_destroy(const char *cgroup) > > { > … > > ret = rmdir(cgroup); > … > > if (ret && errno == ENOENT) <<< that case is explicitly handled here > > ret = 0; > > > > return ret; > > } > > Is it interesting somehow that a non-existing directory (which would occasionally > not be found) is tolerated so far? > https://elixir.bootlin.com/linux/v6.3-rc3/source/tools/testing/selftests/cgroup/cgroup_util.c#L285 > > Should such a function call be avoided because of a failed cg_create() call? The point is that (a) you were wrong that this is fixing anything, and (b) this patch is functionally useless. Sure, we could move some goto's around and subjectively improve "something". Why? What's the point? It's highly debatable that what you're doing is even an improvement, and I'm not interested in wasting time pontificating about the merits of a trivial "fix" for a test cleanup function that isn't even broken. Several people have already either advised or directly asked you to stop sending these patches. I'm not sure why you're choosing to ignore them, but I'll throw my hat in the ring regardless and do the same. Please stop sending these fake cleanup patches.