If entropy is a state variable, it means that the change in entropy should not depend on the path between two equilibrium states. But the second law of thermodynamics states that, in an isolated system the entropy change due to irreversible process must be greater than zero, while the entropy change due to reversible process is always zero. If both processes start from state A and end in state B, how can the entropy change be zero?
A similar question has been asked before, although I cant find it now. In an isolated system, between two given states $A$ and $B$ there can be either a reversible process or an irreversible process, but not both. If entropy of isolated system at $A$ and $B$ are same then the process must be reversible, otherwise not.
Entropy is a function of state so for the system the entropy dofferemce between states A and B will be the same, whatever the transformation. To compute it however you need to find amongst the many paths from A to B a reversibile one.
Shouldn't entropy increase for not reversible paths? Yes, the entropy of the universe (system+environment) will have increased due to the environment not being in the same state as before.
You say "if entropy is a state variable", but is it? "Entropy is a state function" is a fundamental theorem in thermodynamics. Clausius deduced it from the assumption that any cycle can be disintegrated into small Carnot cycles, and nowadays this deduction remains the only justification of "Entropy is a state function":
http://mutuslab.cs.uwindsor.ca/schurko/introphyschem/lectures/240_l10.pdf "Carnot Cycles: S is a State Function. Any reversible cycle can be thought of as a collection of Carnot cycles - this approximation becomes exact as cycles become infinitessimal. Entropy change around an individual cycle is zero. Sum of entropy changes over all cycles is zero."
http://ronispc.chem.mcgill.ca/ronis/chem213/hnd8.pdf "Entropy Changes in Arbitrary Cycles. What if we have a process which occurs in a cycle other than the Carnot cycle, e.g., the cycle depicted in Fig. 3. If entropy is a state function, cyclic integral of dS = 0, no matter what the nature of the cycle. In order to see that this is true, break up the cycle into sub-cycles, each of which is a Carnot cycle, as shown in Fig. 3. If we apply Eq. (7) to each piece, and add the results, we get zero for the sum."
The assumption on which "Entropy is a state function" is based - that any cycle can be subdivided into small Carnot cycles - is almost obviously false. An isothermal cycle CANNOT be subdivided into small Carnot cycles. A cycle involving the action of conservative forces CANNOT be subdivided into small Carnot cycles.
Conclusion: The belief that the entropy is a state function is totally unjustified. Thermodynamics is not even wrong.