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
Unknown Object (File)
Tue, Apr 9, 8:12 PM
Unknown Object (File)
Feb 20 2024, 7:41 AM
Unknown Object (File)
Feb 17 2024, 1:45 PM
Unknown Object (File)
Feb 15 2024, 1:50 PM
Unknown Object (File)
Feb 13 2024, 11:08 AM
Unknown Object (File)
Feb 10 2024, 11:56 PM
Unknown Object (File)
Dec 20 2023, 12:47 AM
Unknown Object (File)
Dec 13 2023, 4:26 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.