mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
mips: add regression test for fadvise64
Add regression tests for fadvise64. Change by A Rikalo. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16175
This commit is contained in:
parent
6c8edf155a
commit
55c565435d
@ -4356,6 +4356,8 @@ AC_CONFIG_FILES([
|
||||
memcheck/tests/ppc32/Makefile
|
||||
memcheck/tests/ppc64/Makefile
|
||||
memcheck/tests/s390x/Makefile
|
||||
memcheck/tests/mips32/Makefile
|
||||
memcheck/tests/mips64/Makefile
|
||||
memcheck/tests/vbit-test/Makefile
|
||||
cachegrind/Makefile
|
||||
cachegrind/tests/Makefile
|
||||
|
||||
@ -10,6 +10,12 @@ endif
|
||||
if VGCONF_ARCHS_INCLUDE_AMD64
|
||||
SUBDIRS += amd64
|
||||
endif
|
||||
if VGCONF_ARCHS_INCLUDE_MIPS32
|
||||
SUBDIRS += mips32
|
||||
endif
|
||||
if VGCONF_ARCHS_INCLUDE_MIPS64
|
||||
SUBDIRS += mips64
|
||||
endif
|
||||
if VGCONF_ARCHS_INCLUDE_PPC32
|
||||
SUBDIRS += ppc32
|
||||
endif
|
||||
@ -50,7 +56,7 @@ endif
|
||||
|
||||
DIST_SUBDIRS = x86 amd64 ppc32 ppc64 s390x linux \
|
||||
darwin solaris x86-linux amd64-linux arm64-linux \
|
||||
x86-solaris amd64-solaris \
|
||||
x86-solaris amd64-solaris mips32 mips64 \
|
||||
common .
|
||||
|
||||
dist_noinst_SCRIPTS = \
|
||||
|
||||
8
memcheck/tests/mips32/Makefile.am
Normal file
8
memcheck/tests/mips32/Makefile.am
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.tool-tests.am
|
||||
|
||||
EXTRA_DIST = $(noinst_SCRIPTS) \
|
||||
fadvise64.stderr.exp fadvise64.stdout.exp fadvise64.vgtest
|
||||
|
||||
check_PROGRAMS = \
|
||||
fadvise64
|
||||
21
memcheck/tests/mips32/fadvise64.c
Normal file
21
memcheck/tests/mips32/fadvise64.c
Normal file
@ -0,0 +1,21 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define BAD_FD 42
|
||||
|
||||
int main() {
|
||||
int x;
|
||||
|
||||
(void)posix_fadvise(x, 1, 2, POSIX_FADV_NORMAL);
|
||||
(void)posix_fadvise(BAD_FD, x, 2, POSIX_FADV_NORMAL);
|
||||
(void)posix_fadvise(BAD_FD, 1, x, POSIX_FADV_NORMAL);
|
||||
(void)posix_fadvise(BAD_FD, 1, 2, x);
|
||||
|
||||
x = posix_fadvise(BAD_FD, 1, 2, POSIX_FADV_NORMAL);
|
||||
|
||||
if (x != EBADF)
|
||||
fprintf(stderr, "Unexpected return value: %d\n", x);
|
||||
|
||||
return 0;
|
||||
}
|
||||
24
memcheck/tests/mips32/fadvise64.stderr.exp
Normal file
24
memcheck/tests/mips32/fadvise64.stderr.exp
Normal file
@ -0,0 +1,24 @@
|
||||
Syscall param fadvise64(fd) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:10)
|
||||
|
||||
Syscall param fadvise64(offset_low) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:11)
|
||||
|
||||
Syscall param fadvise64(offset_high) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:11)
|
||||
|
||||
Syscall param fadvise64(len_low) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:12)
|
||||
|
||||
Syscall param fadvise64(len_high) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:12)
|
||||
|
||||
Syscall param fadvise64(advice) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:13)
|
||||
|
||||
0
memcheck/tests/mips32/fadvise64.stdout.exp
Normal file
0
memcheck/tests/mips32/fadvise64.stdout.exp
Normal file
2
memcheck/tests/mips32/fadvise64.vgtest
Normal file
2
memcheck/tests/mips32/fadvise64.vgtest
Normal file
@ -0,0 +1,2 @@
|
||||
prog: fadvise64
|
||||
vgopts: -q
|
||||
3
memcheck/tests/mips32/filter_stderr
Executable file
3
memcheck/tests/mips32/filter_stderr
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/sh
|
||||
|
||||
../filter_stderr "$@"
|
||||
8
memcheck/tests/mips64/Makefile.am
Normal file
8
memcheck/tests/mips64/Makefile.am
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.tool-tests.am
|
||||
|
||||
EXTRA_DIST = $(noinst_SCRIPTS) \
|
||||
fadvise64.stderr.exp fadvise64.stdout.exp fadvise64.vgtest
|
||||
|
||||
check_PROGRAMS = \
|
||||
fadvise64
|
||||
1
memcheck/tests/mips64/fadvise64.c
Symbolic link
1
memcheck/tests/mips64/fadvise64.c
Symbolic link
@ -0,0 +1 @@
|
||||
../mips32/fadvise64.c
|
||||
16
memcheck/tests/mips64/fadvise64.stderr.exp
Normal file
16
memcheck/tests/mips64/fadvise64.stderr.exp
Normal file
@ -0,0 +1,16 @@
|
||||
Syscall param fadvise64(fd) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:10)
|
||||
|
||||
Syscall param fadvise64(offset) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:11)
|
||||
|
||||
Syscall param fadvise64(len) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:12)
|
||||
|
||||
Syscall param fadvise64(advice) contains uninitialised byte(s)
|
||||
...
|
||||
by 0x........: main (fadvise64.c:13)
|
||||
|
||||
0
memcheck/tests/mips64/fadvise64.stdout.exp
Normal file
0
memcheck/tests/mips64/fadvise64.stdout.exp
Normal file
2
memcheck/tests/mips64/fadvise64.vgtest
Normal file
2
memcheck/tests/mips64/fadvise64.vgtest
Normal file
@ -0,0 +1,2 @@
|
||||
prog: fadvise64
|
||||
vgopts: -q
|
||||
3
memcheck/tests/mips64/filter_stderr
Executable file
3
memcheck/tests/mips64/filter_stderr
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/sh
|
||||
|
||||
../filter_stderr "$@"
|
||||
Loading…
x
Reference in New Issue
Block a user