From patchwork Tue Aug 25 10:06:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ari Sundholm X-Patchwork-Id: 7070731 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CAD0CC05AC for ; Tue, 25 Aug 2015 10:12:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9B0C2087D for ; Tue, 25 Aug 2015 10:12:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83AB920877 for ; Tue, 25 Aug 2015 10:12:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751816AbbHYKMk (ORCPT ); Tue, 25 Aug 2015 06:12:40 -0400 Received: from nebula-exfe-01.nebula.fi ([83.145.198.163]:52690 "EHLO ex10.nebula.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751763AbbHYKMk (ORCPT ); Tue, 25 Aug 2015 06:12:40 -0400 X-Greylist: delayed 324 seconds by postgrey-1.27 at vger.kernel.org; Tue, 25 Aug 2015 06:12:40 EDT Received: from [192.168.75.117] (194.100.106.190) by ex10.nebula.fi (83.145.198.163) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 25 Aug 2015 13:07:14 +0300 Message-ID: <1440497203.29614.1.camel@ari-macbook> Subject: [PATCH] busybox compat: use stat -c instead of stat --format From: Ari Sundholm To: Date: Tue, 25 Aug 2015 13:06:43 +0300 Organization: Tuxera Inc. X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-Originating-IP: [194.100.106.190] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ari Sundholm Signed-off-by: Ari Sundholm Reviewed-by: Eryu Guan --- tests/generic/040 | 4 ++-- tests/generic/041 | 2 +- tests/generic/104 | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/generic/040 b/tests/generic/040 index c841fbc..b44a433 100755 --- a/tests/generic/040 +++ b/tests/generic/040 @@ -122,9 +122,9 @@ _mount_flakey # The fstests framework automatically calls fsck after a test is run, so we # don't need to call fsck explicitly here. -echo "Link count before rm foo_link_*: $(stat --format=%h $SCRATCH_MNT/foo)" +echo "Link count before rm foo_link_*: $(stat -c %h $SCRATCH_MNT/foo)" rm -f $SCRATCH_MNT/foo_link_* -echo "Link count after rm foo_link_*: $(stat --format=%h $SCRATCH_MNT/foo)" +echo "Link count after rm foo_link_*: $(stat -c %h $SCRATCH_MNT/foo)" cat $SCRATCH_MNT/foo status=0 diff --git a/tests/generic/041 b/tests/generic/041 index f38b662..50fb26f 100755 --- a/tests/generic/041 +++ b/tests/generic/041 @@ -116,7 +116,7 @@ _mount_flakey # the hard links and read the file's data. This is just to verify we don't # get stale file handle errors (due to dangling directory index entries that # point to inodes that no longer exist). -echo "Link count: $(stat --format=%h $SCRATCH_MNT/foo)" +echo "Link count: $(stat -c %h $SCRATCH_MNT/foo)" [ -f $SCRATCH_MNT/foo ] || echo "Link foo is missing" for ((i = 1; i <= 3003; i++)); do name=foo_link_`printf "%04d" $i` diff --git a/tests/generic/104 b/tests/generic/104 index eeb7363..fef3583 100755 --- a/tests/generic/104 +++ b/tests/generic/104 @@ -81,8 +81,8 @@ _load_flakey_table $FLAKEY_ALLOW_WRITES _mount_flakey # Now verify both our files have a link count of 2. -echo "Link count for file foo: $(stat --format=%h $SCRATCH_MNT/testdir/foo)" -echo "Link count for file bar: $(stat --format=%h $SCRATCH_MNT/testdir/bar)" +echo "Link count for file foo: $(stat -c %h $SCRATCH_MNT/testdir/foo)" +echo "Link count for file bar: $(stat -c %h $SCRATCH_MNT/testdir/bar)" # We should be able to remove all the links of our files in testdir, and after # that the parent directory should become empty and therefore possible to