From patchwork Fri Sep 7 16:49:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Kamat X-Patchwork-Id: 10592383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0EE5112B for ; Fri, 7 Sep 2018 16:54:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DABF82B74B for ; Fri, 7 Sep 2018 16:54:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEAA62B761; Fri, 7 Sep 2018 16:54:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 338E42B74B for ; Fri, 7 Sep 2018 16:54:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727125AbeIGVgD (ORCPT ); Fri, 7 Sep 2018 17:36:03 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:56150 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbeIGVgC (ORCPT ); Fri, 7 Sep 2018 17:36:02 -0400 Received: from pps.filterd (m0148461.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w87GmCJW001033; Fri, 7 Sep 2018 09:54:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=IHd+o/y27bcNh11PbhX79Xxdw+65wKbS+IufV3cHfkU=; b=CNNaPLTfhUdKIHpfRVQzh7PaJbWys5wh910MqeEgDbuCMNA5CFYpJv6RllLm5MsAiLxS 9Cph48TSZ2p8IN/eos2Q0s4HZtycOuuE8dXcu/XRab/yARW/cwonCiR/VWPlEStCqUVf M2iYlSudqq7f/rVMhzqncJ/lHWvJtvYMaoA= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2mbv1wg7y0-11 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 07 Sep 2018 09:54:12 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.34) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 7 Sep 2018 12:52:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IHd+o/y27bcNh11PbhX79Xxdw+65wKbS+IufV3cHfkU=; b=QGK3RfU1/ftfHTzyp5EN59paj/Trj9IUfAxdRrBdszz+hu1WO2Lp4oIWSPFUo2fsMn4s0YF0JN9ZL1gK54PNhKIOgFS7u9PB/oEtbX0ANF2upCxHYPY3vidoXFrR6JhDvFwg3eHP1RwOREXmhZZW2ikfxbnpbQVFSNUkOGCh8qY= Received: from vall.thefacebook.com (2620:10d:c090:200::4:cd5) by CY4PR15MB1223.namprd15.prod.outlook.com (2603:10b6:903:10a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.15; Fri, 7 Sep 2018 16:52:44 +0000 From: To: CC: , Roman Gushchin , Tejun Heo , , , , Subject: [PATCH 1/2] Fix cg_read_strcmp() Date: Fri, 7 Sep 2018 09:49:23 -0700 Message-ID: <20180907164924.13789-2-jgkamat@fb.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180907164924.13789-1-jgkamat@fb.com> References: <20180905010827.27743-1-jgkamat@fb.com> <20180907164924.13789-1-jgkamat@fb.com> MIME-Version: 1.0 X-Originating-IP: [2620:10d:c090:200::4:cd5] X-ClientProxiedBy: AM6PR06CA0004.eurprd06.prod.outlook.com (2603:10a6:20b:14::17) To CY4PR15MB1223.namprd15.prod.outlook.com (2603:10b6:903:10a::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1f0bc7ee-e6b5-4173-519b-08d614e2573f X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:CY4PR15MB1223; X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1223;3:oasVOySsYLxO7EJUkV4bIkztA0g584GqOpFgTob/MNqPojmIgQgZiurCCW3x977Ht3Cte5TZLmQWkTYXJh4bnnH3bd8xu0/erXsysn1CFBGO7N4SZyXPyv7KKIiFr3CbRDTZzZEAnT+UNjITDXcCK2x+VkwwJf4Kc8S1+eA2k14zpRBphhFD7v/2JH6NHB3AsOeU1WLKQX4/ofZeKLRX22L+D0q4IWQnRclUtMlY10BiiF2qWpOiTaNwFjMR+o+j;25:HLA5K1x07ztjjmzTxrh2N4zVT6PhEaOdTSXGymPMLEn396Nk5Z08DukUwETt2ArJbhU6vMTB2ZUQg77mlaG6fsc37UCm1OnA0hjiqW6leUWz8MRk++XmcBVuXtt+jCho+5tq/2ahiKDO8HMtmxvXhgkXNv6WNnPGWgMxDukDAdpXOVczoJ7OWnOjIMYgkk/kCV07274vCDqBJXYaCLhsdkKFDxNZGvi78MzPY98Zyl0cNiVjgCzATzbn7AG2SlwzBortbz3T6mx/BFA3E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rVKm8OLFZx7G5dA3dvuezhWiO7D5RGUsSClL1ay/4EsEjSvEyczO/rbfDUWoBhklZhfnZimRlK6SuKsn+3BQNJipUqTPluUqAQtMXjDlj4ZJG9GdgbGHqDPQXYRLMC8XPimxuCiYgkRhbSAYAr/P/y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(93006095)(93001095)(3231311)(11241501184)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699050);SRVR:CY4PR15MB1223;BCL:0;PCL:0;RULEID:;SRVR:CY4PR15MB1223; X-Forefront-PRVS: 07880C4932 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(366004)(396003)(136003)(376002)(39860400002)(199004)(189003)(46003)(11346002)(97736004)(446003)(53416004)(5660300001)(6486002)(7736002)(85782001)(6512007)(9686003)(52396003)(105586002)(305945005)(106356001)(8676002)(476003)(186003)(86362001)(52116002)(53936002)(16526019)(1076002)(6116002)(2616005)(51416003)(36756003)(69596002)(386003)(6506007)(48376002)(33896004)(2351001)(25786009)(47776003)(316002)(50226002)(76176011)(68736007)(50466002)(54906003)(4326008)(16586007)(2906002)(2361001)(486006)(8936002)(39060400002)(478600001)(81156014)(6666003)(81166006)(6916009)(85772001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR15MB1223;H:vall.thefacebook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1223;23:/SPP/RJ+y73eGTled43z8kj7QNlQivIDizx3KR9OG+CRXl0PeGhdAB5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k4gQa/ve5GWBDg8rjSlTkyG8+Y4w==;5:jKhAieDN0O2yyguT2yARfhj1NfEikzRQOA9cJuKlovcHVGwI+eDXP3ObEMhuQJiZl79tHTrdLhbuGwkmOknaI6OjUvDUE28Vp0B91a1EX8nvOXsKb1pxB6Ng/Uh4ScKwAm/nuIt0SzzKgzJac6kwym+LmKdC3gJaYMb3X2/bt8A=;7:2m655iS+o99K6GAmMcoXluCadpDNMBWH5TT6BkrQUwsmcm2Mt1qPdDQxq1sQuDVLGL3HYJeBQwKEHs/mpsruTINa2hpGX+FqBseg5mo1egmo3mqk4Dw2FClio4Z7EyNJTzjXnLiRaxPBBOdQv3mu0djNbCNNbaoY6OkjJkqUsF0v7WC8wXW+8zjOIv8x7bggSy/26JoXYiOD01ZSK+oLrJ8vg6AY4JBxRsunTdyRgcf7Je3ccmitFFIfqR3LdGs0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1223;20:7t1e3VYZlHZZ2sCf3I7K3kfEuSSr70jjpUOLJzYO/XJkEVJBWcXKSSMaRsXLUTgms/v9L69ANO01CSnAMpPSQMcbfuyGg5KtYZm60hz1vGPXbUJatsRrfa8du2dakzVToRlAVcBzeZ63jEf68YC5DlcB6XIwlIGKGXflBLZcd7Q= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2018 16:52:44.8931 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f0bc7ee-e6b5-4173-519b-08d614e2573f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1223 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-07_08:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jay Kamat Fix a couple issues with cg_read_strcmp(), to improve correctness of cgroup tests - Fix cg_read_strcmp() always returning 0 for empty "needle" strings - Fix a memory leak in cg_read_strcmp() Fixes: 84092dbcf901 ("selftests: cgroup: add memory controller self-tests") Signed-off-by: Jay Kamat Acked-by: Roman Gushchin --- tools/testing/selftests/cgroup/cgroup_util.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/cgroup/cgroup_util.c b/tools/testing/selftests/cgroup/cgroup_util.c index 1e9e3c470561..8b644ea39725 100644 --- a/tools/testing/selftests/cgroup/cgroup_util.c +++ b/tools/testing/selftests/cgroup/cgroup_util.c @@ -89,17 +89,28 @@ int cg_read(const char *cgroup, const char *control, char *buf, size_t len) int cg_read_strcmp(const char *cgroup, const char *control, const char *expected) { - size_t size = strlen(expected) + 1; + size_t size; char *buf; + int ret; + + /* Handle the case of comparing against empty string */ + if (!expected) + size = 32; + else + size = strlen(expected) + 1; buf = malloc(size); if (!buf) return -1; - if (cg_read(cgroup, control, buf, size)) + if (cg_read(cgroup, control, buf, size)) { + free(buf); return -1; + } - return strcmp(expected, buf); + ret = strcmp(expected, buf); + free(buf); + return ret; } int cg_read_strstr(const char *cgroup, const char *control, const char *needle) From patchwork Fri Sep 7 16:49:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Kamat X-Patchwork-Id: 10592385 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6E303112B for ; Fri, 7 Sep 2018 16:54:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 576F02B74B for ; Fri, 7 Sep 2018 16:54:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B8122B761; Fri, 7 Sep 2018 16:54:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 839442B74B for ; Fri, 7 Sep 2018 16:54:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727423AbeIGVgG (ORCPT ); Fri, 7 Sep 2018 17:36:06 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:46534 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726043AbeIGVgF (ORCPT ); Fri, 7 Sep 2018 17:36:05 -0400 Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.16.0.22/8.16.0.22) with SMTP id w87GrTEa028946; Fri, 7 Sep 2018 09:54:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=C6oZi6bo3+TOf8RbEZOGXxwGb1fEuv52x8d0UxzZu4c=; b=DMmuT9+whTGlvsdBMph+a9/PsvC7lkBqbd5jUvWfomGwgeF0Jawn6NCIw9hQVbbpOSpZ av7Z147aBLrHKNR3nTDF5MnBcOPitN7MvkZvRHXmt6h+6FzHoHy/G2lXOKNQoOiEWXpU aN9BtJRPL0eQki4zENVgy8uQhUnBTJq1WRY= Received: from maileast.thefacebook.com ([199.201.65.23]) by m0001303.ppops.net with ESMTP id 2mbr548uke-5 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 07 Sep 2018 09:54:14 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.24) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 7 Sep 2018 12:52:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C6oZi6bo3+TOf8RbEZOGXxwGb1fEuv52x8d0UxzZu4c=; b=h5ZO0Tu8n2pGdnm9h5Z6QlK5KQyxmcHhkLL/G9I9CrrruJOsJcS5MV4K9d05D+cTpnBUUTB+TZDEtZ/jqlxTr/J5YAJBf9LVmW9VQ8dEf5MOunXrhdQ4Ty+yamjT/S3fA+C1BxaSH3A0CWz5elyVwxrpCPjDalOBhBB86csbcSo= Received: from vall.thefacebook.com (2620:10d:c090:200::4:cd5) by CY4PR15MB1223.namprd15.prod.outlook.com (2603:10b6:903:10a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.15; Fri, 7 Sep 2018 16:52:50 +0000 From: To: CC: , Roman Gushchin , Tejun Heo , , , , Subject: [PATCH 2/2] Add tests for memory.oom.group Date: Fri, 7 Sep 2018 09:49:24 -0700 Message-ID: <20180907164924.13789-3-jgkamat@fb.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180907164924.13789-1-jgkamat@fb.com> References: <20180905010827.27743-1-jgkamat@fb.com> <20180907164924.13789-1-jgkamat@fb.com> MIME-Version: 1.0 X-Originating-IP: [2620:10d:c090:200::4:cd5] X-ClientProxiedBy: AM6PR06CA0004.eurprd06.prod.outlook.com (2603:10a6:20b:14::17) To CY4PR15MB1223.namprd15.prod.outlook.com (2603:10b6:903:10a::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e13f2f50-7503-4f39-9c19-08d614e25a60 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:CY4PR15MB1223; X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1223;3:8Cixqm6M6GBWTcbZkVrnX8LNxQUEFPU2cBWcNQofMtu69nv9RN38EhhWmMPs5AG+RSpdRyrSPviOKRtBzRXCprVc0FfeJo4qEhcwY2I9xxcNipaJBXSNJ04e9zh/89Gty2om2fo3VqD/U/TAg6YeQr8MAJtk4yO8RzR7uCsf1RIaK8PRaHGMEg9g38S4+UDAsFKDlcx9af1zLReT6oWT6I1xjPvYDkUeC5NzMihuBUCDhnrIwvxg4PR87sBidjvD;25:tFu2FmwXu1QwxIRVUR44LnGL3AQHzFchGbQPpYEfuS4Zigo4VJgnMJZzQSuCQvYfqbJ29CWS8TpoLQYGXfVoCcwpUCzDiYJpPYZvaWeiphUdHPkUtNaOXbQ1DeIABekOhJHcFJ27Y7jgHI5gN5QNmGfhROaisiyZ0sg5nNKtxA+sWvQ+02xa1YkJfG1FZU2js5VVwKLNeR1yi81+F8/23qEe4NNlNS267veZ+geYwAT6svvPXaX6enm/AN5gj+xdB2PpvE8cZfp+JFsI/fMXeijp8umfunfeCVzHfiX1EOMaUmMMGW5ghnNn3hsozzYqBzQSdStP8FlgvrCBJebwnQ==;31:bPq00OMiqy3ihsdf9eI/Na71ww+6FMDSumlz6IC4DiIxldUvIl++EclTNNsyxJdOU32c8qoW/8Iq/miAotL/ClJf5zHjIGYdaguIxK6y4nWmr0nQLKuJtTJbwuJBumFBV+GIkciGYcWzGsLkSZz86cliyUUrfr5mrwzjA+Rpmxz4X68fV4wKpkVh+KfNb9A5Xkt3LG848EETYxVYYxPJZfawmTskyG2r4CeqNDo89qA= X-MS-TrafficTypeDiagnostic: CY4PR15MB1223: X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1223;20:8ROiX6RuxfwwFnXpgO05XaJnzH/qKyWolcKBu73xuPwoDe/r6LdRxTxF1+WrbsO5BtfZBrOna5T8yIhfa1kuAYQHMy9SEd5vMVgV156oZtG7cOuoeQtgWLe8z2aMHA1u79WJr5HbrNciG7ahHz+G4OCzpJA542KeYvgG6uw3Yi7zD8fqleYNm3WVfohQYQ6LYxbEg0JdFxo+LqY2DnnVMG/i+K3y5wuym2SpCAUaIxJmHQRCZ/fDwIAPs41P5mnDKI1mKL1xgHhhG+xUhA5ytOR6rih1vkfzdBt02+ia/KH9XW7GU5JM/jqsRgqbr/r9W9s2MHWy1k03zFjDjyrXCn6ZxickMWFiwjqm67tvcDTnEXA0RSMDqJuhA7MxplNqtzkLI9hAzLGP2azLaIGF5Z+viwf5Lp4aW1m9HyOdxVWXqzAOLjBq/BQSnW+0F+XgZdzT2FrCTUkdB2WmaVdHlc6EZbzwEgm6VNqZPLAsTKfWL1b5jvnkk0jSifjwxJ29;4:eIIBwH38cX4AkczSq98M9y+RCT8Pj2yQm43cVw02c6w+P4ySdxCJayAlZu6pEVpmQqiMCSprquih5a/S6wUiFM4z3OtWaU34Ny7ZARp2waVS+zr8guDT0tF0PTzfRSp2PeQtrl0yIuEl+gO4duBrc4D9JOj4vyR+dsFInobCdffTeycrwfN4u980ldd6KrU1sJUfeByg49qIkm4GssrAcWukJzfhtRnE+jkOGkp5RP/II/JGa0frmag61uWKz6dRFyowVYdqus8Bc9oMGLyCKqeHTtJWDhdPRaiAgAsFxlCoGW7eQIemL7Uk73VZzs5n X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(93006095)(93001095)(3231311)(11241501184)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699050);SRVR:CY4PR15MB1223;BCL:0;PCL:0;RULEID:;SRVR:CY4PR15MB1223; X-Forefront-PRVS: 07880C4932 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(366004)(396003)(136003)(376002)(39860400002)(199004)(189003)(46003)(11346002)(97736004)(446003)(53416004)(5660300001)(6486002)(7736002)(85782001)(6512007)(9686003)(52396003)(105586002)(305945005)(106356001)(8676002)(476003)(186003)(86362001)(52116002)(53936002)(16526019)(1076002)(6116002)(2616005)(51416003)(36756003)(14444005)(69596002)(386003)(6506007)(575784001)(48376002)(33896004)(2351001)(25786009)(47776003)(316002)(50226002)(76176011)(68736007)(50466002)(54906003)(4326008)(16586007)(2906002)(2361001)(486006)(8936002)(39060400002)(478600001)(81156014)(6666003)(81166006)(6916009)(85772001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR15MB1223;H:vall.thefacebook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1223;23:p8Km08avSxr/HQFGV4LTnGWhzfleK+/kM3QoSADi6EhSvHlKYAyCfNMEBWpWJYA2BlEzBttuUfZpQ/vmv/ukz6ebMoJ1tdZHbHFxbrl1kbYlDw9j2Kby4jl8uZahV/P1sGLeqtrWy/w0vtvPJIVAV5KF3pN10GqmFT1rG8JaXr4sIAj1gBKrfLVdW/Hu+ouBNk/NNEq3ltTvQRdT74foU4TRIOTfAzlBEEI0qH9dUdubHFaCyZx6Xav77OFQhF+y82KpN4MzrjUmVSUC7WbU4JjNBFaDfTFgNSc9A4wQ9O2Bcu68Gjke6+iUWNMDDvkxJQJEzMh2ZLuBn8aRyzE7n/R7HxLlva0chv52KQISbWXzvrHPO9sGNLSSzjB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PKd2HKqsPI+DjaVhPXdlxE27nudwxCddqgeaiElkDJBVtlgQqMXLmWlHrbIMzgoO8jiv0pXO0rEsGCasZA91tcLmTOS9MKV9srCQD4NAGCcuLF6J2uKUAk1gKnSFcsXJXTZGU3PHQQCnkAVrmKUhijBavvwdA4SFNF96cyqbWusWcAGR422HGX2FdRI53HFSVkywVTdAu3Xl SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1223;20:VBXIGivT9PkSekFZm6vmGbsPpQ8F0zH3HVvbFfhnmtw6Ap4cI1pq0yGQhNVoIDiiUHuURSkJlIYXf7/VWfwdTOfO5PV2flgtNq1HuE6GKt8vsBMBNRy1vYwp6uIv7FgFqvW40jH0wpl0ZqKDawbPSWniEMxwM0pAGk5eRnYpsHg= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2018 16:52:50.1304 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e13f2f50-7503-4f39-9c19-08d614e25a60 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1223 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-07_08:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jay Kamat Add tests for memory.oom.group for the following cases: - Killing all processes in a leaf cgroup, but leaving the parent untouched - Killing all processes in a parent and leaf cgroup - Keeping processes marked by OOM_SCORE_ADJ_MIN alive when considered for being killed by the group oom killer. Signed-off-by: Jay Kamat Acked-by: Roman Gushchin --- tools/testing/selftests/cgroup/cgroup_util.c | 21 ++ tools/testing/selftests/cgroup/cgroup_util.h | 1 + .../selftests/cgroup/test_memcontrol.c | 205 ++++++++++++++++++ 3 files changed, 227 insertions(+) diff --git a/tools/testing/selftests/cgroup/cgroup_util.c b/tools/testing/selftests/cgroup/cgroup_util.c index 8b644ea39725..e0db048331cb 100644 --- a/tools/testing/selftests/cgroup/cgroup_util.c +++ b/tools/testing/selftests/cgroup/cgroup_util.c @@ -340,3 +340,24 @@ int is_swap_enabled(void) return cnt > 1; } + +int set_oom_adj_score(int pid, int score) +{ + char path[PATH_MAX]; + int fd, len; + + sprintf(path, "/proc/%d/oom_score_adj", pid); + + fd = open(path, O_WRONLY | O_APPEND); + if (fd < 0) + return fd; + + len = dprintf(fd, "%d", score); + if (len < 0) { + close(fd); + return len; + } + + close(fd); + return 0; +} diff --git a/tools/testing/selftests/cgroup/cgroup_util.h b/tools/testing/selftests/cgroup/cgroup_util.h index fe82a297d4e0..cabd43fd137a 100644 --- a/tools/testing/selftests/cgroup/cgroup_util.h +++ b/tools/testing/selftests/cgroup/cgroup_util.h @@ -39,3 +39,4 @@ extern int get_temp_fd(void); extern int alloc_pagecache(int fd, size_t size); extern int alloc_anon(const char *cgroup, void *arg); extern int is_swap_enabled(void); +extern int set_oom_adj_score(int pid, int score); diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c index cf0bddc9d271..28d321ba311b 100644 --- a/tools/testing/selftests/cgroup/test_memcontrol.c +++ b/tools/testing/selftests/cgroup/test_memcontrol.c @@ -2,6 +2,7 @@ #define _GNU_SOURCE #include +#include #include #include #include @@ -202,6 +203,36 @@ static int alloc_pagecache_50M_noexit(const char *cgroup, void *arg) return 0; } +static int alloc_anon_noexit(const char *cgroup, void *arg) +{ + int ppid = getppid(); + + if (alloc_anon(cgroup, arg)) + return -1; + + while (getppid() == ppid) + sleep(1); + + return 0; +} + +/* + * Wait until processes are killed asynchronously by the OOM killer + * If we exceed a timeout, fail. + */ +static int cg_test_proc_killed(const char *cgroup) +{ + int limit; + + for (limit = 10; limit > 0; limit--) { + if (cg_read_strcmp(cgroup, "cgroup.procs", "") == 0) + return 0; + + usleep(100000); + } + return -1; +} + /* * First, this test creates the following hierarchy: * A memory.min = 50M, memory.max = 200M @@ -964,6 +995,177 @@ static int test_memcg_sock(const char *root) return ret; } +/* + * This test disables swapping and tries to allocate anonymous memory + * up to OOM with memory.group.oom set. Then it checks that all + * processes in the leaf (but not the parent) were killed. + */ +static int test_memcg_oom_group_leaf_events(const char *root) +{ + int ret = KSFT_FAIL; + char *parent, *child; + + parent = cg_name(root, "memcg_test_0"); + child = cg_name(root, "memcg_test_0/memcg_test_1"); + + if (!parent || !child) + goto cleanup; + + if (cg_create(parent)) + goto cleanup; + + if (cg_create(child)) + goto cleanup; + + if (cg_write(parent, "cgroup.subtree_control", "+memory")) + goto cleanup; + + if (cg_write(child, "memory.max", "50M")) + goto cleanup; + + if (cg_write(child, "memory.swap.max", "0")) + goto cleanup; + + if (cg_write(child, "memory.oom.group", "1")) + goto cleanup; + + cg_run_nowait(parent, alloc_anon_noexit, (void *) MB(60)); + cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1)); + cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1)); + if (!cg_run(child, alloc_anon, (void *)MB(100))) + goto cleanup; + + if (cg_test_proc_killed(child)) + goto cleanup; + + if (cg_read_key_long(child, "memory.events", "oom_kill ") <= 0) + goto cleanup; + + if (cg_read_key_long(parent, "memory.events", "oom_kill ") != 0) + goto cleanup; + + ret = KSFT_PASS; + +cleanup: + if (child) + cg_destroy(child); + if (parent) + cg_destroy(parent); + free(child); + free(parent); + + return ret; +} + +/* + * This test disables swapping and tries to allocate anonymous memory + * up to OOM with memory.group.oom set. Then it checks that all + * processes in the parent and leaf were killed. + */ +static int test_memcg_oom_group_parent_events(const char *root) +{ + int ret = KSFT_FAIL; + char *parent, *child; + + parent = cg_name(root, "memcg_test_0"); + child = cg_name(root, "memcg_test_0/memcg_test_1"); + + if (!parent || !child) + goto cleanup; + + if (cg_create(parent)) + goto cleanup; + + if (cg_create(child)) + goto cleanup; + + if (cg_write(parent, "memory.max", "80M")) + goto cleanup; + + if (cg_write(parent, "memory.swap.max", "0")) + goto cleanup; + + if (cg_write(parent, "memory.oom.group", "1")) + goto cleanup; + + cg_run_nowait(parent, alloc_anon_noexit, (void *) MB(60)); + cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1)); + cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1)); + + if (!cg_run(child, alloc_anon, (void *)MB(100))) + goto cleanup; + + if (cg_test_proc_killed(child)) + goto cleanup; + if (cg_test_proc_killed(parent)) + goto cleanup; + + ret = KSFT_PASS; + +cleanup: + if (child) + cg_destroy(child); + if (parent) + cg_destroy(parent); + free(child); + free(parent); + + return ret; +} + +/* + * This test disables swapping and tries to allocate anonymous memory + * up to OOM with memory.group.oom set. Then it checks that all + * processes were killed except those set with OOM_SCORE_ADJ_MIN + */ +static int test_memcg_oom_group_score_events(const char *root) +{ + int ret = KSFT_FAIL; + char *memcg; + int safe_pid; + + memcg = cg_name(root, "memcg_test_0"); + + if (!memcg) + goto cleanup; + + if (cg_create(memcg)) + goto cleanup; + + if (cg_write(memcg, "memory.max", "50M")) + goto cleanup; + + if (cg_write(memcg, "memory.swap.max", "0")) + goto cleanup; + + if (cg_write(memcg, "memory.oom.group", "1")) + goto cleanup; + + safe_pid = cg_run_nowait(memcg, alloc_anon_noexit, (void *) MB(1)); + if (set_oom_adj_score(safe_pid, OOM_SCORE_ADJ_MIN)) + goto cleanup; + + cg_run_nowait(memcg, alloc_anon_noexit, (void *) MB(1)); + if (!cg_run(memcg, alloc_anon, (void *)MB(100))) + goto cleanup; + + if (cg_read_key_long(memcg, "memory.events", "oom_kill ") != 3) + goto cleanup; + + if (kill(safe_pid, SIGKILL)) + goto cleanup; + + ret = KSFT_PASS; + +cleanup: + if (memcg) + cg_destroy(memcg); + free(memcg); + + return ret; +} + + #define T(x) { x, #x } struct memcg_test { int (*fn)(const char *root); @@ -978,6 +1180,9 @@ struct memcg_test { T(test_memcg_oom_events), T(test_memcg_swap_max), T(test_memcg_sock), + T(test_memcg_oom_group_leaf_events), + T(test_memcg_oom_group_parent_events), + T(test_memcg_oom_group_score_events), }; #undef T