Re: [PATCH v2 2/2] tests: Add test for append-property

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



On 8/30/24 08:58, CVS wrote:

Also, how does the existing -T / --annotate option behave with this
proposed feature ?
i.e. when a line in the device-tree is modified using /append-property
what (all) would the annotation comment contain ?

regards
CVS


I was not aware of this option, so just tried using it and here are the results:


Input file:

```

/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>;
    };
};

```

Command:

./dtc -T -o temp.dts ../tests/append_prop.dts


Results:

```

/dts-v1/;

/ { /* append_prop.dts:3, append_prop.dts:13 */
    str-prop = "0", "1"; /* append_prop.dts:14 */
    num-prop = <0x02>, <0x01>; /* append_prop.dts:15 */

    subnode { /* append_prop.dts:7, append_prop.dts:17 */
        str-prop = "0", "1"; /* append_prop.dts:18 */
        num-prop = <0x02>, <0x01>; /* append_prop.dts:19 */
    }; /* append_prop.dts:10, append_prop.dts:20 */
}; /* append_prop.dts:11, append_prop.dts:21 */

```


For more detaild information using -T -T:

```

/dts-v1/;

/ { /* ../tests/append_prop.dts:3:3-11:3, ../tests/append_prop.dts:13:3-21:3 */
    str-prop = "0", "1"; /* ../tests/append_prop.dts:14:2-14:35 */
    num-prop = <0x02>, <0x01>; /* ../tests/append_prop.dts:15:2-15:35 */

    subnode { /* ../tests/append_prop.dts:7:9-10:4, ../tests/append_prop.dts:17:9-20:4 */
        str-prop = "0", "1"; /* ../tests/append_prop.dts:18:3-18:36 */
        num-prop = <0x02>, <0x01>; /* ../tests/append_prop.dts:19:3-19:36 */     }; /* ../tests/append_prop.dts:7:9-10:4, ../tests/append_prop.dts:17:9-20:4 */ }; /* ../tests/append_prop.dts:3:3-11:3, ../tests/append_prop.dts:13:3-21:3 */

```


Does this look acceptable?


Ayush Singh





[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