nbd/003: improve the test
PATCH 1/1 nbd/003: improve the test
Modify the DESCRIPTION, remove the umount and add rm.
Signed-off-by Sun Ke <[email protected]>
--- tests/nbd/003 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/nbd/003 +2 -2
@@ -7,7 +7,7 @@ . tests/nbd/rc -DESCRIPTION="mount/unmount concurrently with NBD_CLEAR_SOCK" +DESCRIPTION="connected by ioctl, mount/unmount concurrently with NBD_CLEAR_SOCK" QUICK=1 requires() {
@@ -23,8 +23,8 @@ test() { mkdir -p "${TMPDIR}/mnt" src/mount_clear_sock /dev/nbd0 "${TMPDIR}/mnt" ext4 5000 - umount "${TMPDIR}/mnt" > /dev/null 2>&1 nbd-client -d /dev/nbd0 >> "$FULL" 2>&1 + rm -rf "${TMPDIR}/mnt" _stop_nbd_server }
Signature · 1 line
2.13.6
Quoted 21 lines · Sun Ke
Modify the DESCRIPTION, remove the umount and add rm.
Signed-off-by Sun Ke <[email protected]>--- tests/nbd/003 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tests/nbd/003 +1
-1@@ -7,7 +7,7 @@ . tests/nbd/rc -DESCRIPTION="mount/unmount concurrently with NBD_CLEAR_SOCK" +DESCRIPTION="connected by ioctl, mount/unmount concurrently with NBD_CLEAR_SOCK" QUICK=1 requires() {
tests/nbd/003 test() { · line 26
Quoted 4 lines
tests/nbd/003 +0
-1@@ -23,8 +23,8 @@ test() { mkdir -p "${TMPDIR}/mnt" src/mount_clear_sock /dev/nbd0 "${TMPDIR}/mnt" ext4 5000 - umount "${TMPDIR}/mnt" > /dev/null 2>&1
Is the umount causing problems?
tests/nbd/003 test() { · line 28
Quoted 3 lines
tests/nbd/003 +1
-0nbd-client -d /dev/nbd0 >> "$FULL" 2>&1 + rm -rf "${TMPDIR}/mnt"
The test harness already removes the TMPDIR directory. Why is this necessary?
Quoted 20 lines · Omar Sandoval
Quoted 19 lines · Sun Ke
Modify the DESCRIPTION, remove the umount and add rm.
Signed-off-by Sun Ke <[email protected]>--- tests/nbd/003 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tests/nbd/003 +1
-1@@ -7,7 +7,7 @@ . tests/nbd/rc -DESCRIPTION="mount/unmount concurrently with NBD_CLEAR_SOCK" +DESCRIPTION="connected by ioctl, mount/unmount concurrently with NBD_CLEAR_SOCK" QUICK=1
Quoted 8 lines
tests/nbd/003 test() { · line 26
Quoted 6 lines
tests/nbd/003 +0
-1requires() {@@ -23,8 +23,8 @@ test() { mkdir -p "${TMPDIR}/mnt" src/mount_clear_sock /dev/nbd0 "${TMPDIR}/mnt" ext4 5000 - umount "${TMPDIR}/mnt" > /dev/null 2>&1Is the umount causing problems?
No, it do not cause problems, but it is redundant.
Quoted 8 lines
tests/nbd/003 test() { · line 28
Quoted 4 lines
tests/nbd/003 +1
-0nbd-client -d /dev/nbd0 >> "$FULL" 2>&1 + rm -rf "${TMPDIR}/mnt"The test harness already removes the TMPDIR directory. Why is this necessary?
I see.
Thanks,
Sun Ke