Using the inference of mean as an example, the null and alternative hypothesis could be
$$H_0: \mu \le 0 \Leftrightarrow H_1: \mu > 0$$
It is often argued that this makes the calculation of the $p$-value (or critical region) easier, but from my understanding the $p$-value is $P(\bar{X} > 0|H_0) \stackrel{\color{red}{?}}{=} \sup_{\theta \in H_0} P(\bar{X} > 0 | \theta )$. Since I'm taking its supremum, the $p$-value doesn't change regardless of whether the equality sign is included. The same result goes for the critical region. However, I'm not sure if my understanding is correct, and my doubt is marked with a red question mark above.
Anyway, I wonder if it's correct (I know that would be unconventional, though) to write
$$H_0: \mu < 0 \Leftrightarrow H_1: \mu \ge 0$$
If that's OK, what about its $p$-value and critical region? If that's not OK, I would be really surprised, because in that way we are changing the question ("Is $\mu$ less than or equal to zero?") to something different ("Is $\mu$ less than zero?")