From: Simon Glass <sjg@chromium.org>
To: Ayush Singh <ayush@beagleboard.org>
Cc: d-gole@ti.com, lorforlinux@beagleboard.org,
jkridner@beagleboard.org, robertcnelson@beagleboard.org,
nenad.marinkovic@mikroe.com, Andrew Davis <afd@ti.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Robert Nelson <robertcnelson@gmail.com>,
devicetree-compiler@vger.kernel.org
Subject: Re: [PATCH v2 2/2] tests: Add test for append-property
Date: Thu, 29 Aug 2024 19:06:28 -0600 [thread overview]
Message-ID: <CAFLszTiTR4-WLoVP7NDAWtVHYsFeVNaT84k3MLUDMYYpF7CvSQ@mail.gmail.com> (raw)
In-Reply-To: <20240830-append-v2-2-ec1e03f110ad@beagleboard.org>
Hi Ayush,
On Thu, 29 Aug 2024 at 14:04, Ayush Singh <ayush@beagleboard.org> wrote:
>
> - Test /append-property/ on a string and int array.
> - Also test on subnode property.
>
> Signed-off-by: Ayush Singh <ayush@beagleboard.org>
> ---
> tests/append_prop.dts | 21 +++++++++++++++++++++
> tests/run_tests.sh | 7 +++++++
> 2 files changed, 28 insertions(+)
>
> diff --git a/tests/append_prop.dts b/tests/append_prop.dts
> new file mode 100644
> index 0000000..248d4ed
> --- /dev/null
> +++ b/tests/append_prop.dts
> @@ -0,0 +1,21 @@
> +/dts-v1/;
> +
> +/ {
> + str-prop = "0";
> + num-prop = <2>;
> +
> + subnode{
> + str-prop = "0";
> + num-prop = <2>;
> + };
> +};
> +
> +/ {
> + /append-property/ str-prop = "1";
> + /append-property/ num-prop = <1>;
> +
> + subnode{
> + /append-property/ str-prop = "1";
> + /append-property/ num-prop = <1>;
> + };
> +};
> diff --git a/tests/run_tests.sh b/tests/run_tests.sh
> index 937b128..571980a 100755
> --- a/tests/run_tests.sh
> +++ b/tests/run_tests.sh
> @@ -708,6 +708,13 @@ dtc_tests () {
> run_dtc_test -I dts -O dtb -o dtc_tree1_delete.test.dtb "$SRCDIR/test_tree1_delete.dts"
> tree1_tests dtc_tree1_delete.test.dtb
>
> + # Check prop append functionality
> + run_dtc_test -I dts -O dtb -o append_prop.test.dtb "$SRCDIR/append_prop.dts"
> + run_fdtget_test "0 1" append_prop.test.dtb "/" "str-prop"
> + run_fdtget_test "2 1" append_prop.test.dtb "/" "num-prop"
> + run_fdtget_test "0 1" append_prop.test.dtb "/subnode" "str-prop"
> + run_fdtget_test "2 1" append_prop.test.dtb "/subnode" "num-prop"
> +
> # Check omit-if-no-ref functionality
> run_dtc_test -I dts -O dtb -o omit-no-ref.test.dtb "$SRCDIR/omit-no-ref.dts"
> run_test check_path omit-no-ref.test.dtb not-exists "/node1"
I wonder what happens when you try to append but there is no existing
property? Or when you append something empty?
Regards,
Simon
next prev parent reply other threads:[~2024-08-30 1:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 20:03 [PATCH v2 0/2] Add capability to append to property Ayush Singh
2024-08-29 20:03 ` [PATCH v2 1/2] dtc: Add /append-property/ Ayush Singh
2024-08-29 20:03 ` [PATCH v2 2/2] tests: Add test for append-property Ayush Singh
2024-08-30 1:06 ` Simon Glass [this message]
2024-08-30 3:28 ` CVS
2024-08-30 8:07 ` Ayush Singh
2024-08-30 8:01 ` Ayush Singh
2024-09-12 11:06 ` CVS
2024-09-17 17:23 ` Ayush Singh
2024-08-30 8:09 ` [PATCH v2 0/2] Add capability to append to property Geert Uytterhoeven
2024-08-30 15:43 ` Andrew Davis
2024-09-12 3:59 ` David Gibson
2024-10-10 6:31 ` Ayush Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFLszTiTR4-WLoVP7NDAWtVHYsFeVNaT84k3MLUDMYYpF7CvSQ@mail.gmail.com \
--to=sjg@chromium.org \
--cc=afd@ti.com \
--cc=ayush@beagleboard.org \
--cc=d-gole@ti.com \
--cc=devicetree-compiler@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=jkridner@beagleboard.org \
--cc=lorforlinux@beagleboard.org \
--cc=nenad.marinkovic@mikroe.com \
--cc=robertcnelson@beagleboard.org \
--cc=robertcnelson@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).