you would incur the TWF penalty wielding two weapons whether you attack with them or not the wording on TWF is if you wield a second weapon in your offhand you may make a second attack. When fighting this way (a weapon in each hand) you suffer a -6 penalty to attack rolls whether you attack or not same goes if you wield a shield but wish to perform a shield bash with it ect ect.
see swashbuckler picaroon they have a archetype feature that gives them weapon finesse and two weapon fighting at level one for this reason when wielding a pistol/light weapon
also think if you attack with the longsword in your turn and later in the round try and attack with the reach weapon that counts as two weapon fighting as your attacking with weapon wielded in your offhand and as such penalties would apply to your longsword attack
thats my interpretation of the rule anyway
TLDR the main wording specifically calls out wielding not attacking as the source of the penalty the bonus attack is the benifet for wielding a second weaponand taking the penalty