strace/tests/printstr.test
Dmitry V. Levin a3c2e4e20b printstr_ex: fix decoding of non-NUL-terminated strings when len == -1
Do not treat len == -1 in any special way.  All users who need the
string to be handled as a NUL-terminated string set QUOTE_0_TERMINATED
bit in user_style flags already.

* util.c (printstr_ex): Remove (len == -1) check.
* tests/printstr.c: New file.
* tests/printstr.test: New test.
* tests/.gitignore: Add printstr.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add printstr.test.
2016-12-25 11:32:45 +00:00

7 lines
137 B
Bash
Executable File

#!/bin/sh
# Check decoding of non-NUL-terminated strings when len == -1.
. "${srcdir=.}/init.sh"
run_strace_match_diff -e trace=writev