The NetBSD Project

CVS log for src/tests/net/net/t_tcp.c

[BACK] Up to [cvs.NetBSD.org] / src / tests / net / net

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 24 16:53:09 2024 UTC (4 months, 3 weeks ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-1-RELEASE
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +6 -2 lines
Pull up following revision(s) (requested by rin in ticket #813):

	tests/kernel/kqueue/t_empty.c: revision 1.2
	tests/net/net/t_tcp.c: revision 1.13

tests: Fix false positives due to race b/w connect(2) and accept(2)

For kernel/kqueue/t_empty and net/net/t_tcp, there were no sync ops
b/w connect(2) and accept(2) for non-blocking socket pair on host
(rump is not used).

As a result, accept(2) can fail immediately with EAGAIN, when
kernel-side routines for connect(2) and accept(2) are processed in
different CPU cores.
1-sec sleep(3) between two syscalls seems to mitigate this problem
as far as I can see, although this should not be a perfect solution...

Thanks ozaki-r@ for discussion.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Aug 23 07:13:50 2024 UTC (4 months, 3 weeks ago) by rin
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -2 lines
tests: Fix false positives due to race b/w connect(2) and accept(2)

For kernel/kqueue/t_empty and net/net/t_tcp, there were no sync ops
b/w connect(2) and accept(2) for non-blocking socket pair on host
(rump is not used).

As a result, accept(2) can fail immediately with EAGAIN, when
kernel-side routines for connect(2) and accept(2) are processed in
different CPU cores.

1-sec sleep(3) between two syscalls seems to mitigate this problem
as far as I can see, although this should not be a perfect solution...

Thanks ozaki-r@ for discussion.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Nov 8 10:57:09 2021 UTC (3 years, 2 months ago) by rin
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Branch point for: netbsd-10
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +4 -5 lines
Fix (a kind of) violation of strict aliasing rule.

Due to the rule, "sin" and "sin6" can be treated as restrict pointers.
Compilers seem to be confused by structure copy for those pointed by
them before assignments.

For aarch64eb, GCC 9 and 10 compile t_tcp.c rev 1.11 into a code, where
fetch for "sin6->sin6_port" is preceding the structure copy "ss = bs".
This results in failure of connect(2) with EADDRNOOTAVAIL.

Revision 1.10.4.1: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:32 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +97 -57 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Oct 26 23:08:27 2019 UTC (5 years, 2 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +97 -57 lines
- use accept4 instead of paccept for everyone.
- add test for accept preserving non-block
- comment on FreeBSD and Linux behavior.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Feb 16 22:20:18 2018 UTC (6 years, 11 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-base, phil-wifi-20190609, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Branch point for: phil-wifi
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +16 -15 lines
Use the same variable name for the accepted socket as with the AF_LOCAL test.
Call getpeereid on the accepted socket.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Feb 16 19:24:16 2018 UTC (6 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -10 lines
ensure that getpeereid does not succeed on tcp sockets.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Feb 16 16:30:20 2018 UTC (6 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +4 -3 lines
explain what's going on before we fix it.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Feb 16 16:23:15 2018 UTC (6 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +19 -17 lines
add getpeereid tests for non-unix sockets, returns garbage...

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Aug 28 10:19:57 2017 UTC (7 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +138 -49 lines
add tests for 4->6 connections.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Aug 28 09:30:29 2017 UTC (7 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +96 -36 lines
add v6 tests

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Mar 4 18:52:01 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +11 -4 lines
make it work on linux, be pickier about errors, and correct variable type.

Revision 1.3.8.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:52 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.3.8.1: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.8.1: +220 -0 lines
Rebase to HEAD as of a few days ago.

Revision 1.3.4.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:42:22 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.3.4.1: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.4.1: +220 -0 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.3.8.1
Thu Oct 17 12:53:28 2013 UTC (11 years, 3 months ago) by tls
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.3: +0 -220 lines
file t_tcp.c was added on branch tls-maxphys on 2014-08-20 00:04:52 +0000

Revision 1.3.4.1
Thu Oct 17 12:53:28 2013 UTC (11 years, 3 months ago) by yamt
Branches: yamt-pagecache
FILE REMOVED
Changes since revision 1.3: +0 -220 lines
file t_tcp.c was added on branch yamt-pagecache on 2014-05-22 11:42:22 +0000

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Oct 17 12:53:28 2013 UTC (11 years, 3 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: yamt-pagecache, tls-maxphys
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +9 -4 lines
CID 1107548: resource leak

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Oct 12 17:26:32 2013 UTC (11 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +61 -26 lines
more tests

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Oct 12 15:29:16 2013 UTC (11 years, 3 months ago) by christos
Branches: MAIN
new test to check if non-blocking sockets are reset to blocking on the
accepted file descriptor.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>