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: 980643 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="CLY1vWVE"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42TPqG45g7z9s3l for ; Tue, 9 Oct 2018 02:46:33 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 4B8BA3E7580 for ; Mon, 8 Oct 2018 17:46:30 +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-Google-Smtp-Source: ACcGV63wnVko3w+xbr4nTHsl1FmKShgmJ/AnJf3dmPH9t2TkGh9hKGUUpNUnX8Jt3j1TiYxZk2INSA== 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+incoming=patchwork.ozlabs.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 */