The type of test used for each of these men is called the Y-DNA test, which seeks to trace back the paternal line through generations from son to father to grandfather.
That would yield matches with others bearing the same surname.