I also reviewed the corresponding ZoL fix this originates from (I don't think that matters, but just to note it).
11276 Allow unencrypted children of encrypted datasets
Review Request #2022 — Created June 26, 2019 and submitted
This is a port from ZoL of these two commits. da689 is a recent follow-up, and 149ce is an encryption related commit which was not included in Jorgen's original work:
da68988708d Allow unencrypted children of encrypted datasets
149ce888bb1 Fix issues with raw receive_write_byref()
For the port to illumos, the key zfs-test related files I updated are:
fixed send-wDR_encrypted_zvol.ksh to work on illumos
added is_linux to libtest.shlib and include of blkdev.shlib
zfs_receive_to_encrypted.ksh modified to pass on illumos
Fix test file comment typo and rebase.