I recently came across a situation when https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ contained a code that was failed to compile, but https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/ contained a valid code with the applied patches.

So I generally confused about what repo should be used to test patches before patch submit?

Thank you!