mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
tests: Work around limitation in FreeBSD's printf(1)
Some of our testcases check fdtget retreiving string list properties that include internal \0 characters. We use printf(1) to generate the expected value for comparison. However, on FreeBSD, printf(1)'s %b format option can't handle \0: it will terminate that argument ignoring it and everything after. Curiously, internal \0 *is* ok in the main format string. So avoid using %b and use the format string directly instead. Link: https:/https://github.com/dgibson/dtc/issues/165 Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
52f07dcca4
commit
5b71660724
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ rm -f $LOG $EXPECT
|
||||||
trap "rm -f $LOG $EXPECT" 0
|
trap "rm -f $LOG $EXPECT" 0
|
||||||
|
|
||||||
expect="$1"
|
expect="$1"
|
||||||
printf '%b\n' "$expect" > $EXPECT
|
printf "$expect\n" > $EXPECT
|
||||||
shift
|
shift
|
||||||
|
|
||||||
verbose_run_log_check "$LOG" $VALGRIND $DTGET "$@"
|
verbose_run_log_check "$LOG" $VALGRIND $DTGET "$@"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue