From aec8667eb056cb564e301d6c0937da1e4500a4d3 Mon Sep 17 00:00:00 2001 From: chyyuu Date: Mon, 29 Apr 2019 16:43:41 +0800 Subject: [PATCH] add exec fork readv test apps --- testsuits_alpine/exec | Bin 0 -> 13992 bytes testsuits_alpine/exec.c | 32 +++++++++++++++++++++ testsuits_alpine/exec.static | Bin 0 -> 22376 bytes testsuits_alpine/forktree | Bin 0 -> 18952 bytes testsuits_alpine/forktree.c | 38 +++++++++++++++++++++++++ testsuits_alpine/readv | Bin 0 -> 18952 bytes testsuits_alpine/readv.c | 52 +++++++++++++++++++++++++++++++++++ 7 files changed, 122 insertions(+) create mode 100755 testsuits_alpine/exec create mode 100644 testsuits_alpine/exec.c create mode 100755 testsuits_alpine/exec.static create mode 100755 testsuits_alpine/forktree create mode 100644 testsuits_alpine/forktree.c create mode 100755 testsuits_alpine/readv create mode 100644 testsuits_alpine/readv.c diff --git a/testsuits_alpine/exec b/testsuits_alpine/exec new file mode 100755 index 0000000000000000000000000000000000000000..64359b4995c9dcfb6439674caf633c5ca96cca8d GIT binary patch literal 13992 zcmeHOU2GKB6~4CP;2L9FY1%*u?GWM0M6k9o5Mr{;8h2qxp>+W#Q3zVCy|dm8`(y2n z!H}YEyClL{wsIS#A`gvFr7DqHDX!WFsH)15QIZO^qUsBxFHRfEZk-hK(3XgX>38Pd zGaja1)K-<+hdI*BIp;e+_uMlxyE8j?zaHMRv%aoQFg1uT2-42AOC+QWm2M?~g~T?| zjQs=R)8by}_t==Uha`hlQg{8Gyh-5=;1oBe>|VY~`7!4TiBnuHnxKL}%!Qf<#Wj*a z>0bV2m6SQ#o$)jZ25I)*;b+JJ#M~W6rOa)#&0;QiC+}4Ao>H9SNVTUBkp4Ivk`ynf z@tAWz2d|njn!-=x86SO4l z0D9jNmhCn0SPlHa8u(Xg;3t4<*u3-#0L=?Re*oK3b-oE)!{()4089BFu7O_!u3_`i z5P*lgAapui?-R?M>!eQk?6&dcV(0x5U|isMjs*VcXvVX-!y*#No6(W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s*h0v?k^n^-__Nr)xnNlj(+>;%t?e(?53IO1Tx@92>M;s1pZpH^9q>Egcfjv} z-vPe^eh2&x_#N;&@E>#lFZyiaP_Irea*3GZ#gHVm&=>EuY~ppFf4OaC3E*|hyf!dI zZ+Jnx)^UcOZ9u#h@I9#tUIWO_M4wVPGkPu~DyVgXDvg-2(Z%O7UOP$aXNk_KLKyE< zIzLX?&uZ}FwUsm;q5SxIWj^DIr}gdL`ul-VP5k-7|CeCSpHnK0 z?aMOp$FRBM+tqc#oa^TpW#;r^mnZ(La$wH$PJ@Nc` z%$&#J@xAf%n-gJt{Dh`F6~C@jX5M@;7~Ju-{$IlJ>g#}2k@Li_Tq{k?3y!B0yyJfj zFpbY`a{f<4CnkuGm(&)|AJ&Ty-0=%RX<7Ie<6nY1oqIgK^S>NgX#*-yauCm(>*u<@ z1e<$&{(dWT*2+ATTzDb%@sSbr4)`EdPONLrdy{Ge2wz2-<# kcnyrkSMH9L<2O5q6jVFx7((u--R1k3O8B}9V}CdF4{*at;s5{u literal 0 HcmV?d00001 diff --git a/testsuits_alpine/exec.c b/testsuits_alpine/exec.c new file mode 100644 index 0000000..81f5128 --- /dev/null +++ b/testsuits_alpine/exec.c @@ -0,0 +1,32 @@ +#include +int main() +{ + int child, grandson; + char *sargs[] = { "/bin/echo", "Son ", "Hello", "World!", NULL}; + char *gargs[] = { "/bin/echo", "Grandson ", "Hello", "World!", NULL}; + + if (!(child = fork())) + { + /* child */ + printf("child:s1: pid %d: %d is my father\n", getpid(), getppid()); + if(!(grandson=fork())) + { + printf("grandson: pid %d: %d is my father\n", getpid(), getppid()); + execve("/bin/echo", gargs, NULL); + printf("pid %d: I am back, something is wrong!\n", getpid()); + }else{ + printf("child:s2: pid %d: %d is my father\n", getpid(), getppid()); + wait4(grandson, NULL, 0, NULL); + execve("/bin/echo", sargs, NULL); + printf("pid %d: I am back, something is wrong!\n", getpid()); + } + } + else + { + int myself = getpid(); + printf("parent: pid %d: %d is my son\n", myself, child); + wait4(child, NULL, 0, NULL); + printf("pid %d: done\n", myself); + } + return 0; +} diff --git a/testsuits_alpine/exec.static b/testsuits_alpine/exec.static new file mode 100755 index 0000000000000000000000000000000000000000..cc84df2aa5818b51d84e7abedee56bc5ac782418 GIT binary patch literal 22376 zcmeHveRNbsw(sern{-0p1OX037?}`+QMKGUK;TC~P_hcE6!eoVZdoqKh zP$&@WcwZt+<87^@RezJqOEo}dDkS?Q8aAp*mdB^kJOj^6&3eM)^a_o7uwgvORLeAq zW;zyc0;&pEC7a)Se!4%!DEFirsfkBm!mCK)RV4Auv^Xg`Gqoqti$4mL5ub%#128^y zB-@!O9}{4=1CQwaqmL=RJ4|}tGQL=nPcuyx`TSAdEdQf)&2}4-@-W9OZ7^!O?lV#o zZpup=2QN(G4}1$;NcLy;Gg2N0H|Z9PgCDrj;G<$3{9F=VI}ZMF65cQl-dbw(bK!kK z0v9B3K>`;fa6tkWByd3j7bI{&0v9B3K?47;N}yOfge|U?m@5b+9THbG)&VZAQ|VdRmXMpEG4!yIo+>VoS)z)UL#5EV`yWD?i3MU3*$N0$M3U zQutFANntIq&@_~0)~B<`19qlv+tbRF-C2nbSZA}*oJb@w5=R`gg zEM19@Smbd>7RJCL&5mqJEoYczw@2;r9Iby^C@b^G(N=&*yShgs7e5~m+srqMf4mcc8^_oFic7K0@*$oq@32Vb(sJN&@`_8$8X_ebjh7 zV&jrm>HH!5;990EX~3+5yN~2Gt3wd{lAoZgJ@qv)V|(-a)cuUVP?Fo>QTMR+v#Csf zl|^j-MwFdB!7Q3Z)ux~*>r?k6KGc>&9_TlR`bCe?CAt$mZbXmkK7KiRT8rXpsBuFXi&$spa9-US^e$>UhSk7S_hZO@ zY-E3qY`>BH4YGYk_DR<1eg=pjVEdy1BJ@2*c0aOD8CjaE|2DEc!09I(Z4%}}bvG*y zH49?Pm6)A24*t=V0CyPqI?BHdSx1*V2y_GZTi|J3sf66BJk%^is&0uuN*H9Gge)MH@kwRz$Uq6C$6OiI>1Hova%^2nG4a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EX#o@fdO`E-jh!B8^gS?p89 zJ^TIP`%r~_)KscWdtFPFp|Rpk&w%lk&+j)(U-c>@?=Sz4v^|e6o^SL2YjA(D8^1k0 zcd2}~=l7)&U06u}ll`AVhsGY;^LrKl56LV!N8)yK`Rw-*$h_tA`_~M1XHojRBJP>( znZ5vt*Iq=mYPX`Sr_mMh`)deDhwE=fm1bDmA62Y-Hr<@cyaYn!Yjs!3_Wu6Y;gB|@ z{4x&4Tw`RS+Tl4bhl)#4+f-5 zinwRLZfgzu*?!CvOYu>AvqxuJ`4}ztTaQpebO7ERKc9n%X=k8au Y*XP_{e|o*GX8*OQvcKJD;A6#q0f5{e3;+NC literal 0 HcmV?d00001 diff --git a/testsuits_alpine/forktree.c b/testsuits_alpine/forktree.c new file mode 100644 index 0000000..0a27b6a --- /dev/null +++ b/testsuits_alpine/forktree.c @@ -0,0 +1,38 @@ +#include +#include + +#define DEPTH 4 +#define SLEEP_TIME 1 +void forktree(const char *cur); + +void +forkchild(const char *cur, char branch) { + char nxt[DEPTH + 1]; + + if (strlen(cur) >= DEPTH) + return; + + snprintf(nxt, DEPTH + 1, "%s%c", cur, branch); + if (fork() == 0) { + forktree(nxt); + //yield(); + exit(0); + } +} + +void +forktree(const char *cur) { + printf("%04x: I am '%s'\n", getpid(), cur); + + forkchild(cur, '0'); + forkchild(cur, '1'); +} + +int +main(void) { + printf("forktree process will sleep %d ticks\n",SLEEP_TIME); + sleep(SLEEP_TIME); + forktree(""); + return 0; +} + diff --git a/testsuits_alpine/readv b/testsuits_alpine/readv new file mode 100755 index 0000000000000000000000000000000000000000..393e6561adeed7bfed1b6e9ac5118f89725a4c40 GIT binary patch literal 18952 zcmeHPdu$uWnV%&^nYL_7ww&0Cn`Y}+t&>`m=r9<{)jL|J@`6_DS1Q@NLAYEtE54V`$5TWRLkA8Me8x;8WJVDT4^g)2#KlC z?I61V2{iAfPf~@Dn6kWFo+-sbxac(vGj-ZgRp#21!dz!1HFdjZmT3pNUIdd}Fs$(4 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CR8zb{Q`e8u2q)7Sf)@`g|KfX(uJYBX_8F&AYzw*7up=;iun52FobqiPu3Adl` ltF-Rqv8yc9`J7%)-QsfYu0Jgks@Z=hqWs+KGH|itzX0-N0r&s_ literal 0 HcmV?d00001 diff --git a/testsuits_alpine/readv.c b/testsuits_alpine/readv.c new file mode 100644 index 0000000..f808b4b --- /dev/null +++ b/testsuits_alpine/readv.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include +#include +char head[1024],foo[48], bar[51], baz[49]; +struct iovec iov[3]; +int main () +{ + + + ssize_t nr; + int fd, i; + + fd = open ("hello.sh", O_RDONLY); + if (fd==-1){ + perror ("open"); + return 1; + } + nr=read(fd, head, sizeof(head)); + if(nr==-1) { + perror("read"); + return 2; + } + + printf ("read size %d, head: %s\n", nr, (char *) head); + + /* set up our iovec structures */ + iov[0].iov_base = foo; + iov[0].iov_len = sizeof (foo); + iov[1].iov_base = bar; + iov[1].iov_len = sizeof (bar); + iov[2].iov_base = baz; + iov[2].iov_len = sizeof (baz); + + /* read into the structures with a single call */ + nr = readv (fd, iov, 3); + if (nr==-1) { + perror ("readv"); + return 1; + } + + for (i = 0; i < 3; i++) + printf ("IOV%d: size:%d %s\n", i, nr, (char *) iov[i].iov_base); + + if (close (fd)) { + perror ("close"); + return 1; + } + + return 0; +}