raw: Add test functions for sw_close.