China has treated NK with a lot of patience and help years in and out. It is NK who betrayed China in the past times and times again to be in bed with U.S.S.R. Well, the other bastard country is Vietnam.
Actually, we helped NK way more than what we did to Pakistan. Hundreds of thousand Chinese donated their lives in NK during Korean war. We gave them and continuously give them food, oil and etc.
The comment that You indicate China has not treated NK well in the past simply reflects your ignorance.
As far as for Pakistan, we have been supportive of Pakistan since its independence.
However, Pakistan indeed need rein in its control over those islam fundamentalists/extremists/terrorists within its boundary and rid itself of those islam fundamentalists/extremists/terrorists sympathizers within its army and ISI. Those have already caused great rift/struggle between Pakistan and U.S./Afghanistan/India.
Considering what those islam fundamentalists/extremists/terrorists intend to do, sooner or later, they will create rift between China and Pakistan if Pakistan cannot rein in control over them for the foreseeable future. The next battleground against islam terrorists can be quite probable or inevitable to be China.
Unfortunately, since general Zia-ul-Haq took over Pakistan by killing its premier Ali Bhutto, Pakistan has been on the way to the state's Islamization. Otherwise, Pakistan would have been in a much better shape just like the secular Turkey.