To attack imaginary enemies.
To go on a wild-goose chase; to persistently engage in a futile activity.