Commit c9b26b81 authored by David Drysdale's avatar David Drysdale Committed by Linus Torvalds

syscalls: add selftest for execveat(2)

Signed-off-by: default avatarDavid Drysdale <drysdale@google.com>
Cc: Meredydd Luff <meredydd@senatehouse.org>
Cc: Shuah Khan <shuah.kh@samsung.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rich Felker <dalias@aerifal.cx>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 27d6ec7a
......@@ -15,6 +15,7 @@ TARGETS += user
TARGETS += sysctl
TARGETS += firmware
TARGETS += ftrace
TARGETS += exec
TARGETS_HOTPLUG = cpu-hotplug
TARGETS_HOTPLUG += memory-hotplug
......
subdir*
script*
execveat
execveat.symlink
execveat.moved
execveat.path.ephemeral
execveat.ephemeral
execveat.denatured
xxxxxxxx*
\ No newline at end of file
CC = $(CROSS_COMPILE)gcc
CFLAGS = -Wall
BINARIES = execveat
DEPS = execveat.symlink execveat.denatured script subdir
all: $(BINARIES) $(DEPS)
subdir:
mkdir -p $@
script:
echo '#!/bin/sh' > $@
echo 'exit $$*' >> $@
chmod +x $@
execveat.symlink: execveat
ln -s -f $< $@
execveat.denatured: execveat
cp $< $@
chmod -x $@
%: %.c
$(CC) $(CFLAGS) -o $@ $^
run_tests: all
./execveat
clean:
rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx*
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment