From patchwork Thu May 11 06:55:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9721031 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 1377E60364 for ; Thu, 11 May 2017 06:55:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F1712865A for ; Thu, 11 May 2017 06:55:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 043C22866C; Thu, 11 May 2017 06:55:05 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 E814E2865A for ; Thu, 11 May 2017 06:55:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754536AbdEKGzC (ORCPT ); Thu, 11 May 2017 02:55:02 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33896 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754559AbdEKGzA (ORCPT ); Thu, 11 May 2017 02:55:00 -0400 Received: by mail-wm0-f68.google.com with SMTP id d127so4663235wmf.1; Wed, 10 May 2017 23:55:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=75FsUCaSNrObVdzL26hktZU1Lz6Y+hOy1w1wcZeXUcA=; b=b2SJXXJzBwkAeLRAtdVxYsCmfO6UwdM3YW94GQMEpHQrQIwnsaTNpIVG7aiKThfMEU VDTcFmNyteRyETshTH88m5py0NQnGx1nvUnMBJEa5QLBVqKbi18XtiKoWnP3SvjBykGZ D5Y0aec5gyp1Ub+pG5kn+um9pMvDVwGvVZtM+/p6Zt6VtAavjI/YS3ecaUTxnvA0xHIH G7wrGIq5df7tiYzBih8xLYcixk/5xmv9NHG6RID8srwbG9qqpmB/MihHAtiByu/Xy1+I QdkgxvEeeUXeIK7Msw+xHEXsiTROyLjl6tc8B99Tupkj037B3cWEBbtB4JWO1+jxTwjx D+zg== 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; bh=75FsUCaSNrObVdzL26hktZU1Lz6Y+hOy1w1wcZeXUcA=; b=hzRrYV+9GZ3FrMwJP5CkZxP9Tpm9O9j6c9PmMVist/MN94pQMXx7RjNjFAMzq9QxKX sHrLfnX7hFucU3EYVg8OIlTBiOw4Mfogx5tVEOi8vFTtlZC+dSY+bhwTkG6u5Rl+V3Xk kvOZH/gmGGBi2co4KrDqTDkBh5xbthkZPhLEeqq8qNUDTMD857+JHTDI7On261Ub7xHw HhIrf/b2u+08zCcnDxjCTNKuw9/HvjUuFkO5PWF968N6/Cnem1Gp/LW4JNUwnB5iJ6i2 Ltb0TnpzsthJSfnfFzVE/X/hjQiceCWh0/l4Cb1jVbKl0qmYr9AcXqGUs+ip4wvpXh2x Dfrg== X-Gm-Message-State: AODbwcAjPAOvR0SmkoVVYniTNppk3aYhqaPwuCd/ZOKLrl9ThVfIyMIT 6vDa0zQRvdf+Rdlg X-Received: by 10.28.230.16 with SMTP id d16mr6247017wmh.108.1494485699283; Wed, 10 May 2017 23:54:59 -0700 (PDT) Received: from amir-VirtualBox.ctera.local (bzq-166-168-31-246.red.bezeqint.net. [31.168.166.246]) by smtp.gmail.com with ESMTPSA id j126sm1281825wmd.29.2017.05.10.23.54.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 May 2017 23:54:58 -0700 (PDT) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , Xiong Zhou , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 2/4] overlay/017: use t_dir_type to find file by d_ino Date: Thu, 11 May 2017 09:55:08 +0300 Message-Id: <1494485710-2400-3-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494485710-2400-1-git-send-email-amir73il@gmail.com> References: <1494485710-2400-1-git-send-email-amir73il@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'find -ino' is this test was supposed to filter files by inode number that was recorded with 'ls -i' to compare st_ino returned by stat(2) with d_ino returned by getdents64(2). It turns out that on some systems, 'find -ino' uses stat(2) for filtering by inode number, which is not what we want. Use the auxiliary program t_dir_type to filter files by inode number instead. Signed-off-by: Amir Goldstein --- tests/overlay/017 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/overlay/017 b/tests/overlay/017 index fabfbb5..bb467f7 100755 --- a/tests/overlay/017 +++ b/tests/overlay/017 @@ -56,6 +56,7 @@ _supported_fs overlay _supported_os Linux _require_scratch _require_test_program "af_unix" +_require_test_program "t_dir_type" rm -f $seqres.full @@ -107,7 +108,7 @@ function check_inode_numbers() # Test constant readdir(3)/getdents(2) d_ino - # Expect to find file by inode number cat $before | while read ino f; do - find $dir/ -maxdepth 1 -inum $ino | grep -q $f || \ + $here/src/t_dir_type $dir $ino | grep -q $f || \ echo "$f not found by ino $ino (from $before)" done }