From: Paolo Bonzini <pbonzini@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-devel@nongnu.org
Cc: eesposit@redhat.com, vsementsov@virtuozzo.com, qemu-block@nongnu.org
Subject: Re: [PATCH v3 4/5] qemu-iotests: let "check" spawn an arbitrary test command
Date: Tue, 30 Mar 2021 13:12:17 +0200 [thread overview]
Message-ID: <57ccd84c-2413-f9d7-2784-82bac68b1841@redhat.com> (raw)
In-Reply-To: <3dabab90-5a60-2cfd-0527-df709fe3dea0@redhat.com>
On 30/03/21 12:57, Max Reitz wrote:
>
> 297 says:
>
> check:125: error: Argument 1 to "Path" has incompatible type "Optional[str]"; expected "Union[str, _PathLike[str]]"
> Found 1 error in 1 file (checked 1 source file)
Weird, I had tested this and I cannot reproduce it.
>
> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
> index df9fd733ff..7c9d3a0852 100755
> --- a/tests/qemu-iotests/check
> +++ b/tests/qemu-iotests/check
> @@ -122,12 +122,13 @@ if __name__ == '__main__':
> sys.exit("missing command after '--'")
> cmd = args.tests
> env.print_env()
> - exec_path = Path(shutil.which(cmd[0]))
> - if exec_path is None:
> + exec_pathstr = shutil.which(cmd[0])
> + if exec_pathstr is None:
> sys.exit('command not found: ' + cmd[0])
> - cmd[0] = exec_path.resolve()
> + exec_path = Path(exec_pathstr).resolve()
> + cmd[0] = str(exec_path)
> full_env = env.prepare_subprocess(cmd)
> - os.chdir(Path(exec_path).parent)
> + os.chdir(exec_path.parent)
> os.execve(cmd[0], cmd, full_env)
>
> testfinder = TestFinder(test_dir=env.source_iotests)
>
>
> But now these are so many changes that I feel uncomfortable making this
> change myself. This series only affects the iotests, so AFAIU we are in
> no hurry to get this into rc1, and it can still go into rc2.
Go ahead and squash it.
Technically I think resolve() is not needed because we're basically just
doing "dirname" and not going upwards in the directory tree. That would
leave the smaller change in message id
51523e26-a184-9434-cb60-277c7b3c67d6@redhat.com. However, it doesn't
hurt either and others may have the same doubt as you.
Thanks Max!
Paolo
next prev parent reply other threads:[~2021-03-30 11:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 14:23 [PATCH v3 0/5] qemu-iotests: quality of life improvements Paolo Bonzini
2021-03-26 14:23 ` [PATCH v3 1/5] qemu-iotests: do not buffer the test output Paolo Bonzini
2021-03-26 14:23 ` [PATCH v3 2/5] qemu-iotests: allow passing unittest.main arguments to the test scripts Paolo Bonzini
2021-03-26 14:23 ` [PATCH v3 3/5] qemu-iotests: move command line and environment handling from TestRunner to TestEnv Paolo Bonzini
2021-03-26 14:23 ` [PATCH v3 4/5] qemu-iotests: let "check" spawn an arbitrary test command Paolo Bonzini
2021-03-26 15:05 ` Max Reitz
2021-03-30 10:38 ` Max Reitz
2021-03-30 10:44 ` Max Reitz
2021-03-30 10:57 ` Max Reitz
2021-03-30 11:12 ` Paolo Bonzini [this message]
2021-03-26 14:23 ` [PATCH v3 5/5] qemu-iotests: fix case of SOCK_DIR already in the environment Paolo Bonzini
2021-03-30 11:32 ` [PATCH v3 0/5] qemu-iotests: quality of life improvements Max Reitz
2021-03-30 11:44 ` Max Reitz
2021-03-30 11:52 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57ccd84c-2413-f9d7-2784-82bac68b1841@redhat.com \
--to=pbonzini@redhat.com \
--cc=eesposit@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.