Page MenuHomeFreeBSD

Replace ncat by a perl script for running an SCTP discard server
ClosedPublic

Authored by tuexen on Apr 28 2019, 10:57 AM.
Tags
None
Referenced Files
F105985739: D20086.diff
Mon, Dec 23, 12:15 PM
F105937806: D20086.id56773.diff
Sun, Dec 22, 7:57 PM
Unknown Object (File)
Thu, Dec 19, 7:07 AM
Unknown Object (File)
Wed, Dec 4, 4:48 PM
Unknown Object (File)
Oct 14 2024, 11:15 AM
Unknown Object (File)
Oct 5 2024, 1:08 AM
Unknown Object (File)
Oct 3 2024, 9:10 PM
Unknown Object (File)
Oct 2 2024, 1:09 PM
Subscribers

Details

Summary

Some test scripts use ncat --sctp --listen port to run an SCTP discard server in the background.
However, when running in the background, stdin is closed and ncat initiates a graceful shutdown
of the SCTP association. This is not expected by the client.

Therefore, the ncat-based discard server is replaced by a perl-based one.

In addition, to remove the dependency from ncat, which needs to be installed via the nmap port, also the
code testing for a free SCTP port is changed to use the perl-based client.

This fixes:

  • common.ip.t_dtrace_contrib.tst_ipv4localsctp_ksh
  • common.ip.t_dtrace_contrib.tst_localsctpstate_ksh

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lwhsu requested changes to this revision.Apr 28 2019, 6:25 PM

I've tested test in my development environment and testvm images from artifact.ci.freebsd.org, for making these two tests passing, we also need to modify tst.localsctpstate.ksh.out to added an extra blank line at the end of the file. I think it's acceptable for now, and other .out files also have this line. I would like to check that extra blank line is generated by the test driver or these ksh test scripts later, and fix them all together.

cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh
144 ↗(On Diff #56773)

After checking with tst.ipv4localsctp.ksh.out and guessing the intent of the code, I think these 4 lines need to be changed to:

printf("ip:::send - %s\n", ipsend >= 7 ? "yes" : "no");
printf("ip:::receive - %s\n", ipreceive >= 7 ? "yes" : "no");
printf("sctp:::send - %s\n", sctpsend >= 7 ? "yes" : "no");
printf("sctp:::receive - %s\n", sctpreceive >= 7 ? "yes" : "no");
This revision now requires changes to proceed.Apr 28 2019, 6:25 PM
tuexen added inline comments.
cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh
144 ↗(On Diff #56773)

Fixed. It was debug output I used a while back and forgot to remove.

I've tested test in my development environment and testvm images from artifact.ci.freebsd.org, for making these two tests passing, we also need to modify tst.localsctpstate.ksh.out to added an extra blank line at the end of the file. I think it's acceptable for now, and other .out files also have this line. I would like to check that extra blank line is generated by the test driver or these ksh test scripts later, and fix them all together.

Just to double check: tst.ipv4localsctp.ksh.out and tst.localsctpstate.ksh.out both contain a single empty line at the end. Do you want me to add another one to tst.localsctpstate.ksh.out. This would make them inconsistent...

This revision was not accepted when it landed; it landed in state Needs Review.Apr 28 2019, 7:07 PM
This revision was automatically updated to reflect the committed changes.

Just to double check: tst.ipv4localsctp.ksh.out and tst.localsctpstate.ksh.out both contain a single empty line at the end. Do you want me to add another one to tst.localsctpstate.ksh.out. This would make them inconsistent...

https://svnweb.freebsd.org/base/head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh.out?revision=338213&view=markup

tst.localsctpstate.ksh.out doesn't seem to have an empty line in the end.

Just to double check: tst.ipv4localsctp.ksh.out and tst.localsctpstate.ksh.out both contain a single empty line at the end. Do you want me to add another one to tst.localsctpstate.ksh.out. This would make them inconsistent...

https://svnweb.freebsd.org/base/head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh.out?revision=338213&view=markup

tst.localsctpstate.ksh.out doesn't seem to have an empty line in the end.

Yes, you are right. Not sure what I was looking at. Should I add the trailing empty line to get things consistent?

Yes, you are right. Not sure what I was looking at. Should I add the trailing empty line to get things consistent?

Oh I just committed rS346873, let see if it helps.

Yes, you are right. Not sure what I was looking at. Should I add the trailing empty line to get things consistent?

Oh I just committed rS346873, let see if it helps.

Great, thanks. Please drop me a note if there are any other issues.