This is NOT a realistic risk. Not even a little bit.
HIV is difficult to contract, and it enters through the head of your penis, and generally requires a lot of unprotected, rubbing intercourse in order to infect an individual. You will NOT get HIV through a pinhole, even if it was there during intercourse, which I doubt very much.
Forget about this event and move on. You don't need to test.
Only the head of the penis needs to be covered. You were safe. But also, the hole likely occurred when the condom was removed. Condos rip wide open when the integrity of them is compromised.
hiv would have to enter through the urethra to infect you, which is a unlikely event in itself, but this pinhole likely didn't allow much to get inside the condom. It is unusual for a condom to have a pinhole, so if it actually did, it must have been in contact with a sharp object to create the hole. You can test after a month with a duo if concerned, or any other test after 3 months but I doubt you could get hiv from this type of situation so I wouldn't worry while waiting.