Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328816 - Test Connection does not permit host names with underscore characters.
Summary: Test Connection does not permit host names with underscore characters.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact: Bozier jerome CLA
URL:
Whiteboard: adopter
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 08:40 EDT by Paul Slauenwhite CLA
Modified: 2016-05-05 10:29 EDT (History)
2 users (show)

See Also:
jerome.bozier: review+


Attachments
Patch. (2.90 KB, patch)
2010-10-27 11:05 EDT, Paul Slauenwhite CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.