Change strace-k.test to use chdir syscall instead of getpid syscall
because the latter is not universally available, e.g. there is no getpid
syscall on alpha.
* tests/stack-fcall-3.c (f3) <default>: Replace getpid with chdir.
* tests/strace-k.test: Likewise.
* tests/strace-k.expected: Likewise.
* tests/strace-k-demangle.expected: Likewise.
* NEWS: Mention this.
Noteworthy changes in release ?.?? (????-??-??)
===============================================
+* Bug fixes
+ * Fixed strace-k test on alpha.
+
Noteworthy changes in release 4.26 (2018-12-26)
===============================================
int f3(int i)
{
- static int pid;
-
switch (i) {
case 1:
- return kill(pid, SIGURG);
+ return kill(getpid(), SIGURG);
default:
- return (pid = getpid()) + i;
+ return chdir("") + i;
}
}
-^getpid .*(__kernel_vsyscall )?(__)?getpid ns::f3\(int\) ns::f2\(int\) ns::f1\(int\) ns::f0\(int\) main
+^chdir .*(__kernel_vsyscall )?(__)?chdir ns::f3\(int\) ns::f2\(int\) ns::f1\(int\) ns::f0\(int\) main
^SIGURG .*(__kernel_vsyscall )?(__)?kill ns::f3\(int\) ns::f2\(int\) ns::f1\(int\) ns::f0\(int\) main
-^getpid .*(__kernel_vsyscaln )?(__)?getpid f3 f2 f1 f0 main
+^chdir .*(__kernel_vsyscaln )?(__)?chdir f3 f2 f1 f0 main
^SIGURG .*(__kernel_vsyscaln )?(__)?kill f3 f2 f1 f0 main
check_prog tr
run_prog "${test_prog=../stack-fcall}"
-run_strace -e getpid -k $args
+run_strace -e chdir -k $args
expected="$srcdir/$NAME.expected"
awk '