To test whether markets are perfectly efficient, just look for large movements over time. If a stock goes up 20% in a year, the market might have undervalued it last year, or is overvaluing it this year. It's unlikely the it was correctly valuing it at both times. In the absence of a Covid-19 pandemic, act of god, etc. of course.
You could say that the market just takes "investor sentiment" into account, and is therefore still efficient. But value investing is a strategy that looks for misplaced investor sentiment and exploits it. If that's the way you define an efficient market, than I'd say an efficient market is no obstacle to a value investor.