Pramod, thank you for reporting your environment.
(I got the report privately.)
After some code reading both kernel and glibc I guess glibc you are using
disables fadvise64 used in posix_fadvise. I hope we can detect it with
__NR_fadvise64 constant. The following patch terminates the tests if
__NR_fadvise64 is 0.
In other word this patch handles following output:
> posix_fadvise01 1 FAIL : unexpected returnd value - 38 : Function not
> implemented, advise 0 - expected 0
> <<<test_start>>>
> tag=posix_fadvise03_64 stime=2430
> cmdline=" posix_fadvise03_64"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> posix_fadvise03 1 FAIL : call succeeded unexpectedly
I still don't understand why these calls are succeeded.
Could you tell me the name of distribution you are using?
Or could you give me the output of
$ strace POSIX_FADVISE03_64
Here POSIX_FADVISE03_64 stands for the complete path to the
executable of posix_fadvise03_64 test case file.
Masatake YAMATO
Index: posix_fadvise01.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/fadvise/posix_fadvise01.c,v
retrieving revision 1.1
diff -u -r1.1 posix_fadvise01.c
--- posix_fadvise01.c 22 Nov 2007 13:58:24 -0000 1.1
+++ posix_fadvise01.c 7 Jan 2008 11:32:21 -0000
@@ -44,6 +44,11 @@
#include "test.h"
#include "usctest.h"
+#include "linux_syscall_numbers.h"
+#ifndef _FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 32
+#endif
+
void setup();
void cleanup();
@@ -76,6 +81,14 @@
int i;
+ /* Check this system has fadvise64 system which is used
+ in posix_fadvise. */
+ if ((_FILE_OFFSET_BITS != 64) && (__NR_fadvise64 == 0)) {
+ tst_resm(TWARN, "This test can only run on kernels that
implements ");
+ tst_resm(TWARN, "fadvise64 which is used from posix_fadvise");
+ exit(0);
+ }
+
/*
* parse standard options
*/
Index: posix_fadvise02.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/fadvise/posix_fadvise02.c,v
retrieving revision 1.1
diff -u -r1.1 posix_fadvise02.c
--- posix_fadvise02.c 22 Nov 2007 13:58:25 -0000 1.1
+++ posix_fadvise02.c 7 Jan 2008 11:32:21 -0000
@@ -42,9 +42,15 @@
#include <signal.h>
#include <errno.h>
+
#include "test.h"
#include "usctest.h"
+#include "linux_syscall_numbers.h"
+#ifndef _FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 32
+#endif
+
void setup();
void cleanup();
@@ -80,6 +86,14 @@
int i;
+ /* Check this system has fadvise64 system which is used
+ in posix_fadvise. */
+ if ((_FILE_OFFSET_BITS != 64) && (__NR_fadvise64 == 0)) {
+ tst_resm(TWARN, "This test can only run on kernels that
implements ");
+ tst_resm(TWARN, "fadvise64 which is used from posix_fadvise");
+ exit(0);
+ }
+
/*
* parse standard options
*/
Index: posix_fadvise03.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/fadvise/posix_fadvise03.c,v
retrieving revision 1.1
diff -u -r1.1 posix_fadvise03.c
--- posix_fadvise03.c 22 Nov 2007 13:58:25 -0000 1.1
+++ posix_fadvise03.c 7 Jan 2008 11:32:21 -0000
@@ -48,6 +48,11 @@
#include "test.h"
#include "usctest.h"
+#include "linux_syscall_numbers.h"
+#ifndef _FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 32
+#endif
+
void setup();
void cleanup();
@@ -102,6 +107,14 @@
int advise;
+ /* Check this system has fadvise64 system which is used
+ in posix_fadvise. */
+ if ((_FILE_OFFSET_BITS != 64) && (__NR_fadvise64 == 0)) {
+ tst_resm(TWARN, "This test can only run on kernels that
implements ");
+ tst_resm(TWARN, "fadvise64 which is used from posix_fadvise");
+ exit(0);
+ }
+
/*
* parse standard options
*/
Index: posix_fadvise04.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/fadvise/posix_fadvise04.c,v
retrieving revision 1.2
diff -u -r1.2 posix_fadvise04.c
--- posix_fadvise04.c 18 Dec 2007 11:02:24 -0000 1.2
+++ posix_fadvise04.c 7 Jan 2008 11:32:22 -0000
@@ -42,9 +42,15 @@
#include <signal.h>
#include <errno.h>
+
#include "test.h"
#include "usctest.h"
+#include "linux_syscall_numbers.h"
+#ifndef _FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 32
+#endif
+
void setup();
void cleanup();
@@ -79,6 +85,14 @@
char *msg; /* message returned from parse_opts */
int i;
+ /* Check this system has fadvise64 system which is used
+ in posix_fadvise. */
+ if ((_FILE_OFFSET_BITS != 64) && (__NR_fadvise64 == 0)) {
+ tst_resm(TWARN, "This test can only run on kernels that
implements ");
+ tst_resm(TWARN, "fadvise64 which is used from posix_fadvise");
+ exit(0);
+ }
+
/* Disable test if the version of the kernel is less than 2.6.16 */
if((tst_kvercmp(2,6,16)) < 0) {
tst_resm(TWARN, "This test can only run on kernels that are ");
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list