From patchwork Mon May 30 19:29:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Gruenbacher X-Patchwork-Id: 9142099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A6EB760777 for ; Mon, 30 May 2016 19:29:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BB5528183 for ; Mon, 30 May 2016 19:29:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 900572819E; Mon, 30 May 2016 19:29:46 +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=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI 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 4235F28183 for ; Mon, 30 May 2016 19:29:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161962AbcE3T3k (ORCPT ); Mon, 30 May 2016 15:29:40 -0400 Received: from mail-vk0-f48.google.com ([209.85.213.48]:35398 "EHLO mail-vk0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161960AbcE3T3i (ORCPT ); Mon, 30 May 2016 15:29:38 -0400 Received: by mail-vk0-f48.google.com with SMTP id d127so72571364vkh.2 for ; Mon, 30 May 2016 12:29:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=/sbnEvqZ3PJPt2Oyz6+Yq/GmtfZEKynGkTUGVc4umls=; b=M1bvew0QY6XFgyiR8dnxw1h09T55D0fxg1hIx+DrHVhCGjkQ53VB+uDj8iWZ8sBChe 8mk6gDcPZ9LqcpALnm3w1LCjHLkr1NiBoE3jvLdW/0NTMMPWRD2O/hiqLQLnlYOYmJ1j FKSHZeu647KEuzWqwS3szfpT9QYYVI0u8WMiB3i5gerN69HuCE70fyM7Hz/LhfQLFIdy uLn5JRF8Je2DFXIhEZ5Ee4bo8CqA8Jv1D+xMMw6ykSYN7U5UgdYW138PIms/KLPA7FIM OcS2rI71fZrZEyTmeWIEotKCAdQ0FnwQlU6N1tV1jH8t1NPGq5So4eJ9b3vLcqxJBbmv YwDw== X-Gm-Message-State: ALyK8tLAF3oTiv79JCYqiIvOOanJg4OjxCMAT6m7hoQRd3CyVFtvrLyPorJLlQAlmjgJzAS6FrMMMis/+iT/G723 MIME-Version: 1.0 X-Received: by 10.176.64.100 with SMTP id h91mr15110835uad.92.1464636577698; Mon, 30 May 2016 12:29:37 -0700 (PDT) Received: by 10.159.36.211 with HTTP; Mon, 30 May 2016 12:29:37 -0700 (PDT) In-Reply-To: References: <1464598653-3656-1-git-send-email-agruenba@redhat.com> Date: Mon, 30 May 2016 21:29:37 +0200 Message-ID: Subject: Re: [PATCH v3 00/17] Xattr inode operation removal From: Andreas Gruenbacher To: sedat.dilek@gmail.com Cc: Alexander Viro , linux-fsdevel , Tyler Hicks , ecryptfs@vger.kernel.org, Miklos Szeredi , linux-unionfs@vger.kernel.org, Mimi Zohar , linux-ima-devel@lists.sourceforge.net, LSM , David Howells , Serge Hallyn , Dmitry Kasatkin , Paul Moore , Stephen Smalley , Eric Paris , Casey Schaufler , Oleg Drokin , Andreas Dilger Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, May 30, 2016 at 8:51 PM, Sedat Dilek wrote: > Which "trusted." line or lines shall I remove? You can try something like the attached patch. Ovetall, the test case doesn't seem very useful. Thanks, Andreas diff --git a/testcases/kernel/controllers/cgroup_xattr/cgroup_xattr.c b/testcases/kernel/controllers/cgroup_xattr/cgroup_xattr.c index 492ddc7..a7c131f 100644 --- a/testcases/kernel/controllers/cgroup_xattr/cgroup_xattr.c +++ b/testcases/kernel/controllers/cgroup_xattr/cgroup_xattr.c @@ -64,9 +64,9 @@ struct tst_key { /* only security.* & trusted.* are valid key names */ static struct tst_key tkeys[] = { - { .name = "security.", .good = 1, }, + { .name = "security.", .good = 0, }, /* see setup() */ { .name = "trusted.test", .good = 1, }, - { .name = "trusted.", .good = 1, }, + { .name = "trusted.", .good = 0, }, /* see setup() */ { .name = "user.", .good = 0, }, { .name = "system.", .good = 0, }, }; @@ -141,6 +141,8 @@ static void help(void) void setup(int argc, char *argv[]) { + unsigned int i; + tst_parse_opts(argc, argv, options, help); tst_require_root(); @@ -153,17 +155,11 @@ void setup(int argc, char *argv[]) "Test must be run with kernel 3.7 or newer"); } - if (tst_kvercmp(3, 15, 0) >= 0) { - /* In kernel v3.15 cgroup was converted to kernfs - * that doesn't provide simple security namespace handlers. - * Setting just 'security.' should return EOPNOTSUPP. - */ - unsigned int i; - for (i = 0; i < ARRAY_SIZE(tkeys); ++i) { - if (!strcmp(tkeys[i].name, "security.")) { - tkeys[i].good = 0; - break; - } + for (i = 0; i < ARRAY_SIZE(tkeys); ++i) { + if (!strcmp(tkeys[i].name, "security.")) { + tkeys[i].good = tst_kvercmp(3, 15, 0) < 0; + } else if (!strcmp(tkeys[i].name, "trusted.")) { + tkeys[i].good = tst_kvercmp(4, 5, 0) < 0; } }