Are there restrictions to traveling within the EU as far as covid testing requirements? We are US citizens hoping to fly from Reykjavik to Madrid and back for a long weekend prior to returning to the US. Any advice? We have been in Iceland for just over2 weeks.
Iceland, while in Schengen, is not in the EU.
Best place to get the best info will be the Spanish government and Iceland government webpages.
Things change from time to time, and sometimes third parties are slow to update.
Spain currently has Iceland lumped in with it's group that includes EU and Schengen Countries. Since you have been in Iceland greater than 14 Days, restrictions on coming from the US do not apply, though you want some physical proof that you have been in Iceland that time (Itinerary, legible stamp in your passport, etc).
You can read the requirements here, https://www.iatatravelcentre.com/world.php and as Nigel mentioned, follow up by looking for a Spanish Government website.
It does not appear that a test is required for entry if you are vaccinated, it would not hurt though to have one in hand, the accepted tests are listed in the information provided in the link.
Edit: you also need to fill out and submit the FCS Health Control form.