From 24e047b1eb31c51ef1020571a8442fb00344cf87 Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Thu, 17 Nov 2022 13:49:22 +0100 Subject: [PATCH 1/2] tests: fix gall request / ames flow killing test The faliing test was expecting ames to give a %done to %gall but https://github.com/urbit/urbit/pull/5977, changed that, so %ames doesnt give %done for %cork acks. --- pkg/arvo/lib/test/ames-gall.hoon | 2 +- pkg/arvo/tests/sys/grq.hoon | 57 ++++++++++++++++++++------------ 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/pkg/arvo/lib/test/ames-gall.hoon b/pkg/arvo/lib/test/ames-gall.hoon index ac556b47c..fe88d6091 100644 --- a/pkg/arvo/lib/test/ames-gall.hoon +++ b/pkg/arvo/lib/test/ames-gall.hoon @@ -1,5 +1,5 @@ /+ *test, test-pub, test-sub -/= ames-raw /sys/vane/ames +/= ames-raw /sys/vane/ames /= gall-raw /sys/vane/gall :: =/ ames-bunt (ames-raw ~zod) diff --git a/pkg/arvo/tests/sys/grq.hoon b/pkg/arvo/tests/sys/grq.hoon index 7bf1e0a6b..c2a45bb0d 100644 --- a/pkg/arvo/tests/sys/grq.hoon +++ b/pkg/arvo/tests/sys/grq.hoon @@ -12,6 +12,7 @@ ::=^ * ames.bud :: (ames-call:v ames.bud ~[/none] [%spew ~[%msg %snd %rcv %odd]] *roof) :: poke %sub to tell it to subscribe + ~& > 'poke %sub to tell it to subscribe' =/ =task:gall [%deal [~nec ~nec] %sub %poke watch+!>(~bud)] =^ t1 gall.nec %: gall-check-call:v gall.nec @@ -25,6 +26,7 @@ == :- t1 |. :- %| :: handle gall passing the %watch to itself, which passes to ames + ~& > 'handle gall passing the %watch to itself, which passes to ames' =^ t2 gall.nec %: gall-check-call:v gall.nec [~1111.1.1 0xdead.beef *roof] @@ -38,6 +40,7 @@ == :- t2 |. :- %| :: subscriber ames handles %plea from gall, gives a packet to vere + ~& > 'subscriber ames handles %plea from gall, gives a packet to vere' =^ t3 ames.nec %: ames-check-call:v ames.nec [~1111.1.1 0xdead.beef *roof] @@ -57,6 +60,7 @@ == :- t3 |. :- %| :: publisher ames hears %watch, passes to gall + ~& > 'publisher ames hears %watch, passes to gall' =^ t4 ames.bud %: ames-check-call:v ames.bud [~1111.1.2 0xbeef.dead *roof] @@ -73,6 +77,7 @@ == :- t4 |. :- %| :: publisher gall hears %watch from ames, passes to itself + ~& > 'publisher gall hears %watch from ames, passes to itself' =^ t5 gall.bud %: gall-check-call:v gall.bud [~1111.1.2 0xbeef.dead *roof] @@ -86,6 +91,7 @@ == :- t5 |. :- %| :: publisher gall runs %pub with %watch, gives ack to itself + ~& > 'publisher gall runs %pub with %watch, gives ack to itself' =^ t6 gall.bud %: gall-check-call:v gall.bud [~1111.1.2 0xbeef.dead *roof] @@ -97,6 +103,7 @@ == :- t6 |. :- %| :: gall gives ack to ames + ~& > 'gall gives ack to ames' =^ t7 gall.bud %: gall-check-take:v gall.bud [~1111.1.2 0xbeef.dead *roof] @@ -107,6 +114,7 @@ == :- t7 |. :- %| :: publisher ames hears ack from gall, sends over the network + ~& > 'publisher ames hears ack from gall, sends over the network' =^ t8 ames.bud %: ames-check-take:v ames.bud [~1111.1.2 0xbeef.dead *roof] @@ -120,6 +128,7 @@ == :- t8 |. :- %| :: subscriber ames hears watch-ack packet, gives to gall + ~& > 'subscriber ames hears watch-ack packet, gives to gall' =^ t9 ames.nec %: ames-check-call:v ames.nec [~1111.1.3 0xdead.beef *roof] @@ -139,6 +148,7 @@ == :- t9 |. :- %| :: gall gives %done to itself + ~& > 'gall gives %done to itself' =^ t10 gall.nec %: gall-check-take:v gall.nec [~1111.1.3 0xdead.beef *roof] @@ -151,6 +161,7 @@ == :- t10 |. :- %| :: gall gives watch-ack to itself + ~& > 'gall gives watch-ack to itself' =^ t11 gall.nec %: gall-check-take:v gall.nec [~1111.1.3 0xdead.beef *roof] @@ -161,6 +172,7 @@ == :- t11 |. :- %| :: start the clog and kick process; give clog to publisher gall + ~& > 'start the clog and kick process; give clog to publisher gall' =^ t12 gall.bud %: gall-check-take:v gall.bud [~1111.1.4 0xbeef.dead *roof] @@ -172,6 +184,7 @@ == :- t12 |. :- %| :: gall gives %kick %boon to ames + ~& > 'gall gives %kick %boon to ames' =^ t13 gall.bud %: gall-check-take:v gall.bud [~1111.1.4 0xbeef.dead *roof] @@ -182,6 +195,7 @@ == :- t13 |. :- %| :: ames gives kick over the network + ~& > 'ames gives kick over the network' =^ t14 ames.bud %: ames-check-take:v ames.bud [~1111.1.4 0xbeef.dead *roof] @@ -197,6 +211,7 @@ == :- t14 |. :- %| :: subscriber ames receives kick, gives to gall and gives ack to unix + ~& > 'subscriber ames receives kick, gives to gall and gives ack to unix' =^ t15 ames.nec %: ames-check-call:v ames.nec [~1111.1.5 0xdead.beef *roof] @@ -218,6 +233,7 @@ == :- t15 |. :- %| :: subscriber gall receives kick %boon from ames, gives to self + ~& > 'subscriber gall receives kick %boon from ames, gives to self' =^ t16 gall.nec %: gall-check-take:v gall.nec [~1111.1.5 0xdead.beef *roof] @@ -231,6 +247,7 @@ == == :: subscriber gall receives %kick from itself + ~& > 'subscriber gall receives %kick from itself' =^ t17 gall.nec %: gall-check-take:v gall.nec [~1111.1.5 0xdead.beef *roof] @@ -244,6 +261,7 @@ == :- t17 |. :- %| :: gall receives %deal %watch from itself, passes to ames + ~& > 'gall receives %deal %watch from itself, passes to ames' =^ t18 gall.nec %: gall-check-call:v gall.nec [~1111.1.5 0xdead.beef *roof] @@ -255,6 +273,7 @@ == :- t18 |. :- %| :: subscriber ames sends new %watch + ~& > 'subscriber ames sends new %watch' =^ t19 ames.nec %: ames-check-call:v ames.nec [~1111.1.5 0xdead.beef *roof] @@ -273,6 +292,7 @@ == :- t19 |. :- %| :: subscriber ames sends %cork + ~& > 'subscriber ames sends %cork' =^ t20 ames.nec %: ames-check-call:v ames.nec [~1111.1.5 0xdead.beef *roof] @@ -290,6 +310,7 @@ == == :: publisher ames hears %kick ack + ~& > 'publisher ames hears %kick ack' :- t20 |. :- %| =^ t21 ames.bud %: ames-check-call:v ames.bud @@ -303,6 +324,7 @@ == == :: publisher ames hears new %watch + ~& > 'publisher ames hears new %watch' :- t21 |. :- %| =^ t22 ames.bud %: ames-check-call:v ames.bud @@ -317,6 +339,7 @@ == == :: publisher gall hears new %watch, passes to self + ~& > 'publisher gall hears new %watch, passes to self' :- t22 |. :- %| =^ t23 gall.bud %: gall-check-call:v gall.bud @@ -328,6 +351,7 @@ == == :: publisher gall runs :pub's +on-watch, gives ack to self + ~& > 'publisher gall runs :pub\'s +on-watch, gives ack to self' :- t23 |. :- %| =^ t24 gall.bud %: gall-check-call:v gall.bud @@ -338,7 +362,8 @@ [%give %unto %watch-ack ~] == == - :: publisher gall hears %watch-ack, gives to ames + :: publisher gall hears %watch-ack, gives to ames + ~& > 'publisher gall hears %watch-ack, gives to ames' :- t24 |. :- %| =^ t25 gall.bud %: gall-check-take:v gall.bud @@ -349,6 +374,7 @@ == == :: publisher ames hears done from gall, sends over the network + ~& > 'publisher ames hears done from gall, sends over the network' :- t25 |. :- %| =^ t26 ames.bud %: ames-check-take:v ames.bud @@ -362,6 +388,7 @@ == == == :: publisher ames hears %cork, passes to itself + ~& > 'publisher ames hears %cork, passes to itself' :- t26 |. :- %| =^ t27 ames.bud %: ames-check-call:v ames.bud @@ -376,6 +403,7 @@ == :- t27 |. :- %| :: publisher ames hear cork plea from self, give %done to self + ~& > 'publisher ames hear cork plea from self, give %done to self' =^ t28 ames.bud %: ames-check-call:v ames.bud [~1111.1.8 0xbeef.dead *roof] @@ -385,6 +413,7 @@ == == :: publisher ames hears cork done from self, sends ack packet + ~& > 'publisher ames hears cork done from self, sends ack packet' :- t28 |. :- %| =^ t29 ames.bud %: ames-check-take:v ames.bud @@ -399,6 +428,7 @@ == == == :: subscriber ames hears %watch-ack, gives to gall + ~& > 'subscriber ames hears %watch-ack, gives to gall' :- t29 |. :- %| =^ t30 ames.nec %: ames-check-call:v ames.nec @@ -417,6 +447,7 @@ == == :: subscriber gall hears new %watch-ack from ames, gives to self + ~& > 'subscriber gall hears new %watch-ack from ames, gives to self' :- t30 |. :- %| =^ t31 gall.nec %: gall-check-take:v gall.nec @@ -433,6 +464,7 @@ == == :: subscriber gall hears new %watch-ack from self, tells :sub + ~& > 'subscriber gall hears new %watch-ack from self, tells :sub' :- t31 |. :- %| =^ t32 gall.nec %: gall-check-take:v gall.nec @@ -443,6 +475,7 @@ ~ == :: subscriber ames hears %cork ack + ~& > 'subscriber ames hears %cork ack' :- t32 |. :- %| =^ t33 ames.nec %: ames-check-call:v ames.nec @@ -452,27 +485,9 @@ 0x5f.f966.8e00.0449.bdec.9006.c7e5.1237. 1d87.53fe.d7bb.ad00.0100.0223.c6a8.5800 == - :~ :- :~ /sys/way/~bud/pub - /use/sub/0w1.d6Isf/out/~bud/pub/1/sub-foo/~bud - /init - == - [%give %done ~] - :- ~[/ames] [%pass /pump/~bud/0 %b %rest ~1111.1.5..00.02.00] - == + [~[/ames] [%pass /pump/~bud/0 %b %rest ~1111.1.5..00.02.00]]~ == - :: subscriber gall hears %cork ack from ames - :- t33 |. :- %| - =^ t34 gall.nec - %: gall-check-take:v gall.nec - [~1111.1.10 0xdead.beef *roof] - :+ /sys/way/~bud/pub - :~ /use/sub/0w1.d6Isf/out/~bud/pub/1/sub-foo/~bud - /init - == - [%ames %done ~] - ~ - == - :- t34 |. :- %& + :- t33 |. :- %& ;: weld %+ expect-eq !> (sy 0 ~) From ce06936788b39ab2bb333d7129a03435d46efe1e Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Fri, 17 Feb 2023 12:10:17 +0100 Subject: [PATCH 2/2] test: load agents using %load task --- pkg/arvo/lib/test/ames-gall.hoon | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/lib/test/ames-gall.hoon b/pkg/arvo/lib/test/ames-gall.hoon index fe88d6091..6f0af1a12 100644 --- a/pkg/arvo/lib/test/ames-gall.hoon +++ b/pkg/arvo/lib/test/ames-gall.hoon @@ -187,7 +187,8 @@ ++ load-agent |= [=ship =gall-gate =dude:gall =agent:gall] =^ * gall-gate - (gall-call gall-gate ~[/jolt] [%jolt %base dude] *roof) + %+ gall-call gall-gate + [~[/load] load/[[dude [ship %base da+~1111.1.1] agent]~] *roof] =^ * gall-gate =/ =sign-arvo :+ %clay %writ @@ -195,7 +196,7 @@ %: gall-take gall-gate /sys/cor/[dude]/(scot %p ship)/base/(scot %da ~1111.1.1) - ~[/jolt] + ~[/load] sign-arvo *roof ==