From patchwork Mon Oct 8 15:46:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael David Tinoco X-Patchwork-Id: 148415 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3807541lji; Mon, 8 Oct 2018 08:46:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV62GUCmiI+GlmtfR6WyAhjGugjWj+aA01ihOgL4thYYxBMTrb+yemfndT89jsKypE8zat4ev X-Received: by 2002:a1c:cf4e:: with SMTP id f75-v6mr15789408wmg.81.1539013592371; Mon, 08 Oct 2018 08:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539013592; cv=none; d=google.com; s=arc-20160816; b=oyLESkhw+QALJG3SaIrODdcngdsecZKLAqps8bwk1Vdpl2y64CHTKb0mgU0x+fMEfo VyOsJDEAy+Svl93Ftsz+qcn0IJwwzzPm4qAFdBcrjWJdBbBoiY8wIZvPjXy6xovKNbMy qSN/m8py7ZQWsHgGYm6XfG8S/Xd+zbZ/VgpzB+5fzfxksWqXFoqiR46lNMXc/4JGvCvV hZFbk2LzbvD29valiInu3AQB3WsJvPnkClobZuIo9SgKoOLY/o6fGkIKpdUDYhHDNoEA VK2gDVgAJH42DAYG7nTI45jXax0xE+Z1Rw2iXYBts5vnWOqi/Y7V9r7xpUo08saIXEey jIzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=1GKFR5/cCX6Y4uGaKArM7XnrTnQnIa5Kk1JEvw3dgME=; b=Q1qiMCMXY9nF8Q8cmiFMhQyTajzUmzJv5Vig/omCo3OiwgcjdJ1rjHxHzy+u2hOgjn rX7L4byJOWxtiIKMgNjKnp5Fe720obbBgpSAzDeMK/toOubfYu3fiqzF24Z0cv2SxniP VVfsj4Pkg2XRdnQk2Bj0SzkOnBN4MuAPmqmcxmJQWbTJ1I0faeg+TuW/jdVs2ty/EOq7 1tKaqOzkbOpthjBfmB040xHRGrfdKdsIAvN3gIrZBjZMBjG4KXgAcbzPPYQdQbK65eY6 ZBA4FX7qDDMPAZoVc0oKw9T/YJx822jpToGF+V8QXW1AQVTwOPaUHegd63ZfKrGisUk9 kUYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CLY1vWVE; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from picard.linux.it (picard.linux.it. [213.254.12.146]) by mx.google.com with ESMTPS id r3-v6si248034wrq.301.2018.10.08.08.46.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Oct 2018 08:46:32 -0700 (PDT) Received-SPF: pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) client-ip=213.254.12.146; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CLY1vWVE; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id EA7513E7644 for ; Mon, 8 Oct 2018 17:46:31 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) by picard.linux.it (Postfix) with ESMTP id 6BE123E660D for ; Mon, 8 Oct 2018 17:46:28 +0200 (CEST) Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 8C6CD1A0107C for ; Mon, 8 Oct 2018 17:46:27 +0200 (CEST) Received: by mail-qt1-x843.google.com with SMTP id v19-v6so21460189qtg.2 for ; Mon, 08 Oct 2018 08:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8eTR5QDN/F60Bf6g2KHwCNM5hKpBlOebc/+9T9F67UI=; b=CLY1vWVETyaFGAnrPh6DZ4u0v6QhRi/wGdenKpqP3/3yclGhk484geLxMku7zEvDXS xXLjkZ1xqWUy5Y0khuznzhKplKkqGWfUj0HauXCCEnF1ATtVs8fM3rFT/t+cwGK9LU9/ lSRpOtvgViE9PwuezH9lH8HAkfZgEJf8p/VrU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8eTR5QDN/F60Bf6g2KHwCNM5hKpBlOebc/+9T9F67UI=; b=IAp9k92h4YzVAV0gBmFeIosLfFjTfUJyVwKOHOV+NW8gtlclj6iKYQoL0sagDzQunu 0eXOL6eLARfvYrhbks9cOlaB7Fp+3/61hGWbP9hr+fUsW3IdpzP0tbpliI6jcUQSQCIE 24DLR+zrENmNOKF93iQPTjPtdUy7D19Fbun0aiXR5/3iR1YzausBJFpi8CyKx91+fIu4 ZaobRefypRazDPbf0Q8EiWVgvb5G8EIkxChWuAIfZbPCzUIuqMeTiyxpM5hl3++sVzkg lXYI2AFQkJMVPMTd6H8y+EEyulhcRxWE7Pz8J3wvqlGNMq3vlqFAnCW+HG0iycusktdf rQ6w== X-Gm-Message-State: ABuFfoi9eiNyoAUm/G90y5uWWa0PvaXLmFb/WtcGp9cRXnKnTvrrmnz8 CR5w8ZmS7IFLNt+/XjD1wrvL/7a2of4= X-Received: by 2002:ac8:2b2d:: with SMTP id 42-v6mr7712729qtu.119.1539013585997; Mon, 08 Oct 2018 08:46:25 -0700 (PDT) Received: from workstation.celeiro.br ([138.204.25.12]) by smtp.gmail.com with ESMTPSA id r20-v6sm9011229qkl.12.2018.10.08.08.46.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Oct 2018 08:46:24 -0700 (PDT) From: Rafael David Tinoco To: ltp@lists.linux.it Date: Mon, 8 Oct 2018 12:46:20 -0300 Message-Id: <20181008154620.25237-1-rafael.tinoco@linaro.org> X-Mailer: git-send-email 2.19.0.rc2 In-Reply-To: References: MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Cc: rafael.tinoco@linaro.org Subject: [LTP] [PATCH] syscalls/fsetxattr02.c: Fix missing ramdisk module error X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+patch=linaro.org@lists.linux.it Sender: "ltp" This test depends on CONFIG_BLK_DEV_RAM kernel config option. If not, then errors like: safe_macros.c:225: BROK: fsetxattr02.c:214: open(mntpoint/fsetxattr02blk,0,00) failed: ENXIO safe_macros.c:225: BROK: fgetxattr02.c:244: open(fgetxattr02blk,0,00) failed: ENXIO might happen. By using recent "needs_drivers" option we are able to mitigate this. Link: https://bugs.linaro.org/show_bug.cgi?id=4011 Signed-off-by: Rafael David Tinoco --- testcases/kernel/syscalls/fsetxattr/fsetxattr02.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/testcases/kernel/syscalls/fsetxattr/fsetxattr02.c b/testcases/kernel/syscalls/fsetxattr/fsetxattr02.c index b0d4a84fb..89279c384 100644 --- a/testcases/kernel/syscalls/fsetxattr/fsetxattr02.c +++ b/testcases/kernel/syscalls/fsetxattr/fsetxattr02.c @@ -58,6 +58,8 @@ #define BLK MNTPOINT"/fsetxattr02blk" #define SOCK "fsetxattr02sock" +#define DRVRAMDISK "brd" + struct test_case { char *fname; int fd; @@ -241,6 +243,11 @@ static void cleanup(void) } } +static const char *const needed_drivers[] = { + DRVRAMDISK, + NULL, +}; + static struct tst_test test = { .setup = setup, .test = verify_fsetxattr, @@ -249,6 +256,7 @@ static struct tst_test test = { .needs_devfs = 1, .mntpoint = MNTPOINT, .needs_root = 1, + .needs_drivers = needed_drivers, }; #else /* HAVE_SYS_XATTR_H */