From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3qcGNXggKCl4CLNK8E96CKKCHA.8KIHE767EC6EHOKQN8AS6NA.KNC@flex--gprocida.bounces.google.com> Received: from mail-vk1-xa4a.google.com (mail-vk1-xa4a.google.com [IPv6:2607:f8b0:4864:20::a4a]) by sourceware.org (Postfix) with ESMTPS id ED642388700B for ; Wed, 8 Apr 2020 12:20:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ED642388700B Received: by mail-vk1-xa4a.google.com with SMTP id q136so139672vkq.6 for ; Wed, 08 Apr 2020 05:20:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=2lH/MwrjEIyb1JCStIOaP/FYvosP+Ilvr9gdDmeRwo4=; b=e6pYO97G0R20hpH4QleHoret5YuB5rPHfcNOb3TlE4zQJmZz8sJ4q3ezL1V9T6mssN U6J9VguM6CAotCDTQtV77THfRSMc0lryXVb23G3IUuGex48EV6gjni64xwNZSfEXKf3/ rwnMb9xLeWrc0kaA0j3Y+bILSp7z7NTLbCRqwI3F4awcqe9yb87kfzC42R+t3ooqeNmP +fkaAN+8PJ7gCJgQ8mFWp5zc6E+eRQR3AmUMhXabL96SAMbn9BVt4OBeKBdSz2qcqdwM TsiSl5kEumZ59DTlKOuUKv9Ao5vWNudS8Jnur8qNr2pkResg5/qIGaD4tBEsRpGzraQv YxKg== X-Gm-Message-State: AGi0PubXFjCCh8DlRToFdWTz3VH5tfCo1XH2A7tQlKJRCq+e33tENk0j nXxKZ19CLJRV0klOmQhq5FieFGZj6WUSN9bRBgKdfjnvbmdPHA5M6BcBLA1pymYESUIRxrRRXoJ H5ZozQBA/0o2JtiYPfXtBE7V3Lx+gG9nqhGlloKvoVcrl7jW+Mt+peQa5lRhAByQAsUMtMEY= X-Google-Smtp-Source: APiQypI456fbtc+fgtVafZNDh/9yy3Pyn2WRjEgIdXI9NCP2r8qBa/BhnzpqOGl9nCaf6XmGQuV90rin15m6Bg== X-Received: by 2002:a67:5c7:: with SMTP id 190mr5906439vsf.97.1586348457259; Wed, 08 Apr 2020 05:20:57 -0700 (PDT) Date: Wed, 8 Apr 2020 13:20:44 +0100 In-Reply-To: <20200408122044.192132-1-gprocida@google.com> Message-Id: <20200408122044.192132-2-gprocida@google.com> Mime-Version: 1.0 References: <20200408122044.192132-1-gprocida@google.com> X-Mailer: git-send-email 2.26.0.110.g2183baf09c-goog Subject: [PATCH 2/2] abidiff: Document and refresh tests. From: Giuliano Procida To: libabigail@sourceware.org Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com, maennich@google.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-32.7 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LOTSOFHASH, LIKELY_SPAM_BODY, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libabigail mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2020 12:21:01 -0000 Following on from giving some test file more descriptive names, this patch actually documents in brief the purpose of these recently added tests. It also improves the coverage of the test-leaf-cxx-members test to include deletion and insertion report text as well. * tests/data/test-abidiff-exit/test-leaf-cxx-members-v1.cc: Comment test. Reorder members of ops to get better coverage. * tests/data/test-abidiff-exit/test-leaf-fun-type-v1.cc: Comment test. * tests/data/test-abidiff-exit/test-leaf-more-v1.cc: Ditto. * tests/data/test-abidiff-exit/test-leaf-peeling-v1.cc: Comment test. Update comment on ops2. * tests/data/test-abidiff-exit/test-leaf-redundant-v1.c: Comment test. * tests/data/test-abidiff-exit/test-leaf-stats-v1.cc: Ditto. * tests/data/test-abidiff-exit/test-leaf-cxx-members-report.txt: Update locations. Update report to reflect deletion, insertion and changed members (was previously changed only).: * tests/data/test-abidiff-exit/test-leaf-peeling-report.txt: Update locations. * tests/data/test-abidiff-exit/test-leaf-redundant-report.txt: Ditto.: * tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.cc: Added one line comment referring to -v1 source file. * tests/data/test-abidiff-exit/test-leaf-fun-type-v0.cc: Ditto. * tests/data/test-abidiff-exit/test-leaf-more-v0.cc: Ditto. * tests/data/test-abidiff-exit/test-leaf-peeling-v0.cc: Ditto. * tests/data/test-abidiff-exit/test-leaf-redundant-v0.c: Ditto. * tests/data/test-abidiff-exit/test-leaf-stats-v0.cc: Ditto. * tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.o: Recompiled. * tests/data/test-abidiff-exit/test-leaf-cxx-members-v1.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-fun-type-v0.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-fun-type-v1.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-more-v0.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-more-v1.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-peeling-v0.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-peeling-v1.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-redundant-v0.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-redundant-v1.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-stats-v0.o: Ditto. * tests/data/test-abidiff-exit/test-leaf-stats-v1.o: Ditto. Signed-off-by: Giuliano Procida --- .../test-leaf-cxx-members-report.txt | 17 +++++++------- .../test-leaf-cxx-members-v0.cc | 6 ++--- .../test-leaf-cxx-members-v0.o | Bin 7328 -> 7328 bytes .../test-leaf-cxx-members-v1.cc | 13 +++++++---- .../test-leaf-cxx-members-v1.o | Bin 7360 -> 7368 bytes .../test-leaf-fun-type-v0.cc | 1 + .../test-abidiff-exit/test-leaf-fun-type-v0.o | Bin 2840 -> 2864 bytes .../test-leaf-fun-type-v1.cc | 4 +++- .../test-abidiff-exit/test-leaf-fun-type-v1.o | Bin 2952 -> 2976 bytes .../test-abidiff-exit/test-leaf-more-v0.cc | 1 + .../test-abidiff-exit/test-leaf-more-v0.o | Bin 3792 -> 3800 bytes .../test-abidiff-exit/test-leaf-more-v1.cc | 8 ++++--- .../test-abidiff-exit/test-leaf-more-v1.o | Bin 3808 -> 3832 bytes .../test-leaf-peeling-report.txt | 12 +++++----- .../test-abidiff-exit/test-leaf-peeling-v0.cc | 1 + .../test-abidiff-exit/test-leaf-peeling-v0.o | Bin 4528 -> 4528 bytes .../test-abidiff-exit/test-leaf-peeling-v1.cc | 22 ++++++++++-------- .../test-abidiff-exit/test-leaf-peeling-v1.o | Bin 4600 -> 4600 bytes .../test-leaf-redundant-report.txt | 10 ++++---- .../test-leaf-redundant-v0.c | 1 + .../test-leaf-redundant-v0.o | Bin 3320 -> 3352 bytes .../test-leaf-redundant-v1.c | 10 ++++---- .../test-leaf-redundant-v1.o | Bin 3384 -> 3416 bytes .../test-abidiff-exit/test-leaf-stats-v0.cc | 1 + .../test-abidiff-exit/test-leaf-stats-v0.o | Bin 2784 -> 2800 bytes .../test-abidiff-exit/test-leaf-stats-v1.cc | 6 +++-- .../test-abidiff-exit/test-leaf-stats-v1.o | Bin 2824 -> 2840 bytes 27 files changed, 65 insertions(+), 48 deletions(-) diff --git a/tests/data/test-abidiff-exit/test-leaf-cxx-members-report.txt b/tests/data/test-abidiff-exit/test-leaf-cxx-members-report.txt index eae74a3b..27fdc45c 100644 --- a/tests/data/test-abidiff-exit/test-leaf-cxx-members-report.txt +++ b/tests/data/test-abidiff-exit/test-leaf-cxx-members-report.txt @@ -15,28 +15,27 @@ Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some sub-type change: - [C] 'method virtual int ops::changed_fn()' at test-leaf-cxx-members-v1.cc:6:1 has some sub-type changes: + [C] 'method virtual int ops::changed_fn()' at test-leaf-cxx-members-v1.cc:5:1 has some sub-type changes: return type changed: type name changed from 'int' to 'long int' type size changed from 32 to 64 (in bits) -'struct ops at test-leaf-cxx-members-v0.cc:1:1' changed: +'struct ops at test-leaf-cxx-members-v0.cc:2:1' changed: type size changed from 128 to 192 (in bits) 1 member function deletion: - 'method virtual int ops::deleted_fn()' at test-leaf-cxx-members-v0.cc:3:1, virtual at voffset 0/1 {_ZN3ops10deleted_fnEv} + 'method virtual int ops::deleted_fn()' at test-leaf-cxx-members-v0.cc:6:1, virtual at voffset 1/1 {_ZN3ops10deleted_fnEv} 1 member function insertion: - 'method virtual long int ops::added_fn()' at test-leaf-cxx-members-v1.cc:3:1, virtual at voffset 0/1 {_ZN3ops8added_fnEv} + 'method virtual long int ops::added_fn()' at test-leaf-cxx-members-v1.cc:11:1, virtual at voffset 1/1 {_ZN3ops8added_fnEv} there are member function changes: 'method virtual int ops::changed_fn()' has some changes: return type changed: type name changed from 'int' to 'long int' type size changed from 32 to 64 (in bits) + 1 data member deletion: + 'int ops::deleted_var', at offset 96 (in bits) at test-leaf-cxx-members-v0.cc:5:1 + 1 data member insertion: + 'long int ops::added_var', at offset 128 (in bits) at test-leaf-cxx-members-v1.cc:10:1 there are data member changes: - type 'int' of 'ops::deleted_var' changed: - type name changed from 'int' to 'long int' - type size changed from 32 to 64 (in bits) - and name of 'ops::deleted_var' changed to 'ops::added_var' at test-leaf-cxx-members-v1.cc:2:1 type 'int' of 'ops::changed_var' changed: type name changed from 'int' to 'long int' type size changed from 32 to 64 (in bits) - and offset changed from 96 to 128 (in bits) (by +32 bits) diff --git a/tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.cc b/tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.cc index 89612562..e145375e 100644 --- a/tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.cc +++ b/tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.cc @@ -1,9 +1,9 @@ +// See comments in -v1.c file. struct ops { - int deleted_var; - virtual int deleted_fn() { return 0; } - int changed_var; virtual int changed_fn() { return 0; } + int deleted_var; + virtual int deleted_fn() { return 0; } }; void reg(ops& x) { diff --git a/tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.o b/tests/data/test-abidiff-exit/test-leaf-cxx-members-v0.o index 8202ecb5dd7cb2bbe79a0a2f3ff42a103f56387c..cf5c9eb87a1dd22db9e7f0532de1530362946c69 100644 GIT binary patch delta 302 zcmZ2rxxjKmEF&Y+%uI$R<4r0}#YaM<$%LW~N{1?#Lah`*&`o0@HVTpiALv5t z1B;K1h99Z}UDSo((lVPOh~ma9m2S*ZTlt;{Lxnx?VS+ejWG6qMQOj`Mn<1gd>mW~N@0%qSY+|pGvqyd!rBkt+`QKAo6 zj2Gz<*5eiSetUP$4zmAuns-`AC{=SKpszx1E$H8b_+dO(4E8vnUqkLVJ}Cwk;&S3o z$aw)$i~Jo9Wp##@(N?RT{#1*!><(*9qMI-i20g^MHiS-M#e0&5vpRF{>j{B2;3U7% z6c$rY=_8miPv7BqS_0esmM)^}X$cOSrdImOV(-tla+R>c8z4{D>+0Z{P`GJW5 delta 651 zcmZ9I&1(};6vgMhIGIVC&LpYL~`9cOR4pZ$sT%+wm6$VERL;<;|0bz7XyNi@rkZ9@%Xx!>;>|H zfZj3F9S$8}F|2sYk^J0M{d_8AX7ubtdcxGxQ)bpQr_v}&IsN8syHdVYD%R{Jp?GcX zM0IibLT08W*rgJu3l$uaa{jy3N?E^CSrP767x7ZM96XimyQ}qAI_n_|*}+{*`-c&h z!mTU*456dQs1GIRE8Y&}qY?fMuB`t>a6d7?*Ly^jVpQy~Br+mrA*o}(?aIjX}LwWtG|yAEe`{2!|-iuV8j diff --git a/tests/data/test-abidiff-exit/test-leaf-fun-type-v0.cc b/tests/data/test-abidiff-exit/test-leaf-fun-type-v0.cc index b75dd84c..db1f7917 100644 --- a/tests/data/test-abidiff-exit/test-leaf-fun-type-v0.cc +++ b/tests/data/test-abidiff-exit/test-leaf-fun-type-v0.cc @@ -1,3 +1,4 @@ +// See comments in -v1.c file. struct ops { void (*munge)(int x); }; diff --git a/tests/data/test-abidiff-exit/test-leaf-fun-type-v0.o b/tests/data/test-abidiff-exit/test-leaf-fun-type-v0.o index 211a33884f30755929210fee5d328e5b7e6c24e1..f03d386fc1156eac6e48a6d7b46f9b0153f4197e 100644 GIT binary patch delta 312 zcmZ9FF-yZx9K_%M<)!95a1cs^LbbYR#WYEmHVBQlw40l=Qc^ltX*8BPI@`f;OD91G zXG<0{xjMMH`w^u50%Ek{;Bdzc_q!Vx9t$^H)Q`)Di`-~2#`uDkq zSeU5mEovlJy3J{b$-*;r5gJW8Kx)+Bs62$+ksmZ?ZsExqjSxzo5==6G!c6*@Dg$*@ Urzt|^%RMn~yGT`yUNBReUwJ`L&Hw-a delta 357 zcmdlWHbZQJ24loT%`jd@4i5$f24)~;U}T!uqs7F^HZehD;+f0r&R}u%$;%k!7>y>M zWt319V`Xe+VrF1uboUEYaMso~G*PhBGtx6uFfuT-G&C?an9Rmxr&E$zT%wzknwVy! zTV|k_oXij(WoT5Cnx0u)l3Em>Ur-$6Z44wC^h6*0@9p7TsQe5i@W3msAw9RZ1ZG8R&mDk$)2qKjAoMqS;aSR zV3lBEOqhIQ$sd`- yCO_cRU|cbolgoZG2dBv77%m;g2a`Lw>^TisAX+phU*t09+`tOqEuMUlO&$QU?N00f diff --git a/tests/data/test-abidiff-exit/test-leaf-fun-type-v1.cc b/tests/data/test-abidiff-exit/test-leaf-fun-type-v1.cc index f308a343..ccf79dbb 100644 --- a/tests/data/test-abidiff-exit/test-leaf-fun-type-v1.cc +++ b/tests/data/test-abidiff-exit/test-leaf-fun-type-v1.cc @@ -1,5 +1,7 @@ +// The change to ops::munge is local to ops and should result in ops being +// reported as a changed type in --leaf-changes-only mode. struct ops { - char (*munge)(long x, bool gunk); + char (*munge)(long x, bool gunk); // everything but the name changed }; void register_ops(const ops&) { diff --git a/tests/data/test-abidiff-exit/test-leaf-fun-type-v1.o b/tests/data/test-abidiff-exit/test-leaf-fun-type-v1.o index 9db3ed5e8f997d9c8455f8361449ce516edc840a..2a23514d593c02f79d432e6ee7c3d5a8aa0b1616 100644 GIT binary patch delta 448 zcmZ8c%Sr-a6#ma#axO$hhBHAjf>>gsjudEwA_ltBRc%`6DB}f8Z5)F(LDZr}i{!k3 z?OG;oS_Hm9yP#DmJwb2K)JO{te0*@e%i-L5hu-^bm<~e6%QTlKgwQq!FoU}c4TrT|B^ilFG$kI>lA0Dv;wF^}l3X^suWTP0 zm8RZy462q4Em+5|lnJnb8OFb|a0@Rf39pzaoZyJ@%6q@x*|Y8t5p3pd$T(w4_{4CS zXWg=Uu9^!j5zkn!T$pcf7E~WTuti9Xzu71SL-cbKc*hx+gCefdYk0s1a42}t;&*r# wH$_pQWXPohA_(Z>uhAHYo8p|Swk3s?@oC#^Z!8i%c=@J8wKwaGW0doRov;Y7A delta 418 zcmZ1=-XT6ggYm>f%`jd@4i5$f24)~;U}T!u}Q)Qxn@ z4E2(eL8=&7&{t#LU3Rm|L2co;o>^NsQUR*kE!MlbvW%etr%^NosM4 zZcb`q8q|czVoYil$r*`73`MEwnZ+fkMe+Fs#S9GY&dyc}8ZN0xnTdG{mU>2dhPsAk znh=(Pk%6J5A<)>(_n3+p8HFYXvM4edO|E9~m1KjuLl8=H0clPkPMrLZMVzsE@=um{ z$>~tJY&11RlM7kJC1aqXwP><)CNE?aXKa|flhvQmY%(LO_+|w*2`0vl$(9`Z84pbU z$>GlEKG~7eoaqDWgs)K(uI1cH}naRDk+r@nlDKc>vtxSepO< diff --git a/tests/data/test-abidiff-exit/test-leaf-more-v0.cc b/tests/data/test-abidiff-exit/test-leaf-more-v0.cc index bb6505c8..d67978b1 100644 --- a/tests/data/test-abidiff-exit/test-leaf-more-v0.cc +++ b/tests/data/test-abidiff-exit/test-leaf-more-v0.cc @@ -1,3 +1,4 @@ +// See comments in -v1.c file. struct changed { int foo = 0; }; diff --git a/tests/data/test-abidiff-exit/test-leaf-more-v0.o b/tests/data/test-abidiff-exit/test-leaf-more-v0.o index a8734481238bda41217440b305307ea7c5464782..b3a3084e0e6061e2ac4f7b3ffae6cf81cb519f55 100644 GIT binary patch delta 621 zcmZ8fzi-n(6u#$+?X#OyH7IdXXyYJMY@)<*1VrvYDg`MKMHGfgAS6miT^gz62aOPH z6)Y@BSWo=}s!ox*luk^jTL&bvATg2=w(o3dLP;JU3iD#&W%rebJt1AD3W(~m2#>|fc0{h*BD@zU0T_7OgTj{A+z9=J z*QH{sMQ~rp<1;CVPbD2M(wy4bY<6CF>!jVmEKTAby_v4xUo~p^ymP~Fi{+wYluM55 zI3*YF(c258UaKt{<{j^OyV;o-3XW@?vmX7Up8-;MDC(K3ymgH?9}5n}$636BW1e-n za)CgY31BK>cTtmcSVv3BMF(D%-r|X5!Wd6^?>)vc$;hkn7+l#XnrHBs>9{1DvmYbn zK@`uNKM1~)i?D=;vJI;^=D3R*)8POuW@p|+_V4G)lGtZ9Y~dbv+W3X7z+$k~k)bpM z7-4(rEBrz$UWYa8$1D6{ VLz)zP!2Wba>4l$xkbUf{+5Z9OcTxZV delta 586 zcmZ8eO>0v@6rDToW8Sk#+Sk&?7ioNTlf=*@6Ez`Fj3BgKSqc_)r6EllL0U_L80eyf zE~K0KJU>9tKVVuA+$iqcsT=9iozz|3by0D~zHD+A_ndp~xpRk^qsecRFS9ff<~B>@ z%rnM}mGyN-TxiaiX+{-3Fo!ah&oBhP!C)@En=NvpBa_r5a5MYG*l zTWu}ljMpyC-B}85=kxMdgn+N2N zs)e4qQ$Ngz1o&YbA g7x64H^x}02aH8^a$VA<}WuLFvMK@8UHhPK7Ke8ofP5=M^ diff --git a/tests/data/test-abidiff-exit/test-leaf-more-v1.cc b/tests/data/test-abidiff-exit/test-leaf-more-v1.cc index 5df5df9d..7f5b65d3 100644 --- a/tests/data/test-abidiff-exit/test-leaf-more-v1.cc +++ b/tests/data/test-abidiff-exit/test-leaf-more-v1.cc @@ -1,12 +1,14 @@ +// Ensure that local changes to functions and variables (including their removal +// or addition) are reported in --leaf-changes-only mode. struct changed { - long foo = 0; + long foo = 0; // was int }; -long directly_changed_var = 0; +long directly_changed_var = 0; // was int changed * indirectly_changed_var; long added_var = 0; -long directly_changed_fun() { +long directly_changed_fun() { // was int return 0; } void indirectly_changed_fun(changed * x) { diff --git a/tests/data/test-abidiff-exit/test-leaf-more-v1.o b/tests/data/test-abidiff-exit/test-leaf-more-v1.o index 324180ca92b91045edb4c9d3b9fef1fd314a09ba..4ac71798c2735b828957689acf622d267f60f67b 100644 GIT binary patch delta 685 zcmZ8fOK1~O6utLNX68+PG=+8&rEQ`Mlg3FhK}aW{0V8dos0~!G?IMiH#1?8IX%Z;9 z3Ej9%xGUFPxohpJ8>LJ4E_CN->q5HHjrb-REA%byIrp4%;oZmkGWTn4n8c+~YHwZQ z6#$T$?KYrq%mI8{78;BTs)`%XBv*0IMCE}Og8x?)Zd`cU=;sVhk%9>fQxX><;Tvw4 zjkZA*2pFKpc&=^ zyE)DqeKS+910AyK*BUz=r{3M&uhqBh)>EfZ>)RcuZCZAtA)02d)u*a5PZ23bKiE|w zsSsUx@F-qRr_Eb&E0fQd@qEs-OfzTEUFptESSgo_@#H<{$&THc1Ps$kU5dKf0G#}h z-XccnSk_~+qK}BR_}GC9H0Y~v3qqX+^gMuo$Ep-jbnH<|NqA4Os`MBDy;Bxr-@Q=8 zL%%@H<%FuvJ_21)mvKb4s>iZkWX;2W(IpzGS=^#CHOoE&ovRr-;+&Fviroh)@=WZt zH*t1p@`wgJi!bSz>o`Ln_(LpGLe)=lT7}^!+7G;Epiwcnj5Qhr3z(zRU`cx;?(QCo zFjT;AWQ9sh^HIV-OT$o7{EgF42`ltl)K_GMOWK+;891OpxS$Qk>j50nz`yVp@3?(T delta 640 zcmZ9J&1(}u7{=$F-R#aLo5i$EH@gx|NFWI%n@+6Ocrbo|U&W6U3wkP2T6!py+A4wv z@#ImL=j2I2FG5fD?#F*%ZuKBkPads^c+=TrRLH>0^YFaCdEbHgRop8+sZ%L#Y+fgE zfiY&RtgkcT1J9T#QYvGEgHl!kI7X5rYnWP@`^x`MEz$f}v*T}h@?cS!T-51s&aEXd zk5`$kl#zoQ^xa-i)?hXC_@PiX@5*RtDXFqlkvV+e)Dhw_5AlXq4s0!NZZ+4IZ>?w+ zdwdcnjDzrvO5yyKh0@unDLGT>MD0kH+S9Tl<#Zb_jgvTIT*6Q8;fs;a%{E4e9nXAC zG=cXiKNwR3bLve(Pyee8?5pY#m5wpeHO4a9T}IjRX#*XrOcIOM9qd|ldIYllaz!(F zt!br>+6CPvfOLFZv+Kb{P0WpuA!6I78N9Mv)Wb)+#fyZrh{9D3J{!4EBg~74KH;J8 z=?9*QR&ZM*`y(jBXK|H|?MP>l(>uhOxBRQXynBvrA~wgd?N+IPzT0(P=npxHAUjLD v=w-Y7w}I2?Njx`AY-g*)(9d@9!4)WY$LSt=Ue`Hg4JSSrw)3hg?|ZdBB6Vuj diff --git a/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt b/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt index 7ab4dd6e..48f5df8e 100644 --- a/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt +++ b/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt @@ -3,38 +3,38 @@ Changed leaf types summary: 6 leaf types changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable -'struct foo at test-leaf-peeling-v0.cc:1:1' changed: +'struct foo at test-leaf-peeling-v0.cc:2:1' changed: type size changed from 32 to 64 (in bits) there are data member changes: type 'int' of 'foo::z' changed: type name changed from 'int' to 'long int' type size changed from 32 to 64 (in bits) -'struct ops1 at test-leaf-peeling-v0.cc:5:1' changed: +'struct ops1 at test-leaf-peeling-v0.cc:6:1' changed: type size hasn't changed there are data member changes: type 'int*' of 'ops1::x' changed: pointer type changed from: 'int*' to: 'int**' -'struct ops2 at test-leaf-peeling-v0.cc:9:1' changed: +'struct ops2 at test-leaf-peeling-v0.cc:10:1' changed: type size changed from 320 to 640 (in bits) there are data member changes: 'foo ops2::y[10]' size changed from 320 to 640 (in bits) (by +320 bits) -'struct ops3 at test-leaf-peeling-v0.cc:13:1' changed: +'struct ops3 at test-leaf-peeling-v0.cc:14:1' changed: type size hasn't changed there are data member changes: type 'void (int&)*' of 'ops3::spong' changed: pointer type changed from: 'void (int&)*' to: 'void (int&&)*' -'struct ops4 at test-leaf-peeling-v0.cc:17:1' changed: +'struct ops4 at test-leaf-peeling-v0.cc:18:1' changed: type size hasn't changed there are data member changes: type 'int*' of 'ops4::x' changed: entity changed from 'int*' to 'int&' type size hasn't changed -'struct ops5 at test-leaf-peeling-v0.cc:21:1' changed: +'struct ops5 at test-leaf-peeling-v0.cc:22:1' changed: type size hasn't changed there are data member changes: type 'int*' of 'ops5::x' changed: diff --git a/tests/data/test-abidiff-exit/test-leaf-peeling-v0.cc b/tests/data/test-abidiff-exit/test-leaf-peeling-v0.cc index 745d44f5..2a25b877 100644 --- a/tests/data/test-abidiff-exit/test-leaf-peeling-v0.cc +++ b/tests/data/test-abidiff-exit/test-leaf-peeling-v0.cc @@ -1,3 +1,4 @@ +// See comments in -v1.c file. struct foo { int z; }; diff --git a/tests/data/test-abidiff-exit/test-leaf-peeling-v0.o b/tests/data/test-abidiff-exit/test-leaf-peeling-v0.o index e6ed6218704e957cbac929f82d0a571fd181103f..cf5fc57b45f185b13b0d61ec9150f25e5c952b69 100644 GIT binary patch delta 559 zcmZ8dy-Pw-6u;-ar``7+7H0N*wrHkU)YB&oy#^tyglOpxh)A+M}aE|qtLc-saKZUOcRw6R$o$1*jstOOJ`*!ZTL;eld+gXc;%LGroWWF$FVER>elBaW4^>@nLJ z?sSn%+IDO^?X)gEQ?l)6+wt;up#4cz^c;dN{u=#i-rNyv*`@B|mTH&@!Ctu3L%d?@ zgkWD>>M_1D^+d3S*oz;X?^8k0Qm}%yW=J0d=QPXA3Tx42tz&~(Wqi~On8$Z575)*< WXP5Jd;Gk}?>o4dA+_Xx1-un+qU{qHC delta 566 zcmZ8d&r1SP5Pq}k%I?YrMz*dIteIh2>JuR>3}P#xAn4E`qM~4nJ!GX(*}ZEdL&u2z z1HqtU1VPlHh%VJX(6tVog6KWlF8g5kX1*UV^BS>6?D!%8@+2WdJRl&{uR=*lUgP6F z0l&gKLi{a*#M=ZY@*zX9MnJ9q#5GO6WTVP8Xu~YTdxP>jH?VxWn{Op$2+0KggifqM zOfw`tD%%2q zDqNbGGp$sL=FLJnm!@VeOAC}{b2uW6;*swpU$NJn>W*DmX3;z$CCeH%6XW)(vr_(x z4AP-~Pq=v|jfu3}+K-T+i~LrFRqHB-ArJq7L8WB4B-!w&H@L0nM#^PRJ?b5vGqvcl zj~?{_pP2gWvO4=b{{HuI5Y!ATAXRlC4mhQzjd|B%d#o>5XVz)FR&}uORn0_-uH)9@ U)Bt+|Y3Rn;fDT_xCs6YL0xSAeyZ`_I diff --git a/tests/data/test-abidiff-exit/test-leaf-peeling-v1.cc b/tests/data/test-abidiff-exit/test-leaf-peeling-v1.cc index 439f7c0b..ea0f835a 100644 --- a/tests/data/test-abidiff-exit/test-leaf-peeling-v1.cc +++ b/tests/data/test-abidiff-exit/test-leaf-peeling-v1.cc @@ -1,33 +1,35 @@ +// Ensure that different pointer / reference types are considered genuinely +// different in --leaf-changes-only mode. struct foo { - long z; + long z; // was int }; struct ops1 { - int ** x; + int ** x; // was * }; struct ops2 { - // A change to foo's size is currently considered local here. Arguably this - // should be considered non-local as the change to foo is being reported - // independently. If this happens, the test case will need to be updated (to - // remove the reporting of an ops5 diff). + // A change to foo's size (impacting y's size) is currently considered local + // here. Arguably this should be considered non-local as the change to foo is + // also being reported independently. If this happens, the test case will + // need to be updated (to remove the reporting of the ops2 diff). foo y[10]; }; struct ops3 { - void (*spong)(int && wibble); + void (*spong)(int && wibble); // was & }; struct ops4 { - int & x; + int & x; // was * }; struct ops5 { - int *** x; + int *** x; // was * }; // TODO: This *should* be considered a local change, but currently is not. -int var6[5][2]; +int var6[5][2]; // was [2][5] void register_ops1(ops1*) { } void register_ops2(ops2*) { } diff --git a/tests/data/test-abidiff-exit/test-leaf-peeling-v1.o b/tests/data/test-abidiff-exit/test-leaf-peeling-v1.o index 81fcfe0a5a5abecf2d104e71859a04ab529d0b04..c59573e19ddfd8d7b170151a743445ca15be1574 100644 GIT binary patch delta 587 zcmZ9JF-QVY7{}jtp7ri7Ls2;&HJq7(3F?UiHxxwV5rkW7Em^o!XoLkdI5(&tG_*uS z&=5ozG}h46)>czNQ(HrW5Jd0kYq;c-k32V5hyUGi}j-F*Hx#dt^LHs9i^d`RQIrb~k8cv z;~s&Y#%n@XX;X~*1R|(IIvk~seAf6!pbw`ZJszjuVh2AkpbAAugx2_~2uXp_7woXB7i%Tv2B5TyBMHmCb5>r&3$v8w+@NrZYybWy&Z%Yg?z>9?O7KiI*p2UA1ZWJOIlc4U+W<`?Xa;-m z-Jbw`LQ6AX6&JO#WCAv|EL-*?9{OFpi-_LA7cIw1zIz#<6PVC*Y|3}v0(2g$oVu^a RZ;DD@ioct`+E;qH=ND_rP|*MY diff --git a/tests/data/test-abidiff-exit/test-leaf-redundant-report.txt b/tests/data/test-abidiff-exit/test-leaf-redundant-report.txt index 34b7a848..581fd28e 100644 --- a/tests/data/test-abidiff-exit/test-leaf-redundant-report.txt +++ b/tests/data/test-abidiff-exit/test-leaf-redundant-report.txt @@ -5,23 +5,23 @@ Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 4 functions with some sub-type change: - [C] 'function void fn1(sto1)' at test-leaf3-v1.c:10:1 has some sub-type changes: + [C] 'function void fn1(sto1)' at test-leaf-redundant-v1.c:12:1 has some sub-type changes: parameter 1 of type 'struct sto1' changed: type name changed from 'sto1' to 'stn1' type size hasn't changed - [C] 'function void fn2(sto2)' at test-leaf3-v1.c:13:1 has some sub-type changes: + [C] 'function void fn2(sto2)' at test-leaf-redundant-v1.c:15:1 has some sub-type changes: parameter 1 of type 'struct sto2' changed: type name changed from 'sto2' to 'stn2' type size changed from 64 to 128 (in bits) 1 data member insertion: - 'double stn2::y', at offset 64 (in bits) at test-leaf3-v1.c:7:1 + 'double stn2::y', at offset 64 (in bits) at test-leaf-redundant-v1.c:9:1 - [C] 'function void fn3(sto1*)' at test-leaf3-v1.c:16:1 has some sub-type changes: + [C] 'function void fn3(sto1*)' at test-leaf-redundant-v1.c:18:1 has some sub-type changes: parameter 1 of type 'sto1*' changed: pointer type changed from: 'sto1*' to: 'stn1*' - [C] 'function void fn4(sto2*)' at test-leaf3-v1.c:19:1 has some sub-type changes: + [C] 'function void fn4(sto2*)' at test-leaf-redundant-v1.c:21:1 has some sub-type changes: parameter 1 of type 'sto2*' changed: pointer type changed from: 'sto2*' to: 'stn2*' diff --git a/tests/data/test-abidiff-exit/test-leaf-redundant-v0.c b/tests/data/test-abidiff-exit/test-leaf-redundant-v0.c index 1d9c6266..c5dc8216 100644 --- a/tests/data/test-abidiff-exit/test-leaf-redundant-v0.c +++ b/tests/data/test-abidiff-exit/test-leaf-redundant-v0.c @@ -1,3 +1,4 @@ +// See comments in -v1.c file. struct sto1 { int x; }; diff --git a/tests/data/test-abidiff-exit/test-leaf-redundant-v0.o b/tests/data/test-abidiff-exit/test-leaf-redundant-v0.o index 1e74a51b929f63ba77041febe2b2aa064e41cc78..ef7df991deb2c7337b13d008a2977c0e5fdd37de 100644 GIT binary patch delta 594 zcmZ`$K~L0B5T0qb?Q3_JP&aH-G_VqbV6scQkgR*z)fh1zAV@;+1QOT+$x=`%di7wu zx|xG+xbPE9xSHtQi+l0zKY(yCF(k|^4F?jM&dm4qd*AfEdH?*c!=EScWoPo>k)~z= zKz|RYTY>;G8Dl$6KohLcR1sIvtv&)Ulp&HC#WR2fa=^8{&~El_Iia?Ld0 zAg{UY4SK(>wDP4^15(Ays;K1<%6KI&N}bc2fKe5A-aupsNE|*n_ntD32UW#rCJF~)gY{g zVNjexRtWznKDi|f>NYWR?PPSgIG4(KEK*&05j7uhDZsl$1XdYl)?%{4WZ Wp~YOoKI-2;zys>$YWR(Mx%(I1wQ!*T delta 575 zcmZ8eF;Cl25WaI_$9CKz1I0Kk!l)5VhJ-vP2o@#UE$VfT-1iHQ)Ys!E_ ztafZMi2@>gIee?e!;8iTV@h4&4_sO@Bt&DOyuq~ z+nvHjb1f(rx~1X=KIS%EFrpb`lA%*2Te&aWXoVj=IqOVka|@PUzw_#1&RZz@MdA4+ zu^>drr{79-8kXwy=U(n*^Zoi-7z+wwE`LwjYb7obZF-?P?jwG5m^(A&>%7vj1DCc{ z2PbG>of;c7D<=&?pRLSRIZBPvwfe-(4Jzz`mp2(~CfS;UPbshMVunt%W1JQ&G(T@h0iZ8OVctCyY*&W5DYb*c& diff --git a/tests/data/test-abidiff-exit/test-leaf-redundant-v1.c b/tests/data/test-abidiff-exit/test-leaf-redundant-v1.c index fe182cd8..1763a332 100644 --- a/tests/data/test-abidiff-exit/test-leaf-redundant-v1.c +++ b/tests/data/test-abidiff-exit/test-leaf-redundant-v1.c @@ -1,3 +1,5 @@ +// Ensure that --redundant is indeed implied by --leaf-changes-only mode and +// that all the changed functions get complete reports. struct stn1 { int x; }; @@ -7,14 +9,14 @@ struct stn2 { double y; }; -void fn1(struct stn1 s) { +void fn1(struct stn1 s) { // was sto1 } -void fn2(struct stn2 s) { +void fn2(struct stn2 s) { // was sto2 } -void fn3(struct stn1* s) { +void fn3(struct stn1* s) { // was sto1 } -void fn4(struct stn2* s) { +void fn4(struct stn2* s) { // was sto2 } diff --git a/tests/data/test-abidiff-exit/test-leaf-redundant-v1.o b/tests/data/test-abidiff-exit/test-leaf-redundant-v1.o index f7db3a0cd5c0d44e14a1d00e7503a07e50a7e1cd..443777797e4a5fc694cda2cfa46544ab639406c1 100644 GIT binary patch delta 617 zcmZuuL1+_E5S`i0Cc8;$n@IXiw#Zh3O@&SJBPj9EAQ9umLP1YnlDZoW#%;A*sdx~3 z@uJZ09IQtVo;>ysxoF$hA?B7Y83<~_C%Z;n0C9|BtHyNw0)#})+n1QtL9KLyZyf_pup9#OM<3 z(BBH(q2KGf_kC|W@OnW=ueB4Hq4(Otd}sB#)0XF*X0=h3PNOcHQr4Sf>nonOvAsU@ zVYm_8a-#8S;oZ&uskski^(JhE+!R9tpwn(&a4MJl^+7L~2)nYmJXM0*<8|;@A0d`# z%@Dk=`jN!Vtb077y?hzD`PSJ&kP@o1v)e;2!u&d9K^|m*hV52ACF|RQ{0WC zt5fV#QvCKt9DOv!UZYRRm$*U~Q{rGV)z$D9jjWG&g;ctO9xW!0(~oo+cPN)>S>MLL u5AbXpA7;vUhg7D8FKEQLPq}Oh_h^l=PAc27J{yy2XC^w?GXA98%+g;V0(=?( delta 613 zcmZ9IK~EDw6vyA&WwyKB*0ho`Yzt<45L=VB%r??sB0WIp2@_9hyil}NlDa@x48(&d zXA?H>z$f6u#SIs4eg(Y{4idsg;6Ml=CeF00hi+#7@BiNK&FtGb&417DmvB2Qf0;pZ z5didUKrNvhz{m(&^#jn9&mc25WK`VfJJ5Fk6X8VxN5ek_KFW_I*1~sSnoH6dUB3>P zp&Ax=hM)asl>zer)6~X7Ha(`gwQw1%t}g(S^cA_(Lp=HPToN6oq$1wlNlQgkiCRHt zGpO`B?QXsDK~!JMG5~YH>QAc@-9m<2%$Z|oK4Ezo_6Dly@}S}En}P2^Z_R(}s$YJy zwzbmh*iZ}JuY*Ja=v>R8M_1b16tw2&AG@W6&dO@rcW0|!Ra8WyJaDczEoOz7_Kpwq zU+84zAa~Wk@so^Wjy^N)I5JbT7+38$PEy2*Sf}4?g05K^Yg9BixrUj|#U1J#OTPE% znbC3{#?_}oG((ZWoqu~i4$*sbVI1HiYA5*deqvd}Q@XT%V2Pq+3t!PqvVkv1*iGvs szSBM0u^af3BD;yZblF#tYT`O=NFApr)wI5`!B>iOlWO2k66ptj0k7t5i2wiq diff --git a/tests/data/test-abidiff-exit/test-leaf-stats-v0.cc b/tests/data/test-abidiff-exit/test-leaf-stats-v0.cc index 27ba39c9..12a00e0a 100644 --- a/tests/data/test-abidiff-exit/test-leaf-stats-v0.cc +++ b/tests/data/test-abidiff-exit/test-leaf-stats-v0.cc @@ -1,3 +1,4 @@ +// See comments in -v1.c file. int changed_var = 0; int changed_fun() { diff --git a/tests/data/test-abidiff-exit/test-leaf-stats-v0.o b/tests/data/test-abidiff-exit/test-leaf-stats-v0.o index a79511cc3c6db039aaa1f5528db19b55f75c7a2d..2faf8314022d140d44519fdc997fa601fc171faf 100644 GIT binary patch delta 396 zcmY+8K}!N*5Qe|m{nqwdB=BH*h+2zityWzTmhGU0!3IInA*mp2wbhIg(M<>n^b(yy znVZn5Um#xcRM-B6-GVM%y|u6iH83+g!^`{5IQSFnDv;L(}jbwk}H-R;^;67g|<> z#GUIpaqOm}UfEXJ^HN)hSgAw`Cz>{umTzh;@&^bpv)N5q*|CdNtL88!AUI3ca7@KOfOsXji@9CF0~&%NR;dYj9MCvC;ir4K#|h2h zEA`_Y^$*X4Fb6W;&b)zwhG;?#JE9IpI1)4L0X)k-0@Inyd9;e#Oy^7vBQS?urob+a eSO)4iac3J1DZ{>aPnyDxq_aoCqZjP>7JmV|$zwAB delta 404 zcmew$`apDo2BX46%`isBi48K0%oFF%Vs~R;U|?oYpKQk{mtvq>W}ugx3>0BtU=?QI zWCF8*ga|8_H!EW#6B7d?V{%4fUV3Uud|GK91B_jkSj140T3n)=lbVwK0*3e~LqnJWK*P!=%QK0JSZJcCHn0TRzS)hb zh*44q$PxrP6$V(K47te{nH3ogCjVeoovgs3A*l%!7lhJWK$;VXB_=1bh%?qtu4Hj% z3(lNWGmFgi>=$!X7+FqxCfp0Q%GCzn0v X1E{0*Cr{)u=d56b7_)ftL^gQx{TJN*W<8Oo7fnUBUwU-CJX97R+X^R zkU*(5Zt*oj6Ec|&HGK5<2?hv7xB{;nSS63|Sml5RW#lkqM-@G%z`7&}XJME7MQ?kv z%8!V zl3#)lH=CU`#uvP;J??k&EtZ-1vr{V5%t;l17`EgXjN*$Nk9-~bLmmTyBXkm7zxjB9 zBqJk;141RK#U;8qsflR@x@CrX$;m)*1_o9U22Lh03rL8ta(S~dMlvx0^(AK{=B1~m z#HW?!F~HbmiA4|@6fw*^aA&WSp#N