Re: [PATCH 2/3] iotests: Add poke_file_[bl]e functions

2020-03-24 Thread Eric Blake
On 3/10/20 12:22 PM, Max Reitz wrote:   +# poke_file_le 'test.img' 512 2 65534 +poke_file_le() +{ I like the interface.  However, the implementation is a bit bloated (but then again, that's why you cc'd me for review ;) +    local img=$1 ofs=$2 len=$3 val=$4 str='' Noticing that this is

Re: [PATCH 2/3] iotests: Add poke_file_[bl]e functions

2020-03-10 Thread Max Reitz
On 27.02.20 19:46, Eric Blake wrote: > On 2/27/20 11:02 AM, Max Reitz wrote: >> Similarly to peek_file_[bl]e, we may want to write binary integers into >> a file.  Currently, this often means messing around with poke_file and >> raw binary strings.  I hope these functions make it a bit more >>

Re: [PATCH 2/3] iotests: Add poke_file_[bl]e functions

2020-02-27 Thread Eric Blake
On 2/27/20 11:02 AM, Max Reitz wrote: Similarly to peek_file_[bl]e, we may want to write binary integers into a file. Currently, this often means messing around with poke_file and raw binary strings. I hope these functions make it a bit more comfortable. Signed-off-by: Max Reitz ---

[PATCH 2/3] iotests: Add poke_file_[bl]e functions

2020-02-27 Thread Max Reitz
Similarly to peek_file_[bl]e, we may want to write binary integers into a file. Currently, this often means messing around with poke_file and raw binary strings. I hope these functions make it a bit more comfortable. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 37