Hi Cyril, Jan, > After following kernel commit, the tcp_fastopen > sysctl is enabled default, so the errno will > no be ENOTSUP any more. > > Actually, the flags of send* syscall is "unsigned int", > then our test case passed "-1" to it will not be treated > as an invalid flags.
Any thoughts for this flags test? Thanks, Wanlong Gao > > commit 0d41cca490c274352211efac50e9598d39a9dc80 > Author: Yuchung Cheng <[email protected]> > Date: Thu Oct 31 09:19:32 2013 -0700 > > tcp: enable sockets to use MSG_FASTOPEN by default > > Applications have started to use Fast Open (e.g., Chrome browser has > such an optional flag) and the feature has gone through several > generations of kernels since 3.7 with many real network tests. It's > time to enable this flag by default for applications to test more > conveniently and extensively. > > Signed-off-by: Yuchung Cheng <[email protected]> > Signed-off-by: Neal Cardwell <[email protected]> > Acked-by: Eric Dumazet <[email protected]> > Signed-off-by: David S. Miller <[email protected]> > > Signed-off-by: Wanlong Gao <[email protected]> > --- > testcases/kernel/syscalls/send/send01.c | 6 ++++-- > testcases/kernel/syscalls/sendmsg/sendmsg01.c | 6 +++++- > testcases/kernel/syscalls/sendto/sendto01.c | 5 ++++- > 3 files changed, 13 insertions(+), 4 deletions(-) > > diff --git a/testcases/kernel/syscalls/send/send01.c > b/testcases/kernel/syscalls/send/send01.c > index d228422..0d91e92 100644 > --- a/testcases/kernel/syscalls/send/send01.c > +++ b/testcases/kernel/syscalls/send/send01.c > @@ -145,7 +145,7 @@ static struct test_case_t tdat[] = { > {.domain = PF_INET, > .type = SOCK_STREAM, > .proto = 0, > - .buf = (void *)-1, > + .buf = buf, > .buflen = sizeof(buf), > .flags = -1, > .retval = -1, > @@ -357,6 +357,8 @@ static void setup3(void) > { > setup1(); > > - if (tst_kvercmp(3, 6, 0) >= 0) > + if (tst_kvercmp(3, 12, 0) > 0) > + tdat[testno].experrno = EINVAL; > + else if (tst_kvercmp(3, 6, 0) >= 0) > tdat[testno].experrno = ENOTSUP; > } > diff --git a/testcases/kernel/syscalls/sendmsg/sendmsg01.c > b/testcases/kernel/syscalls/sendmsg/sendmsg01.c > index 90fbb5d..890834c 100644 > --- a/testcases/kernel/syscalls/sendmsg/sendmsg01.c > +++ b/testcases/kernel/syscalls/sendmsg/sendmsg01.c > @@ -730,8 +730,12 @@ static void setup7(void) > { > setup1(); > > - if (tst_kvercmp(3, 6, 0) >= 0) > + if (tst_kvercmp(3, 12, 0) > 0) { > tdat[testno].retval = -1; > + tdat[testno].experrno = EISCONN; > + } else if (tst_kvercmp(3, 6, 0) >= 0) { > + tdat[testno].retval = -1; > + } > } > > static void setup8(void) > diff --git a/testcases/kernel/syscalls/sendto/sendto01.c > b/testcases/kernel/syscalls/sendto/sendto01.c > index a571afd..e7c8805 100644 > --- a/testcases/kernel/syscalls/sendto/sendto01.c > +++ b/testcases/kernel/syscalls/sendto/sendto01.c > @@ -435,7 +435,10 @@ static void setup4(void) > { > setup1(); > > - if (tst_kvercmp(3, 6, 0) >= 0) { > + if (tst_kvercmp(3, 12, 0) > 0) { > + tdat[testno].retval = -1; > + tdat[testno].experrno = EISCONN; > + } else if (tst_kvercmp(3, 6, 0) >= 0) { > tdat[testno].retval = -1; > tdat[testno].experrno = ENOTSUP; > } > ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
