add select test read-write to be use do-while loop