I'm studying Compressible Fluid Mechanics through the book "Fluid Mechanics", 4 ed., by Frank White. I learnt that a shock wave is an irreversible process that occurs in the flow. Because of that, I expected that relations that consider reversibility as an hypothesis shouldn't be used. Consider for example the expression (9.53) of the book:
$$\frac{s_2-s_1}{c_v}=\ln\left[\frac{p_2}{p_1}\left(\frac{\rho_1}{\rho_2}\right)^k\right]$$
where $1$ is upstream and $2$ is downstream of the shock wave. I found out that this relation is the same as this one:
$$s_2-s_1=c_p\ln\left(\frac{T_2}{T_1}\right)-R\ln\left(\frac{p_2}{p_1}\right)$$
which can be only used if $\delta q=Tds$, i.e., if the flow is reversible. So even if the shock wave is an irreversible process, the expression (9.53), that assumes reversibility, can be used?