From patchwork Wed Aug 6 12:01:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 4685401 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1D3479F375 for ; Wed, 6 Aug 2014 12:01:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 145D720145 for ; Wed, 6 Aug 2014 12:01:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4956320136 for ; Wed, 6 Aug 2014 12:01:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755554AbaHFMBg (ORCPT ); Wed, 6 Aug 2014 08:01:36 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:45415 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755553AbaHFMBf (ORCPT ); Wed, 6 Aug 2014 08:01:35 -0400 Received: by mail-lb0-f178.google.com with SMTP id c11so1859157lbj.9 for ; Wed, 06 Aug 2014 05:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=7lQb5z7XfeoD2A48rPiPkwVFOyFYVxLIugtv7wCJzC8=; b=zYZwIFgNqbxR0F+r4MnEErerNkx1SGHK3od8bgBNdPORI3GmjG3ychEmDMQU/yz/Ey E1nJpE41B7Bm2+uoTj7ipRhjtl641R4nLuWQV+8m6b7OrX/V1rA3o8/bXW6SxljdPs2T HSAW7kZPd4GvOKGjSx5T1UWe4r91K5PzE7Jm/jBQvhyz65au6s0gXrfOHSTDSbFEV0IV /BWBu+BaUO24tvRB4G7OayXWin/aNYMCKa+7QZHWc1Q3MHUH3RglgxyEfXx2dxT14I99 Jto/j8vL2b13p3g5zsihV7qJde3j9G3MUIJsg9tyTzwpw/mvQLI5/UlFGFrMsnjjBrsk MAmA== X-Received: by 10.112.202.69 with SMTP id kg5mr10318245lbc.33.1407326493858; Wed, 06 Aug 2014 05:01:33 -0700 (PDT) Received: from localhost.localdomain ([92.43.3.121]) by mx.google.com with ESMTPSA id xl2sm1136496lbb.47.2014.08.06.05.01.32 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Aug 2014 05:01:32 -0700 (PDT) From: Pavel Shilovsky To: Steve Dickson Cc: linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, Jeff Layton Subject: [PATCH 5/5] special: fix op_unlk and op_ren tests output Date: Wed, 6 Aug 2014 16:01:12 +0400 Message-Id: <1407326472-13853-6-git-send-email-pshilovsky@samba.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1407326472-13853-1-git-send-email-pshilovsky@samba.org> References: <1407326472-13853-1-git-send-email-pshilovsky@samba.org> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 Signed-off-by: Pavel Shilovsky --- special/op_ren.c | 16 +++++++++++++--- special/op_unlk.c | 8 +++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/special/op_ren.c b/special/op_ren.c index 348b4f9..93b02c5 100644 --- a/special/op_ren.c +++ b/special/op_ren.c @@ -32,6 +32,8 @@ #define TBUFSIZ 100 static char wbuf[TBUFSIZ], rbuf[TBUFSIZ]; +static char bufa[BUFSIZ]; +static char bufb[BUFSIZ]; #define TMSG "This is a test message written to the target file\n" static void @@ -120,13 +122,19 @@ main(argc, argv) #endif /* O_RDWR */ printf("nfsjunk files before rename:\n "); - system("ls -al .nfs*"); + sprintf(bufa, "ls -al %s", taname); + sprintf(bufb, "ls -al %s", tbname); + system(bufa); + printf(" "); + system(bufb); ret = rename(taname, tbname); printf("%s open; rename ret = %d\n", tbname, ret); if (ret) xxit(" unlink"); printf("nfsjunk files after rename:\n "); - system("ls -al .nfs*"); + system(bufa); + printf(" "); + system(bufb); strcpy(wbuf, TMSG); if ((ret = write(fd, wbuf, TBUFSIZ)) != TBUFSIZ) { fprintf(stderr, "write ret %d; expected %d\n", ret, TBUFSIZ); @@ -165,7 +173,9 @@ main(argc, argv) } printf("nfsjunk files after close:\n "); - system("ls -al .nfs*"); + system(bufa); + printf(" "); + system(bufb); if ((ret = close(fd)) == 0) { errcount++; diff --git a/special/op_unlk.c b/special/op_unlk.c index 93a09b0..d92aa22 100644 --- a/special/op_unlk.c +++ b/special/op_unlk.c @@ -33,6 +33,7 @@ #define TBUFSIZ 100 static char wbuf[TBUFSIZ], rbuf[TBUFSIZ]; +static char buf[BUFSIZ]; #define TMSG "This is a test message written to the unlinked file\n" static void @@ -78,13 +79,14 @@ main(argc, argv) #ifndef WIN32 /* For WIN you can not delete the file if it is open */ printf("nfsjunk files before unlink:\n "); - system("ls -al .nfs*"); + sprintf(buf, "ls -al %s", tname); + system(buf); ret = unlink(tname); printf("%s open; unlink ret = %d\n", tname, ret); if (ret) xxit(" unlink"); printf("nfsjunk files after unlink:\n "); - system("ls -al .nfs*"); + system(buf); #endif strcpy(wbuf, TMSG); if ((ret = write(fd, wbuf, TBUFSIZ)) != TBUFSIZ) { @@ -137,7 +139,7 @@ main(argc, argv) #ifndef WIN32 printf("nfsjunk files after close:\n "); - system("ls -al .nfs*"); + system(buf); #endif if ((ret = close(fd)) == 0) {