Dmitry V. Levin
d8a81dfa40
* 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.
15 lines
214 B
Bash
Executable File
15 lines
214 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check readlink syscall decoding.
|
|
|
|
. "${srcdir=.}/init.sh"
|
|
|
|
syscall=${ME_%.test}
|
|
OUT="$LOG.out"
|
|
|
|
run_prog > /dev/null
|
|
run_strace -xx -e $syscall $args > "$OUT"
|
|
match_diff "$LOG" "$OUT"
|
|
|
|
rm -f -- "$OUT"
|