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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04110C433FF for ; Mon, 5 Aug 2019 13:26:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C56DB20644 for ; Mon, 5 Aug 2019 13:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565011600; bh=c4qnbbbF6peffAXYg6PUmwwo6Rs0I4rNQqfhLi4h33I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SQ3tDcT2GUpqakfuG1IXQR/C1vtS5N9Rl5pcX/fCid4wrYhQDSjPlk55EvhTJPQWE MlJW9HfUZdhPnyZbCg66WsUepPHpZoW/MXh8idRaDNv/hNl+giwMb2RuVIR+RhluOT iNVWCgsoyclYqNp82Y7MMKdeAq9lASh4YP1RKOts= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731357AbfHEN0D (ORCPT ); Mon, 5 Aug 2019 09:26:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:34514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731335AbfHENZ5 (ORCPT ); Mon, 5 Aug 2019 09:25:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9889520644; Mon, 5 Aug 2019 13:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565011557; bh=c4qnbbbF6peffAXYg6PUmwwo6Rs0I4rNQqfhLi4h33I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hti7S6db3t/aH0ePoiwngVZVjjTePeB/MxSyXuk++5wbtQFDOBXlNkQyBZnunYB6B o6VtNv4oCuMkHn6GBgXQbAF3NySDNxONf1z2bOzJd3npr6YtcMSY6f+ZcEeC4on/B/ 4SLg3Vm0qcc7AIg2swaabOYmo0C9O7LomYWdC5Ds= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Down , Johannes Weiner , Tejun Heo , Roman Gushchin , Andrew Morton , Linus Torvalds Subject: [PATCH 5.2 107/131] cgroup: kselftest: relax fs_spec checks Date: Mon, 5 Aug 2019 15:03:14 +0200 Message-Id: <20190805124959.135988748@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805124951.453337465@linuxfoundation.org> References: <20190805124951.453337465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Down commit b59b1baab789eacdde809135542e3d4f256f6878 upstream. On my laptop most memcg kselftests were being skipped because it claimed cgroup v2 hierarchy wasn't mounted, but this isn't correct. Instead, it seems current systemd HEAD mounts it with the name "cgroup2" instead of "cgroup": % grep cgroup /proc/mounts cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0 I can't think of a reason to need to check fs_spec explicitly since it's arbitrary, so we can just rely on fs_vfstype. After these changes, `make TARGETS=cgroup kselftest` actually runs the cgroup v2 tests in more cases. Link: http://lkml.kernel.org/r/20190723210737.GA487@chrisdown.name Signed-off-by: Chris Down Cc: Johannes Weiner Cc: Tejun Heo Cc: Roman Gushchin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/cgroup/cgroup_util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/tools/testing/selftests/cgroup/cgroup_util.c +++ b/tools/testing/selftests/cgroup/cgroup_util.c @@ -191,8 +191,7 @@ int cg_find_unified_root(char *root, siz strtok(NULL, delim); strtok(NULL, delim); - if (strcmp(fs, "cgroup") == 0 && - strcmp(type, "cgroup2") == 0) { + if (strcmp(type, "cgroup2") == 0) { strncpy(root, mount, len); return 0; }