Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2059417rwl; Sun, 26 Mar 2023 15:03:38 -0700 (PDT) X-Google-Smtp-Source: AKy350bE70I8DvWkgrC5SdKUjKw18YjvMfHcf3k5w7/lV31G8Pd1I6DwIsE4vMopknjU8Xs0Fs01 X-Received: by 2002:a17:90a:53:b0:237:d2d8:3264 with SMTP id 19-20020a17090a005300b00237d2d83264mr10163041pjb.40.1679868218212; Sun, 26 Mar 2023 15:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679868218; cv=none; d=google.com; s=arc-20160816; b=Gi9rm9UdJRC5oVx0h/V0Fiw+mL6FvN7qFw47VEEguS9MIRbg/utPkooU/fVsCKkii2 HPSFKikMPv+Wz6kfL83telbYip/yArm98WnT4vihhe/EgPBS61EyituMARwUSoRk+4mz /e4RXAnDnOSsm9MzovbxqhD9AE0HXvjG7VfYzqZKTBHDW8o9X6uSCKNk6L8P0HQ3O++q l3OvfCWHRy5FTds16Qhr5D4h6LQ6XV9A1eE19SMrtjgR+31NJ2jtTaJ6FgoREVfYWxfn rXRIEJsxOrQ2OODT6fbuQjvkYJRIau78TG2vunEd/ETCkMTfgM9vCkgryz3/m3srTpaD Xjng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=DIQ9eIlSpAA9+1gG0Uwa5651wmcDfg3GdDljDetIFiQ=; b=C/AQZ+6/48Nci5mGJ/XboXHzkhwXfm0QHvIFOGPgEiR2XzIT1RkORh0JuRuAn5IfWZ 3LyhACiPd1fL5ftT6+EV1m78RBA5l/q7NrnzqevA9ymHW3TEaBEg+DnphTz8NetgkOeC hFx7cnA33/nBED+6pkUBOMhLrzR9n7MPvUXdYi6xEfw01VlWDaYYmRyZlPhRb/iFpELS 4NfKKw8VnIFG+y437y+SX/htG4P8bNa9//l929qXvipvS4AN7fnqCSj9vL31YaiX/GVs +16sX6xCs/uauhUYmY7gZfpcrXULvN8BxCtqQBlI3IrNespj4NDnqfBGSfYIa1qopXfM PdMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a17090a8c8900b002299b06dca9si9115653pjo.83.2023.03.26.15.03.26; Sun, 26 Mar 2023 15:03:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230380AbjCZVjH (ORCPT + 99 others); Sun, 26 Mar 2023 17:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjCZVjG (ORCPT ); Sun, 26 Mar 2023 17:39:06 -0400 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B8854C1C; Sun, 26 Mar 2023 14:39:05 -0700 (PDT) Received: by mail-qv1-f45.google.com with SMTP id t13so5610847qvn.2; Sun, 26 Mar 2023 14:39:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679866743; h=user-agent:in-reply-to: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=DIQ9eIlSpAA9+1gG0Uwa5651wmcDfg3GdDljDetIFiQ=; b=iP5DTRifXkna2xG4BWLYOCPilWOenHcKn8F1BZSaU1GS7Te4U3B+bWKuQv+Q87LOoe PYdMvTjfy3+tHC9omeyUbwvp1kLn2IgOhXLUrLduNELj1UqQIsUZBRkkRztl1czE8Hjm W/Yfgapi8XT//anxdFk0WxC+4gMdNLVYLqcOIWomBAm1f9UaX/gXT0GSipU/Loa+IMjr TzUvhWZvx2G6Dszb20A3jqO4RorhmpjLvOMFMnkJDVeBWSQ1gyZU6I5/DOZndJcIod4u 1CcALobgmLxOfE3h8pgPD8w2tAFUoDYmf94NMuFIuT/rAu0Rhcp49OQOhpjF4hEUoMsj DeMg== X-Gm-Message-State: AAQBX9fxDNZxYrl7JRBhIr6vkEgzwMXG3FgjcRP9YBaB9MymKYkUna84 nGv/GxPqSKESfmFn1JGzVvA= X-Received: by 2002:a05:6214:4114:b0:5aa:fd43:1fbe with SMTP id kc20-20020a056214411400b005aafd431fbemr16826372qvb.46.1679866743277; Sun, 26 Mar 2023 14:39:03 -0700 (PDT) Received: from maniforge ([24.1.27.177]) by smtp.gmail.com with ESMTPSA id 75-20020a370a4e000000b006ff8a122a1asm10659270qkk.78.2023.03.26.14.39.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 14:39:02 -0700 (PDT) Date: Sun, 26 Mar 2023 16:39:00 -0500 From: David Vernet To: Markus Elfring Cc: Lorenzo Stoakes , 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 , cocci@inria.fr, LKML Subject: Re: [PATCH] selftests: cgroup: Fix exception handling in test_memcg_oom_group_score_events() Message-ID: <20230326213900.GJ363182@maniforge> References: <5b7921c9-ee5d-c372-b19b-2701bcf33148@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5b7921c9-ee5d-c372-b19b-2701bcf33148@web.de> User-Agent: Mutt/2.2.9 (2022-11-12) X-Spam-Status: No, score=0.5 required=5.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 26, 2023 at 10:15:31AM +0200, Markus Elfring wrote: [...] > >> > >> Fixes: a987785dcd6c8ae2915460582aebd6481c81eb67 ("Add tests for memory.oom.group") > > > > Fixes what in the what now? > > 1. Check repetition (which can be undesirable) > > 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) { int ret; retry: ret = rmdir(cgroup); if (ret && errno == EBUSY) { cg_killall(cgroup); usleep(100); goto retry; } if (ret && errno == ENOENT) <<< that case is explicitly handled here ret = 0; return ret; }