Dmitry V. Levin
cab745b842
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.
24 lines
310 B
C
24 lines
310 B
C
/*
|
|
* Copyright (c) 2014-2018 The strace developers.
|
|
* All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#include <signal.h>
|
|
#include <unistd.h>
|
|
|
|
#include "stack-fcall.h"
|
|
|
|
int f3(int i)
|
|
{
|
|
switch (i) {
|
|
case 1:
|
|
return kill(getpid(), SIGURG);
|
|
|
|
default:
|
|
return chdir("") + i;
|
|
}
|
|
|
|
}
|