Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328816

Summary: Test Connection does not permit host names with underscore characters.
Product: z_Archived Reporter: Paul Slauenwhite <paulslau>
Component: TPTPAssignee: Paul Slauenwhite <paulslau>
Status: CLOSED FIXED QA Contact: Bozier jerome <jerome.bozier>
Severity: major    
Priority: P1 CC: jerome.bozier, kathy
Version: unspecifiedFlags: jerome.bozier: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: adopter
Attachments:
Description Flags
Patch. none

Description Paul Slauenwhite CLA 2010-10-27 08:40:42 EDT
Test Connection does not permit host names with underscore characters.

Steps to reproduce:

1) Open the hosts file (http://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system)

2) Add the following:

<current IP address>    mymachine_1

3) Click the Test Connection button for locations in the Test Navigator, location editor, and Windows >> Preferences >> Test preference page and note the 'Invalid host name or IP address' error dialog.

Note, the Test Connection button in the Windows >> Preferences >> Agent Controller >> Hosts preference page is successful.  

Note, the TPTP test types will execute successfully when using a host name with an underscore character.   

The symptom is caused by the org.eclipse.hyades.test.ui.internal.util.TestUIUtilities.isValidHostName(String) method that validates hostnames/IPv4/IPv6 addresses based on RFC 1123/RFC 952, does not permit underscore characters.  Although underscore characters are technically not permitted in host names, DNS names and Microsoft Windows hostnames may contain underscore characters (see http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names).
Comment 1 Paul Slauenwhite CLA 2010-10-27 11:03:23 EDT
Jerome, please review.

A new test suite (/org.eclipse.hyades.test.ui.navigator.tests/junit_plugin/Test.UI.TestUIUtilitiesTest.testsuite) has been added to the TPTP Test Project test bucket and http://wiki.eclipse.org/TPTP_Test_Tools_Project_Tests#JUnit_Plug-in.
Comment 2 Paul Slauenwhite CLA 2010-10-27 11:05:25 EDT
Created attachment 181843 [details]
Patch.
Comment 3 Bozier jerome CLA 2010-10-27 11:24:21 EDT
reviewed and approved

Thanks Paul
Comment 4 Paul Slauenwhite CLA 2010-10-27 11:37:55 EDT
Patched delivered to CVS (HEAD).
Comment 5 Paul Slauenwhite CLA 2010-11-03 09:09:20 EDT
Verified in TPTP-4.7.2-201011011900.

Closing.