xfs
[Top] [All Lists]

xfstests: print the message that fallocate is not supported to stdout

To: xfs <xfs@xxxxxxxxxxx>
Subject: xfstests: print the message that fallocate is not supported to stdout
From: Boris Ranto <branto@xxxxxxxxxx>
Date: Wed, 11 May 2011 15:59:59 +0200
ltp/fsx.c tests whether the filesystem it is run on supports fallocate. If it 
is not supported the fsx will print warning to stderr.
This leads to fails of tests 075, 112, 127 for the filesystems that do not 
support fallocate. The tests use ltp/fsx but do not filter out stderr.
Since ltp/fsx.c can work without fallocate support I propose to move this 
message to stdout.

This simple patch fixes the issue for me:

Signed-off-by: Boris Ranto <branto@xxxxxxxxxx>

diff --git a/ltp/fsx.c b/ltp/fsx.c
index fe072d3..d45e8dd 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -1424,7 +1424,7 @@ main(int argc, char **argv)
 #ifdef FALLOCATE
        if (!lite && fallocate_calls) {
                if (fallocate(fd, 0, 0, 1) && errno == EOPNOTSUPP) {
-                       warn("main: filesystem does not support fallocate, 
disabling");
+                       prt("fsx: main: filesystem does not support fallocate, 
disabling
\n");
                        fallocate_calls = 0;
                } else
                        ftruncate(fd, 0);

<Prev in Thread] Current Thread [Next in Thread>
  • xfstests: print the message that fallocate is not supported to stdout, Boris Ranto <=