IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
* tests/execve.c (main): Use one page gap between two mapped regions
for an address that is more likely to be not yet mapped.
* tests/execveat.c (main): Likewise.
* tests/mmap.c (main): Change output format from regexp to verbatim.
Add tests for madvise, mlockall, mremap, and msync syscalls.
* tests/mmap.test: Convert from match_grep to match_diff.
Add madvise, mlockall, mremap, and msync syscalls to syscall filter.
* socketutils.c (cache_and_print_inode_details): Make "details"
parameter const.
(print_sockaddr_by_inode_cached): Make "e" variable const.
(inet_send_query): Make struct nlmsghdr and struct inet_diag_req_v2
members const. Make "msg" variable const.
(inet_parse_response): Make "data" parameter and diag_msg variable const.
(receive_responses): Make "h" and "rc" variables const.
(unix_send_query): Make struct nlmsghdr and struct unix_diag_req
members const. Make "msg" variable const.
(unix_print): Make all parameters const.
(print_sockaddr_by_inode): Make proto_name parameter const.
* socketutils.c (tcp_v4_print, udp_v4_print, tcp_v6_print,
udp_v6_print): New functions.
(print_sockaddr_by_inode): Make "protocols" array static, replace
"family" and "protocol" members with "print" in its underlying
structure. Iterate through protocols array when the protocol name
is specified.
Check that -f -p attaches and follows all threads of the given pid.
* tests/attach-f-p.c: New file.
* tests/attach-f-p.test: New test.
* tests/.gitignore: Add attach-f-p.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(attach_f_p_LDADD): New variable.
(TESTS): Add attach-f-p.test.
Some files are used conditionally depending on architecture and
configuration. Create a library for the purpose of keeping such
compilation units.
* Makefile.am (strace_LDADD, noinst_LIBRARIES): Add libstrace.a.
(libstrace_a_CPPFLAGS): New variable, set to $(strace_CPPFLAGS).
(libstrace_a_CFLAGS): New variable, set to $(strace_CFLAGS).
(libstrace_a_SOURCES): New variable, set to upeek.c.
* util.c (upeek): Move ...
* upeek.c: ... here.
* tests/utime.c (main): Check decoding of NULL struct utimbuf pointer.
Check decoding of struct utimbuf located at the end of page boundary.
* tests/utime.test: Update.
* tests/sysinfo.c (main): Check decoding of NULL struct sysinfo pointer.
Check decoding of struct sysinfo located at the end of page boundary.
* tests/sysinfo.test: Update.
* tests/adjtimex.c (main): Check decoding of NULL struct timex pointer.
Check decoding of struct timex located at the end of page boundary.
* tests/adjtimex.test: Update.
* strace.c (open_dev_null): Rename to open_dummy_desc. All callers
changed. Create a pipe and return its first descriptor instead of
opening /dev/null.
Otherwise, -oLOGFILE may end up using one of them. This conflicts
with the previous change, which closes stdin/out in strace.
* strace.c (init): If fcntl(F_GETFD) fails on stdin or stdout,
sanitize them: open /dev/null and dup it until fds 0,1,2
are all used up.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Testcase:
{ sleep 1; yes | head -n99999; } | strace -o/dev/null sh -c 'exec <&-; sleep 9'
The writer (head) will be able to perform writes to write end of the pipe.
With strace call removed, head will immediately get SIGPIPE.
This change fixes this: now writer immediately gets SIGPIPE with strace too.
* strace.c (startup_child): Close stdin/out and reopen them to /dev/null.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Check that -o |pipe_command works. In particular, check that
strace waits for completion of piped command.
* tests/opipe.test: New test.
* tests/Makefile.am (TESTS): Add it.
* strace-graph: A clone() followed by exit() with no intervening fork
or execve resulted in the new pid having no seq key. That breaks when
trying to use seq as an array reference. Ensure that clone populates
the new pid with an empty seq entry.
* strace-graph: Set "use strict" and "use warnings" options. Fix errors
detected by strict/warnings. $result is really a string, it can be "-1"
followed by an error text.
* tests/readlink.c (PREFIX, TARGET, LINKPATH): New macros.
(main): Allocate memory for string and buffer passed to the syscall
being tested using tail_alloc mechanism. Create and cleanup test
symlink. Test syscall error path output. Print hexquoted strings
using hexquote_strndup.
* tests/readlinkat.c: Likewise.
* tests/readlink.test: Remove creation and cleanup of test symlinks.