In the “Recorded Sayings of Zen Master Joshu,” translated by James Green, it says:

A monk asked the master, “I wonder if a person of true practice can be perceived by gods and demons or not?”

The master said, “They can perceive the person.”

The monk said, “Where is the person’s fault?”

The master said, “Faults are wherever they are looked for.”

The monk said, “In that case, it is not practice.”

The master said, “It is practice.”

The monk asks, “I wonder if a person of true practice can be perceived by gods and demons or not?” This monk is wondering if there is an enlightened state of mind that can be attained by true practice where there is no coming and going of gods and demons or is it the case that gods and demons are always with us no matter what degree of enlightenment we attain. “Gods” means the perception of one’s self being admired and accepted by all creatures, both heavenly and earthly across the universe, and the expansive and exalted states of mind with their associated wonderfully pleasant feelings that arise from that condition.  “Demons” means the perception of one’s self being rejected and the terror, rage and blame and the infiltration of it into every pore of the body causing it to constrict, shrivel and ache. The monk asks his teacher to please clarify this matter for him.
The master says, “They can perceive the person.” Joshu does not become trapped by his own gods and demons in this encounter with this monk and simply suggests there is a more intimate way that true practice can be done.

The monk says, “Where is the person’s fault?” The monk falls into his own demonic realm and perceives that his “true practice” that is to say, he, himself, at the most fundamental level of his being is being rejected by Joshu, but very courageously and earnestly he presses on and asks his teacher to tell him, what is it, then, that is “Not OK” about me. Here we can see the deep trust one must have with other human beings to do Buddhist practice.

Joshu says, “Faults are wherever they are looked for.” This means that the only place where gods and demons are, or where acceptance and rejection occur are just within our own mind that constantly seeks, judges and evaluates ourselves and others, measuring by our own internal standards to what degree we have succeeded and to what degree we have failed.

The monk says, “In that case, it is not practice.” The monk now feels a double whammy of rejection from Joshu and concludes that the practice he does is not really practice at all. The monk is experiencing pain and is closing down and rejecting Joshu and himself.

Joshu says, “It is practice.” Joshu does not reject and abandon the monk and never had any intention of doing so. He encourages the monk to open himself up to the pain he is feeling now and to realize that he is the only one creating it.  He is saying that looking into this matter of how deeply we are constantly seeking for something outside of ourselves to satisfy ourselves and to create awareness of the depth of this universal human activity and to accept the pain that results from it, that is to say, the arising of gods and demons, is to actually do authentic practice.