Re: [PATCH] tests: add -a option cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Jul 13, 2016 at 07:35:01PM +0800, Tim Wang wrote:
> Signed-off-by: Tim Wang <timwang@xxxxxxxxxxxx>

This is a good start.  However it needs some more.

First, you should have some tests which actually check that the
generated blobs have the correct alignment.

Second, you should check more than just one alignment.

> ---
>  tests/run_tests.sh | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/run_tests.sh b/tests/run_tests.sh
> index 7eb9b3d..6aed6d6 100755
> --- a/tests/run_tests.sh
> +++ b/tests/run_tests.sh
> @@ -579,9 +579,10 @@ fdtput_tests () {
>      dts=label01.dts
>      dtb=$dts.fdtput.test.dtb
>      text=lorem.txt
> +    align=64
>  
>      # Allow just enough space for $text
> -    run_dtc_test -O dtb -p $(stat -c %s $text) -o $dtb $dts
> +    run_dtc_test -O dtb -p $(stat -c %s $text) -a $align -o $dtb $dts
>  
>      # run_fdtput_test <expected-result> <file> <node> <property> <flags> <value>
>      run_fdtput_test "a_model" $dtb / model -ts "a_model"
> @@ -600,7 +601,7 @@ fdtput_tests () {
>      run_fdtput_test "$(cat $text $text)" $dtb /randomnode blob -ts "$(cat $text $text)"
>  
>      # Start again with a fresh dtb
> -    run_dtc_test -O dtb -p $(stat -c %s $text) -o $dtb $dts
> +    run_dtc_test -O dtb -p $(stat -c %s $text) -a $align -o $dtb $dts
>  
>      # Node creation
>      run_wrap_error_test $DTPUT $dtb -c /baldrick sod
> @@ -628,7 +629,7 @@ fdtput_tests () {
>      run_wrap_test $DTPUT $dtb -cp /chosen/son
>  
>      # Start again with a fresh dtb
> -    run_dtc_test -O dtb -p $(stat -c %s $text) -o $dtb $dts
> +    run_dtc_test -O dtb -p $(stat -c %s $text) -a $align -o $dtb $dts
>  
>      # Node delete
>      run_wrap_test $DTPUT $dtb -c /chosen/node1 /chosen/node2 /chosen/node3

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux