[PATCH] Add support for Altera's Nios-II softcore architecture
Ezequiel Garcia
ezequiel at vanguardiasur.com.ar
Sat Apr 25 16:00:45 UTC 2015
On 04/18/2015 06:56 PM, Dmitry V. Levin wrote:
> On Sat, Apr 18, 2015 at 05:46:19PM -0300, Ezequiel Garcia wrote:
[..]
>> Finally, here's a tiny example of strace running Nios-II:
>>
>> # strace ls
>> execve("/bin/ls", ["ls"], [/* 16 vars */]) = 0
>
> Does it pass "make check" tests?
>
So, I've managed to run "make check" on my Nios-II platform.
I don't have a native compiler, so I've cross-built the test programs
using "make check" on my development machine and then re-run "make check"
to run the tests.
Here's the summary for a run:
============================================================================
Testsuite summary for strace UNKNOWN
============================================================================
# TOTAL: 43
# PASS: 30
# SKIP: 5
# XFAIL: 0
# FAIL: 8
# XPASS: 0
# ERROR: 0
Some tests fail consistently. For instance, stat32-v and stat64-v tests are
failing because the pattern is expecting newfstatat, but the syscall name is
fstatat64.
Another consistent failure is the getdents test, which assume a "getdents"
syscall is present. However, it seems "getdents" syscall is deprecated.
The generic syscall ABI only mandates getdents64 and so Nios-II only implements
this one.
I'd say these failures (stat32-v, stat64-v and getdents) are false positives.
The pc test also fails consistently, claiming a pattern mismatch, but I fail
to see where. Maybe a regex guru can help here and explain it.
Then, we have a test failing randomly. Yes, that's right: randomly.
For instance, the statfs test seem to pass occassionally, but sometimes
it fails!
# strace ./strace-master/tests/statfs
[..]
statfs64("/proc/self/status", 84, {f_type=0x37f8, f_bsize=9016, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
However, this doesn't seem to be an issue with the syscall itself, but with
either strace or the ptrace implementation.
Another example is the select test. Sometimes it seem to work fine:
pselect6(2, [0 1], [0 1], [0 1], NULL, 0) = 1 ()
pselect6(-1, NULL, 0x3b74, NULL, NULL, 0) = -1 EINVAL (Invalid argument)
pselect6(1025, [0], [], NULL, {0, 100000}, 0) = 0 (Timeout)
But in the attached test-suite.log the arguments are different:
pselect6(2, [0 1], [0 1], [0 1], NULL, 0) = 1 (in [0])
pselect6(-1, NULL, 0x3b74, NULL, NULL, 0) = -1 EINVAL (Invalid argument)
pselect6(1025, [1], [], NULL, {0, 100000}, 0) = 0 (Timeout)
I'm a bit puzzled on these... :)
Any ideas?
--
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar
-------------- next part --------------
==========================================
strace UNKNOWN: tests/test-suite.log
==========================================
# TOTAL: 43
# PASS: 30
# SKIP: 5
# XFAIL: 0
# FAIL: 8
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: getdents
==============
Line 1 does not match expected pattern: ^(getdents\([0-9]+, \{(\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.", d_type=DT_(DIR|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.\.", d_type=DT_(DIR|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="(A\\n){127}Z", d_type=DT_(REG|UNKNOWN)\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.\.", d_type=DT_(DIR|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.", d_type=DT_(DIR|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="(A\\n){127}Z", d_type=DT_(REG|UNKNOWN)\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.", d_type=DT_(DIR|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="(A\\n){127}Z", d_type=DT_(REG|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.\.", d_type=DT_(DIR|UNKNOWN)\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="(A\\n){127}Z", d_type=DT_(REG|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.\.", d_type=DT_(DIR|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.", d_type=DT_(DIR|UNKNOWN)\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.\.", d_type=DT_(DIR|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="(A\\n){127}Z", d_type=DT_(REG|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.", d_type=DT_(DIR|UNKNOWN)\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="(A\\n){127}Z", d_type=DT_(REG|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.", d_type=DT_(DIR|UNKNOWN)\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_name="\.\.", d_type=DT_(DIR|UNKNOWN)\})\}, [1-9][0-9]+\)|getdents64\([0-9]+, \{(\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\."\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\.\."\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(REG|UNKNOWN), d_name="(A\\n){127}Z"\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\.\."\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\."\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(REG|UNKNOWN), d_name="(A\\n){127}Z"\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\."\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(REG|UNKNOWN), d_name="(A\\n){127}Z"\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\.\."\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(REG|UNKNOWN), d_name="(A\\n){127}Z"\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\.\."\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\."\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\.\."\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(REG|UNKNOWN), d_name="(A\\n){127}Z"\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\."\}|\{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(REG|UNKNOWN), d_name="(A\\n){127}Z"\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\."\} \{d_ino=[0-9]+, d_off=[0-9]+, d_reclen=[1-9][0-9]+, d_type=DT_(DIR|UNKNOWN), d_name="\.\."\})\}, [1-9][0-9]+\)) += [1-9][0-9]+$
getdents64(3, {{d_ino=1846013, d_off=1, d_reclen=24, d_type=DT_DIR, d_name="."} {d_ino=1845951, d_off=2, d_reclen=24, d_type=DT_DIR, d_name="."} {d_ino=0, d_off=0, d_reclen=0, d_type=DT_UNKNOWN, d_name=""}/* d_reclen < offsetof(struct dirent64, d_name) */}, 32768) = 328
getdents64(3, {}, 32768) = 0
+++ exited with 0 +++
getdents.test: failed test: ../strace -vegetdents64 ls -- getdents.test.tmp.dir output mismatch
FAIL getdents.test (exit status: 1)
SKIP: seccomp
=============
seccomp.test: skipped test: ./seccomp exited with code 77
SKIP seccomp.test (exit status: 77)
FAIL: select
============
../strace: invalid system call 'select'
Line 1 does not match expected pattern: ^p?select6?\(2, \[0 1\], \[0 1\], \[0 1\], NULL(, 0)?\) += 1 \(\)$
Line 3 does not match expected pattern: ^p?select6?\(1025, \[0\], \[\], NULL, \{0, 100(000)?\}(, 0)?\) += 0 \(Timeout\)$
pselect6(2, [0 1], [0 1], [0 1], NULL, 0) = 1 (in [0])
pselect6(-1, NULL, 0x3b74, NULL, NULL, 0) = -1 EINVAL (Invalid argument)
pselect6(1025, [1], [], NULL, {0, 100000}, 0) = 0 (Timeout)
+++ exited with 0 +++
select.test: failed test: ../strace -e,pselect6 ./select output mismatch
FAIL select.test (exit status: 1)
FAIL: sigaction
===============
Line 1 does not match expected pattern: ^rt_sigaction\(SIGUSR2, (\{SIG_IGN, \[HUP INT\], SA_RESTORER\|SA_RESTART, 0x[0-9a-f]+\}, \{SIG_DFL, \[\], 0\}, (0x[0-9a-f]+, )?(4|8|16)|\{SIG_IGN, \[HUP INT\], SA_RESTART\}, \{SIG_DFL, \[\], 0\}, (4|8|16)(, 0x[0-9a-f]+)?|\{SIG_IGN, \[HUP INT\], SA_RESTART\}, \{SIG_DFL, \[\], 0\}, 0x[0-9a-f]+, (4|8|16))\) = 0$
Line 2 does not match expected pattern: ^rt_sigaction\(SIGUSR2, (\{0x[0-9a-f]+, \[QUIT TERM\], SA_RESTORER\|SA_SIGINFO, 0x[0-9a-f]+\}, \{SIG_IGN, \[HUP INT\], SA_RESTORER\|SA_RESTART, 0x[0-9a-f]+\}, (0x[0-9a-f]+, )?(4|8|16)|\{0x[0-9a-f]+, \[QUIT TERM\], SA_SIGINFO\}, \{SIG_IGN, \[HUP INT\], SA_RESTART\}, (4|8|16)(, 0x[0-9a-f]+)?|\{0x[0-9a-f]+, \[QUIT TERM\], SA_SIGINFO\}, \{SIG_IGN, \[HUP INT\], SA_RESTART\}, 0x[0-9a-f]+, (4|8|16))\) = 0$
Line 3 does not match expected pattern: ^rt_sigaction\(SIGUSR2, (\{SIG_DFL, \[\], SA_RESTORER, 0x[0-9a-f]+\}, \{0x[0-9a-f]+, \[QUIT TERM\], SA_RESTORER\|SA_SIGINFO, 0x[0-9a-f]+\}, (0x[0-9a-f]+, )?(4|8|16)|\{SIG_DFL, \[\], 0\}, \{0x[0-9a-f]+, \[QUIT TERM\], SA_SIGINFO\}, (4|8|16)(, 0x[0-9a-f]+)?|\{SIG_DFL, \[\], 0\}, \{0x[0-9a-f]+, \[QUIT TERM\], SA_SIGINFO\}, 0x[0-9a-f]+, (4|8|16))\) = 0$
Line 4 does not match expected pattern: ^rt_sigaction\(SIGUSR2, (\{SIG_DFL, ~\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\], SA_RESTORER, 0x[0-9a-f]+\}, \{SIG_DFL, \[\], SA_RESTORER, 0x[0-9a-f]+\}, (0x[0-9a-f]+, )?(4|8|16)|\{SIG_DFL, ~\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\], 0\}, \{SIG_DFL, \[\], 0\}, (4|8|16)(, 0x[0-9a-f]+)?|\{SIG_DFL, ~\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\], 0\}, \{SIG_DFL, \[\], 0\}, 0x[0-9a-f]+, (4|8|16))\) = 0$
rt_sigaction(SIGUSR2, {SIG_IGN, [RT_1 RT_2], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [RT_1 RT_2], SA_RESTART}, {SIG_IGN, [RT_1 RT_2], SA_RESTART}, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [RT_1 RT_2], SA_RESTART}, {0x2850, [RT_3 RT_15], SA_SIGINFO}, 8) = 0
rt_sigaction(SIGUSR2, {SIG_DFL, [], 0}, {SIG_DFL, [], 0}, 8) = 0
+++ exited with 0 +++
sigaction.test: failed test: ../strace -ert_sigaction ./sigaction output mismatch
FAIL sigaction.test (exit status: 1)
FAIL: stat
==========
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00337579 s, 0.0 kB/s
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.0127176 s, 0.0 kB/s
Patterns of expected output:
ftruncate(64)?\(1, 46118400000\) += 0
lseek\(1, 46118400000, SEEK_CUR\) += 46118400000|_llseek\(1, 46118400000, \[46118400000\], SEEK_CUR\) += 0
Actual output:
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=0, st_size=0, ...}) = 0
mmap2(NULL, 64, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aac8000
close(3) = 0
openat(AT_FDCWD, "/lib/tls/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fstatat64(AT_FDCWD, "/lib/tls", 0x7fcdcf38, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0q\0\1\0\0\0\220g\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=0, st_size=0, ...}) = 0
mmap2(NULL, 104044, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aac9000
mmap2(0x2aade000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x2aade000
mmap2(0x2aae1000, 5740, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aae1000
close(3) = 0
openat(AT_FDCWD, "/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0q\0\1\0\0\0\0\35\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=0, ...}) = 0
mmap2(NULL, 33896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aae3000
mmap2(0x2aaea000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x2aaea000
close(3) = 0
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0q\0\1\0\0\0\274l\2\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaec000
mmap2(NULL, 1445956, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaed000
mmap2(0x2ac38000, 81920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14a000) = 0x2ac38000
mmap2(0x2ac4c000, 8260, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac4c000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac4f000
openat(AT_FDCWD, "/dev/null", O_RDONLY|O_LARGEFILE) = 3
dup3(3, 0, 0) = 0
close(3) = 0
_llseek(0, 0, [0], SEEK_CUR) = 0
openat(AT_FDCWD, "stat_sample", O_RDWR|O_CREAT|O_LARGEFILE, 0666) = 3
dup3(3, 1, 0) = 1
close(3) = 0
ftruncate64(1, 46118400000) = 0
ioctl(1, MTIOCGET, 0x7fcdd528) = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(1, 46118400000, [13609579006750883850], SEEK_CUR) = 0
close(0) = 0
close(1) = 0
write(2, "0+0 records in\n0+0 records out\n", 31) = 31
write(2, "0 bytes (0 B) copied", 20) = 20
write(2, ", 0.0127176 s, 0.0 kB/s\n", 24) = 24
close(2) = 0
+++ exited with 0 +++
stat.test: failed test: ../strace -edesc dd seek=46118400000 bs=1 count=0 if=/dev/null of=stat_sample output mismatch
FAIL stat.test (exit status: 1)
FAIL: stat32-v
==============
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00298917 s, 0.0 kB/s
Patterns of expected output:
(stat(64)?\(|newfstatat\(AT_FDCWD, )"stat32_sample", \{st_dev=makedev\(0, 11\), st_ino=1846126, st_mode=S_IFREG\|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0, st_size=233811181, st_atime=2001/02/03-04:05:00, st_mtime=2001/02/03-04:05:00, st_ctime=2015/04/25-15:34:43(, st_flags=[0-9]+)?(, st_fstype=[^,]*)?(, st_gen=[0-9]+)?\}(, 0)?\) += 0
Actual output:
execve("./stat32", ["./stat32", "stat32_sample"], ["HISTFILESIZE=1000", "INPUTRC=/etc/inputrc", "TEST_LOGS=strace-f.log qual_sysc"..., "USER=root", "SSH_CLIENT=192.168.0.45 50457 22", "HOSTNAME=buildroot", "SHLVL=7", "HOME=/root", "OLDPWD=/root/strace-master", "SSH_TTY=/dev/pts/0", "PAGER=/bin/more ", "PS1=# ", "MAKEFLAGS=w -- TEST_LOGS=strace-"..., "MAKE_TERMERR=/dev/pts/0", "STRACE_ARCH=nios2", "LOGNAME=root", "TERM=xterm", "PATH=/bin:/sbin:/usr/bin:/usr/sb"..., "MAKELEVEL=5", "DMALLOC_OPTIONS=debug=0x34f47d83"..., "HISTSIZE=1000", "MAKEOVERRIDES=${-*-command-varia"..., "SHELL=/bin/sh", "MAKE_TERMOUT=/dev/pts/0", "srcdir=.", "PWD=/root/strace-master/tests", "SSH_CONNECTION=192.168.0.45 5045"..., "MFLAGS=-w", "EDITOR=/bin/vi"]) = 0
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fstatat64(AT_FDCWD, "/lib/tls", 0x7ff85fa8, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
fstatat64(AT_FDCWD, "stat32_sample", {st_dev=makedev(0, 11), st_ino=1846126, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0, st_size=233811181, st_atime=2001/02/03-04:05:00, st_mtime=2001/02/03-04:05:00, st_ctime=2015/04/25-15:34:43}, 0) = 0
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
+++ exited with 0 +++
stat32-v.test: failed test: ../strace -v -efile ./stat32 stat32_sample output mismatch
FAIL stat32-v.test (exit status: 1)
FAIL: stat64-v
==============
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00337114 s, 0.0 kB/s
Patterns of expected output:
(stat(64)?\(|newfstatat\(AT_FDCWD, )"stat64_sample", \{st_dev=makedev\(0, 11\), st_ino=1846140, st_mode=S_IFREG\|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0, st_size=46118400000, st_atime=1969/12/31-23:59:18, st_mtime=1969/12/31-23:59:18, st_ctime=2015/04/25-15:34:45(, st_flags=[0-9]+)?(, st_fstype=[^,]*)?(, st_gen=[0-9]+)?\}(, 0)?\) += 0
Actual output:
execve("./stat", ["./stat", "stat64_sample"], ["HISTFILESIZE=1000", "INPUTRC=/etc/inputrc", "TEST_LOGS=strace-f.log qual_sysc"..., "USER=root", "SSH_CLIENT=192.168.0.45 50457 22", "HOSTNAME=buildroot", "SHLVL=7", "HOME=/root", "OLDPWD=/root/strace-master", "SSH_TTY=/dev/pts/0", "PAGER=/bin/more ", "PS1=# ", "MAKEFLAGS=w -- TEST_LOGS=strace-"..., "MAKE_TERMERR=/dev/pts/0", "STRACE_ARCH=nios2", "LOGNAME=root", "TERM=xterm", "PATH=/bin:/sbin:/usr/bin:/usr/sb"..., "MAKELEVEL=5", "DMALLOC_OPTIONS=debug=0x34f47d83"..., "HISTSIZE=1000", "MAKEOVERRIDES=${-*-command-varia"..., "SHELL=/bin/sh", "MAKE_TERMOUT=/dev/pts/0", "srcdir=.", "PWD=/root/strace-master/tests", "SSH_CONNECTION=192.168.0.45 5045"..., "MFLAGS=-w", "EDITOR=/bin/vi"]) = 0
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fstatat64(AT_FDCWD, "/lib/tls", 0x7fddafa8, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
fstatat64(AT_FDCWD, "stat64_sample", {st_dev=makedev(0, 11), st_ino=1846140, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=15896, st_blocks=10735171588, st_size=0, st_atime=1969/12/31-23:59:18, st_mtime=1969/12/31-23:59:18, st_ctime=2015/04/25-15:34:45}, 0) = 0
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
+++ exited with 0 +++
stat64-v.test: failed test: ../strace -v -efile ./stat stat64_sample output mismatch
FAIL stat64-v.test (exit status: 1)
FAIL: pc
========
00001000-00002000 r-xp 00000000 00:00 0 [kuser]
00002000-00003000 r-xp 00000000 00:0b 1846189 /root/strace-master/tests/pc
00003000-00004000 rw-p 00000000 00:0b 1846189 /root/strace-master/tests/pc
2aaa6000-2aac5000 r-xp 00000000 00:0b 1715074 /lib/ld-2.19.90.so
2aac5000-2aac6000 r--p 0001f000 00:0b 1715074 /lib/ld-2.19.90.so
2aac6000-2aac8000 rw-p 00020000 00:0b 1715074 /lib/ld-2.19.90.so
2aac9000-2aacb000 r-xp 00000000 00:0b 1715081 /lib/libdl-2.19.90.so
2aacb000-2aacc000 r--p 00002000 00:0b 1715081 /lib/libdl-2.19.90.so
2aacc000-2aacd000 rw-p 00003000 00:0b 1715081 /lib/libdl-2.19.90.so
2aacd000-2ac18000 r-xp 00000000 00:0b 1715076 /lib/libc-2.19.90.so
2ac18000-2ac27000 r--p 0014a000 00:0b 1715076 /lib/libc-2.19.90.so
2ac27000-2ac2c000 rw-p 00159000 00:0b 1715076 /lib/libc-2.19.90.so
2ac2c000-2ac30000 rw-p 00000000 00:00 0
7f938000-7f959000 rw-p 00000000 00:00 0 [stack]
Patterns of expected output:
\[[[:xdigit:]]{8}\] munmap\(0x[[:xdigit:]]+, 0\) += -1 .*
\[pid +3273\] \[000026e8\] --- SIGSEGV \{si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x26e8\} ---
\[pid +3273\] \[\?{8}\] \+\+\+ killed by SIGSEGV( \(core dumped\))? \+\+\+
\[\?{8}\] \+\+\+ exited with 0 \+\+\+
Actual output:
[2ab7b728] execve("./pc", ["./pc"], [/* 29 vars */]) = 0
[2aabdca0] brk(0) = 0x4000
[2aabfac8] uname({sysname="Linux", nodename="buildroot", ...}) = 0
[2aabf87c] faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[2aabf6d8] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[2aabf5fc] fstat64(3, {st_mode=S_IFREG|0644, st_size=64, ...}) = 0
[2aabf9ac] mmap2(NULL, 64, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aac8000
[2aabf954] close(3) = 0
[2aabf6d8] openat(AT_FDCWD, "/lib/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[2aabf5b8] fstatat64(AT_FDCWD, "/lib/tls", 0x7f957fb8, 0) = -1 ENOENT (No such file or directory)
[2aabf6d8] openat(AT_FDCWD, "/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
[2aabf798] read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
[2aabf5fc] fstat64(3, {st_mode=S_IFREG|0755, st_size=13928, ...}) = 0
[2aabf9ac] mmap2(NULL, 12636, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aac9000
[2aabf9ac] mmap2(0x2aacb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x2aacb000
[2aabf954] close(3) = 0
[2aabf6d8] openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[2aabf798] read(3, "\0\0\0\0\240\202\225\177\0\0\0\0\0\2\0\0\177ELF\1\1\1\0\0\0\0\0\0\0\0\0"..., 512) = 512
[2aabf5fc] fstat64(3, {st_mode=S_IFREG|0755, st_size=1438528, ...}) = 0
[2aabf9ac] mmap2(NULL, 1445956, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aacd000
[2aabf9ac] mmap2(0x2ac18000, 81920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14a000) = 0x2ac18000
[2aabf9ac] mmap2(0x2ac2c000, 8260, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac2c000
[2aabf954] close(3) = 0
[2aabf9ac] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac2f000
[2aabfa1c] mprotect(0x2ac18000, 61440, PROT_READ) = 0
[2aabfa1c] mprotect(0x2aacb000, 4096, PROT_READ) = 0
[2aabfa1c] mprotect(0x2aac5000, 4096, PROT_READ) = 0
[2aabf9f0] munmap(0x2aac8000, 64) = 0
[2aba5650] write(-1, NULL, 8) = -1 EBADF (Bad file descriptor)
[2abb1574] munmap(0x263c, 0) = -1 EINVAL (Invalid argument)
[2ab7f474] clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0) = 3273
Process 3273 attached
[pid 3272] [2ab7ebec] wait4(-1, <unfinished ...>
[pid 3273] [2abb1574] munmap(0x2000, 8192) = 0
[pid 3273] [000026e8] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x2000} ---
[pid 3273] [????????] +++ killed by SIGSEGV +++
[2ab7ebec] <... wait4 resumed> [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV}], 0, NULL) = 3273
[2ab7ebec] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=3273, si_uid=0, si_status=SIGSEGV, si_utime=0, si_stime=0} ---
[2aba5f40] close(0) = 0
[2aba51c0] openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_LARGEFILE) = 0
[2abab834] sendfile64(1, 0, NULL, 4096) = 938
[2ab7f6fc] exit_group(0) = ?
[????????] +++ exited with 0 +++
pc.test: failed test: ../strace -if ./pc output mismatch
FAIL pc.test (exit status: 1)
SKIP: unix-yy
=============
unix-yy.test: skipped test: ./netlink_unix_diag exited with code 77
SKIP unix-yy.test (exit status: 77)
SKIP: uid16
===========
uid16.test: skipped test: ./uid16 exited with code 77
SKIP uid16.test (exit status: 77)
SKIP: uid32
===========
uid32.test: skipped test: ./uid32 exited with code 77
SKIP uid32.test (exit status: 77)
FAIL: uio
=========
grep: bad regex 'pwritev\(3, \[{"\\0\\0\\0\\0", 4}\], 1, 1004211379570065135\) += 4': Invalid content of \{\}
Patterns of expected output:
pread(64)?\(3, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4
preadv\(3, \[{"\\0\\0\\0\\0", 4}\], 1, 1004211379570065135\) += 4
pwrite(64)?\(3, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4
pwritev\(3, \[{"\\0\\0\\0\\0", 4}\], 1, 1004211379570065135\) += 4
Actual output:
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=64, ...}) = 0
mmap2(NULL, 64, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aac8000
close(3) = 0
openat(AT_FDCWD, "/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fstatat64(AT_FDCWD, "/lib/tls", 0x7f963fb8, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0q\0\1\0\0\0\274l\2\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1438528, ...}) = 0
mmap2(NULL, 1445956, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aac9000
mmap2(0x2ac14000, 81920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14a000) = 0x2ac14000
mmap2(0x2ac28000, 8260, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac28000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac2b000
openat(AT_FDCWD, "/dev/zero", O_RDONLY|O_LARGEFILE) = 3
pread64(3, "\324(\0\0", 4, 1004211379570065135) = 4
preadv(3, [{"\0\0\0\0", 4}], 1, 1004211379570065135) = 4
close(3) = 0
openat(AT_FDCWD, "/dev/null", O_WRONLY|O_LARGEFILE) = 3
pwrite64(3, "\0\0\0\0", 4, 1004211379570065135) = 4
pwritev(3, [{"\0\0\0\0", 4}], 1, 1004211379570065135) = 4
close(3) = 0
+++ exited with 0 +++
uio.test: failed test: ../strace -edesc ./uio output mismatch
FAIL uio.test (exit status: 1)
SKIP: strace-k
==============
strace-k.test: skipped test: strace -k is not available
SKIP strace-k.test (exit status: 77)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150425/fd11e93a/attachment.bin>
More information about the Strace-devel
mailing list