From 6da59d76de1b0545ab6a27a3622a1702cefc7153 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 12 Aug 2024 13:37:19 -0400 Subject: [PATCH 1/3] add tests for junk bytes --- asdf/_tests/data/junk_after_blocks.asdf | Bin 0 -> 3552 bytes asdf/_tests/data/junk_before_blocks.asdf | Bin 0 -> 3552 bytes asdf/_tests/data/no_junk.asdf | Bin 0 -> 3547 bytes asdf/_tests/test_junk.py | 17 +++++++++++++++++ 4 files changed, 17 insertions(+) create mode 100644 asdf/_tests/data/junk_after_blocks.asdf create mode 100644 asdf/_tests/data/junk_before_blocks.asdf create mode 100644 asdf/_tests/data/no_junk.asdf create mode 100644 asdf/_tests/test_junk.py diff --git a/asdf/_tests/data/junk_after_blocks.asdf b/asdf/_tests/data/junk_after_blocks.asdf new file mode 100644 index 0000000000000000000000000000000000000000..f69d3d2573115ab283fbeac5f965cd5b48d67e15 GIT binary patch literal 3552 zcma*qdr(tX9tUu?P^u})!&cN%xjd}`fdtB{>Mv0cuM${&30x!iMp z=lssOzu|hwS4S*kB;o*ZfXKsiow_l3j1X?VDctm0FOQ2At|cO`BzY9$#_()L zxSrRitHqomH=NZgl>Q<=KR?DTU902#O>IBnX`!d-GBs13rek#l;rO#&tK_$_I!<^* zh{$Ybb9t3k7tSQ9IA&rd5nLXZsm{HLuD|6Q^sl z%z>0zT^7qvT+j0rF^q=I5}q~%_GR*fG1OX3I1?xi66T}e@}z-28KJ=;>C(^u?AE%!F=SKF?`P59>`W%TgZSP0iwXR>AVDdDg-sle(m)XR>;|IjHz?7jbG9t5GXC zJui;KMWiLjQ~h&wYIAR4eG}O;FG{S{W%y5|^zoqjiMB8a)4rG{VTqAyN$a!H{3I`_ zdY;uNSe;^0f=t^b*)cKV^A9ws|1%P-)M~?-AgRb4JWi|O3q;x4ZNj#gvaHX^70!W> zIPrj|8__^kl?$;0cpoLo+0n&oe=!V%qP8WmF;)Rq|MO$bn43?W(btkZ(^Yx%{o6GueJPuoX>dBU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ks.asdf b/asdf/_tests/data/junk_before_blocks.asdf new file mode 100644 index 0000000000000000000000000000000000000000..f69d3d2573115ab283fbeac5f965cd5b48d67e15 GIT binary patch literal 3552 zcma*qdr(tX9tUu?P^u})!&cN%xjd}`fdtB{>Mv0cuM${&30x!iMp z=lssOzu|hwS4S*kB;o*ZfXKsiow_l3j1X?VDctm0FOQ2At|cO`BzY9$#_()L zxSrRitHqomH=NZgl>Q<=KR?DTU902#O>IBnX`!d-GBs13rek#l;rO#&tK_$_I!<^* zh{$Ybb9t3k7tSQ9IA&rd5nLXZsm{HLuD|6Q^sl z%z>0zT^7qvT+j0rF^q=I5}q~%_GR*fG1OX3I1?xi66T}e@}z-28KJ=;>C(^u?AE%!F=SKF?`P59>`W%TgZSP0iwXR>AVDdDg-sle(m)XR>;|IjHz?7jbG9t5GXC zJui;KMWiLjQ~h&wYIAR4eG}O;FG{S{W%y5|^zoqjiMB8a)4rG{VTqAyN$a!H{3I`_ zdY;uNSe;^0f=t^b*)cKV^A9ws|1%P-)M~?-AgRb4JWi|O3q;x4ZNj#gvaHX^70!W> zIPrj|8__^kl?$;0cpoLo+0n&oe=!V%qP8WmF;)Rq|MO$bn43?W(btkZ(^Yx%{o6GueJPuoX>dBUhYrvYI>8z675FNg37z3AI2+D^uR$01I-Cn#Ap_l@ zJM@5_&h9NK%hQV<77F-Ay!NriE z49ejWxD-afNVp6}!R2rTjD|5V7RJGNxDqD7RWK2*hDmS@Tnm%oI=CKgfE!^7+ypnn zRJaAQFb$@|=Xg-?~WLTt2+qj_UWp##d?Vd#l+cN)r2_FA9<Y)`dtn*Mqzq+p3|66Bu4l~aaBwr*1dH6wZMlb8D^If*V3C)(y~5k<^SxD< z_h|l@&{=%DV{rhxVc%TO#=(2mmnyE(dneaw7jd1Wx10a-uZDhN4lbN6^Ju49L)C+X z_=zv-4IShZwJM;0K?|k#ITkb5j1-&cyLqT)i0<^Oc!|+SYt$88Uamv*=?8a@ z@9pTO@$8Bld)5uonWH<44nFK8l|$j9ke_8=Drk)_@%IkD{Nb}Q2iUB&>dn?Pepp8oG#%n*n{|z0m^WC>w{53sLo*U~p zdx?0-;L4T1^wXSaHrz=1HL~)xf6>dHr%w*qAJ}E2qH4+eF|D_#w!f&*Zblb5bdIzc4xgs-{MN+2 zvM*`7Xng)#jqJ#h_n)^%s@&`0g= zQ(KzaX>L_wowqRmYx$y$ulV;+LZ!>a?WgL=Gy894)o!=w`s{66ZB--WR8ulHr+R=E z9rM|nB;?y}^h()F(;I1UL739&A0t%Ry{F7J@&vg=CUI?d(#wAxrd_&AdfIcIw$vy2ez>%OjD{cWtwu+wzs9HUP~#1{)?OT49@#+NArG~I zC4JPX%9Ng6+)7p7{ZsSt?Exy^pi(%`x=E|QI_hzzwwJnH*SuByOAA#_KQQOim8(?y z&ZFoH(SN6sd#`WY*8M#l{tt0~x;H`#Q*3r8vkg>eyK{%JdXT<}_lb61H%wDfufOf> z_Z3Zb&e{3zlf9&>yJ}PS#yOHXmFInhIZez*FazAr{7 z+U3I*|B`Mhz4uvASkfp>e48;#VplGWVOGRPM6R3kVJ3WiiTs!_X_)X^5)v9HAPo)- J5t;sd{4bd`DTe?6 literal 0 HcmV?d00001 diff --git a/asdf/_tests/data/no_junk.asdf b/asdf/_tests/data/no_junk.asdf new file mode 100644 index 0000000000000000000000000000000000000000..e1626ba1e96e558bf2130b6f3bd93fd7acc87cc4 GIT binary patch literal 3547 zcma*qdr(tX9tUu?P^u})!&cN%xjd}`fdmSKsz0J2%1cBPA1GeP4M~Lrk_*CGR~Zpu zv~B2G#qN}1%eqSKs@<-DD=W@0D%i0CA|pkxl~)ER%eGbQYTX<1jj~Ril|T60bGhgI z&iS2lf5Y{VuZ~#8NW=l+0Fj63I(2oDJU&967$MwzQ@H81ULF@KTuVe=N%APhjp5mh zFg>qNSBp7CZWyaqDE&o#etwKwx>m>eo7#TD(?UjA!tiIkR>^N;b)4{s z5Ruu==JG17E{sW1am>U_BDg#*Q=84{^uCNro5f|b8C)1MPsQ`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WX<@ z=2j)vc?<^lf zUjFMa?b2P+)1LFRr9R2`!=(*mH2i39H9AWDH9mcZ8gJ0G_TuRB$OiHbd8iF6>7!0n zru6LMR;v2$pPG+v4^a6AmBM+}O z{yUZ2dwt`!?(gaFe~A0jy%AcNVzWD$ZJ?Kv*Rhzmu&QZ8i+5UL3k@8nD8Oz^3L&x0P#(gTjq#W0fHs#3?%Kw+Q;e1;k zEiWJVyv8^}(zwhRd({ASHQS1Q{(U!D+1`D%zm%uYqC-)V6Fv0jcdOs&`(lKmT|R8_ zFX^Vzd!Gf#l16Fbvy531yK-p^vm!nsa^0kFGU3BZ Date: Mon, 12 Aug 2024 13:39:25 -0400 Subject: [PATCH 2/3] add change log entry --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2a441728c..e9103db5f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,7 @@ 3.5.0 (unreleased) ------------------ -- +- handle junk bytes after tree (before or after blocks) [#1822] 3.4.0 (2024-08-04) ------------------ From 8408ecaf9d9f00e636f3a5baa19f287cc782084a Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 12 Aug 2024 13:40:03 -0400 Subject: [PATCH 3/3] rename test --- asdf/_tests/{test_junk.py => test_junk_after_tree.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename asdf/_tests/{test_junk.py => test_junk_after_tree.py} (100%) diff --git a/asdf/_tests/test_junk.py b/asdf/_tests/test_junk_after_tree.py similarity index 100% rename from asdf/_tests/test_junk.py rename to asdf/_tests/test_junk_after_tree.py