Rob Elliot was handed his chance to stake a claim for a place in the Republic of Ireland's Euro 2016 squad against Slovakia, but left the field injured after only 14 minutes.
The Newcastle goalkeeper started for his country for just the second time but landed awkwardly as he dived in vain for Slovakia’s opening goal and left the pitch on a stretcher.
Darren Randolph took his place between the posts.
The goal came after midfielder Erik Sabo made the most of Stephen Ward's absence to break free down the right and, when he squared for Miroslav Stoch, the striker dispatched a side-footed effort past the helpless Elliot.
But the home side were back in it within seven minutes when, having been needlessly tripped by Matus Kozacik as he ran on to Eunan O'Kane's pass, Long converted the resulting penalty, sending the keeper the wrong way.
Remarkably, Ireland were awarded a second spot-kick less than two minutes later when Martin Skrtel tripped Long and this time James McClean stepped up to convert and make it 2-1.
The Ireland team features 10 changes for the friendly clash with Slovakia, with a rare run-out for central defender Paul McShane, who won just his second cap under O'Neill and was included in the XI for the first time since a 2-0 defeat by Spain at New York's Yankee Stadium in June 2013.
However his own goal just on the stroke of half-time left the score at 2-2 at the interval.