Quite a few of the students I knew in Mazandaran and Tehran would wear long (below the knee) shorts. No problem on the street. Obviously most of the guys on the beach (Caspian) wore shorts, and generally no shirt but that's something of an exception.
Pro tip
