diff --git a/Tests/Kernels/NetworkTest/Kernel.cs b/Tests/Kernels/NetworkTest/Kernel.cs index 999ea1c224..215dc44bc3 100644 --- a/Tests/Kernels/NetworkTest/Kernel.cs +++ b/Tests/Kernels/NetworkTest/Kernel.cs @@ -122,6 +122,7 @@ protected override void Run() TestDhcpConnection(); TestTcpConnection(); TestDnsConnection(); + TestIcmpConnection(); TestController.Completed(); } @@ -215,5 +216,22 @@ private void TestDnsConnection() Global.debugger.Send("IP: " + ip); } } + + private void TestIcmpConnection() + { + Global.debugger.Send("Creating ICMP client..."); + + using (var xClient = new ICMPClient()) + { + xClient.Connect(new Address(127, 0, 0, 1)); //Cloudflare DNS + + xClient.SendEcho(); + + var endpoint = new EndPoint(Address.Zero, 0); + int time = xClient.Receive(ref endpoint); + + Assert.IsFalse(time == -1, "ICMP echo works"); + } + } } }