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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
These manual tests are obsoleted by fork-f.test and vfork-f.test.
* test/fork.c: Remove.
* test/vfork.c: Remove.
* test/Makefile (PROGS): Remove fork and vfork.
* test/.gitignore: Remove fork and vfork.
Check how strace -f follows fork and vfork syscalls.
* tests/fork-f.c: New file.
* tests/fork-f.test: New test.
* tests/vfork-f.c: New file.
* tests/vfork-f.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add fork-f and vfork-f.
(TESTS): Add fork-f.test and vfork-f.test.
* tests/.gitignore: Add fork-f and vfork-f.
On architectures that use dedicated registers to report syscall errors,
check for syscall error condition regardless of SYSCALL_NEVER_FAILS flag
in the syscall entry. On architectures that use negated errno
semantics, there is no way to distinguish a syscall error from a valid
return code that looks like a syscall error, and the check for
SYSCALL_NEVER_FAILS flag remains the only way to tell one case
from another.
* linux/alpha/get_error.c (get_error): Ignore check_errno.
* linux/ia64/get_error.c: Likewise.
* linux/mips/get_error.c: Likewise.
* linux/nios2/get_error.c: Likewise.
* linux/powerpc/get_error.c: Likewise.
* linux/sparc/get_error.c: Likewise.
* linux/sparc64/get_error.c: Likewise.
Despite being marked as SYSCALL_NEVER_FAILS, personality syscall still
might report a failure on some architectures due to obscure kernel
bugs. Check for this unlikely case and let users know that their
kernel has gone bananas.
* personality.c (SYS_FUNC(personality)): Do not parse syscall return
value in case of syserror.
This should not be a user visible change unless the kernel does
something completely unexpected. In the latter case, let user see
what is going on.
* uid.c (SYS_FUNC(getuid), SYS_FUNC(setfsuid)): Do not truncate
tcp->u_rval to uid_t on exiting syscall, return RVAL_DECODED.
* xlat/personality_options.in: Split into ...
* xlat/personality_types.in: ... personality types and ...
* xlat/personality_flags.in: ... personality flags.
* personality.c: Include "xlat/personality_types.h"
and "xlat/personality_flags.h" instead of "xlat/personality_options.h".
(SYS_FUNC(personality)): Print PER_MASK part of personality as
a symbolic value, and the rest of personality as a set of flags.
* tests/personality.c (main): Add more test cases.
* tests/personality.test: Update.
Value 0xffffffff of personality syscall first argument has a special
meaning, it is not a set of personality flags.
* personality.c (SYS_FUNC(personality)): If personality equals
to 0xffffffff, print it verbatim.
* tests/personality.c (main): Test it.
* personality.c (SYS_FUNC(personality)): On entering syscall,
print first argument not as a hex value but as a set of flags.
On exiting syscall, print return code as a set of flags.
* NEWS: Mention this enhancement.
Starting with commit
v2.6.29-6609-g11d06b2a1e5658f448a308aa3beb97bacd64a940, personality
syscall never fails to set the personality, but before commit
v2.6.35-rc1-372-g485d527 it still could return an error.
Starting with that commit, personality syscall never returns an error.
* linux/*/syscallent.h: Set SYSCALL_NEVER_FAILS flag in personality
syscall entries.
Starting with commit v4.9-46-g681452b that removed all references
to acl.h, we no longer use acl development library.
* .travis.yml (addons.apt.packages): Remove libacl1-dev.
* strace.spec (BuildRequires): Remove libacl-devel.
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't. This
change fixes the inconsistency by adding missing copyright headers.
It doesn't mean that copyright headers became maintained. In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
The syscall_name argument was subject to macro expansion because
it was passed down to other macros before it was prefixed.
musl libc defines lfs64 names as macros (e.g. fstat64 as fstat)
so SYS_FUNC(fstat64) was expanded to sys_fstat.
This change adds the prefix before the name is passed to other macros,
i.e. the argument of SYS_FUNC_NAME is already prefixed with sys_.
* defs.h (SYS_FUNC): Add sys_ prefix to SYS_FUNC_NAME's argument.
(SYS_FUNC_NAME): Do not add sys_ prefix to MPERS_FUNC_NAME's argument.
* linux/ia64/syscallent.h (SYS_FUNC_NAME): Do not add sys_ prefix
to MPERS_FUNC_NAME's argument.
* syscall.c (SEN_NAME): Remove.
(SEN): Replace SEN_NAME call with its definition. Add sys_ prefix
to SYS_FUNC_NAME's argument.
As glibc times wrapper on x32 is known to wrongly truncate and then sign
extend the syscall return value, invoke the syscall directly on x32.
* tests/times.c (main) [__NR_times && __x86_64__ && __ILP32__]:
Invoke times syscall using inline asm.
* mpers.awk (array_seq): New function.
(what_is): Use it for printing filler names. Tweak return types.
* mpers_test.sh: Use a more complicated sample type to test mpers
machinery.
Make mpers.awk check for potential index loops. Such loops should not
normally happen, but mpers.awk will not go into infinite recursion if
they do.
* mpers.awk (enter, leave): New functions.
(what_is): Use them.
Make mpers.awk check that accessed elements of the main array that
are expected to have non-empty values really meet this requirement.
* mpers.awk (array_get): New function.
(what_is, END): Use it.
* mpers_test.sh: Use a more complicated type to test mpers machinery.
Reported-by: Mike Frysinger <vapier@gentoo.org>
As arm kernels used to overwrite ARM_r0 with -EINTR after
ERESTART_RESTARTBLOCK, update regexp to workaround this.
* tests/restart_syscall.c (main) [__arm__]: Add 0xfffffffc as a valid
alternative value for the first argument of restarted nanosleep syscall.
Follow the x86_64 example and define registers in arm_pt_regs
as unsigned, to avoid potential sign extension bugs.
This also fixes --enable-gcc-Werror build.
* linux/aarch64/arch_regs.c (arm_pt_regs): Change uregs's type
from int to uint32_t.
Reported-by: Sergey Bolshakov <sbolshakov@altlinux.org>
Check that syscall names and numbers defined in syscallent files
match kernel __NR_* constants defined by <asm/unistd.h>.
Tested on various platforms, including the following combinations
of architectures and kernel headers:
x86_64: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.12, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
i386: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
aarch64: 4.4-rc
alpha: 4.3
arm eabi: 4.4-rc, 4.2, 4.1
hppa: 3.18
ia64: 3.18
mips o32: 4.1
ppc: 3.18
ppc64: 3.10-rhel, 2.6.32-rhel
s390: 3.18
s390x: 3.18
sparc: 4.1
sparc: 3.18
x32: 3.19
The only platform which is known at this moment to fail the test
is CentOS-5 provided by OBS. On x86_64 instance it fails with
error: "prlimit64" syscall #300 is "fanotify_init" in syscallent.h
and on i586 it similarly fails with
error: "prlimit64" syscall #338 is "fanotify_init" in syscallent.h
So this is a real platform bug that is not likely to be worked around
on the strace side.
* tests/ksysent.c: New file.
* tests/ksysent.sed: Likewise.
* tests/ksysent.test: New test.
* tests/Makefile.am (AM_CPPFLAGS): Add -I$(builddir).
(check_PROGRAMS): Add ksysent.
(TESTS): Add ksysent.test.
(EXTRA_DIST): Add ksysent.sed.
(ksysent.h): New rule.
(BUILT_SOURCES, CLEANFILES): Add ksysent.h.
* tests/.gitignore: Add ksysent.
Printing of ia32 syscalls on ia64 must have been broken for a long time.
Do not pretend that it works, print ia32 syscalls using printargs
instead.
* linux/ia64/syscallent.h: Remove all redefinitions of sys_* macros.
Stop including"../dummy.h". Include "../i386/syscallent.h" with
SYS_FUNC_NAME macro temporarily redirected to printargs.