New issue
Advanced search Search tips

Issue 828589 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Option parsing in chromite's cros_run_vm_test is slightly busted

Project Member Reported by bpastene@chromium.org, Apr 3 2018

Issue description

When specifying --qemu-path directly, the script fails with the following:
cros_run_vm_test: error: argument --qemu-path: 'path' is not callable

I think that's cause in cros_run_vm_test, it uses argparse's argument parser:
https://codesearch.chromium.org/chromium/src/third_party/chromite/scripts/cros_run_vm_test.py?rcl=87c1c3dbea9acae74a3f98cd9b044ed395793781&l=209

Instead of chromite's special argument parser (which defines the special 'path' type):
https://codesearch.chromium.org/chromium/src/third_party/chromite/scripts/cros_vm.py?rcl=87c1c3dbea9acae74a3f98cd9b044ed395793781&l=438

Prob needs a one or two line tweak?
 
Labels: -Pri-3 OS-Chrome Pri-2
Status: Started (was: Assigned)
https://chromium-review.googlesource.com/995172
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/46d83879919cc77d6dbcfb07b8aa8cd95af2f0ef

commit 46d83879919cc77d6dbcfb07b8aa8cd95af2f0ef
Author: Achuith Bhandarkar <achuith@chromium.org>
Date: Thu Apr 05 13:31:55 2018

cros_vm: Fix parsing of type='path'

cros_run_vm_test also parses cros_vm args; it uses ArgumentParser
from argparse, not command_line, so it doesn't understand type='path'

All arguments with type='path' are now type=str, and we have checks
along the lines of os.path.isfile or os.path.isdir to properly validate
input.

BUG= chromium:828589 
TEST=cros_run_vm_test --qemu-path=chroot/usr/bin/qemu-system-x86_64

Change-Id: Iae9b6407f878e24a419219e19b6b9cf2881b871b
Reviewed-on: https://chromium-review.googlesource.com/995172
Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Benjamin Pastene <bpastene@chromium.org>

[modify] https://crrev.com/46d83879919cc77d6dbcfb07b8aa8cd95af2f0ef/scripts/cros_vm.py

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ae47769a6d274cb8eeca0f8e7b9198d0b043975f

commit ae47769a6d274cb8eeca0f8e7b9198d0b043975f
Author: chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Fri Apr 06 01:55:51 2018

Roll src/third_party/chromite/ 8c177b33b..46d838799 (1 commit)

https://chromium.googlesource.com/chromiumos/chromite.git/+log/8c177b33bdde..46d83879919c

$ git log 8c177b33b..46d838799 --date=short --no-merges --format='%ad %ae %s'
2018-04-04 achuith cros_vm: Fix parsing of type='path'

Created with:
  roll-dep src/third_party/chromite
BUG= chromium:828589 


The AutoRoll server is located here: https://chromite-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


TBR=chrome-os-gardeners@chromium.org

Change-Id: I4439aecd4ca61af4021f2838cfafc9ae2b176047
Reviewed-on: https://chromium-review.googlesource.com/997767
Reviewed-by: Chromite Chromium Autoroll <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: Chromite Chromium Autoroll <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#548636}
[modify] https://crrev.com/ae47769a6d274cb8eeca0f8e7b9198d0b043975f/DEPS

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/02ef76b018ac321d5ac7e2b068823dbf177b522f

commit 02ef76b018ac321d5ac7e2b068823dbf177b522f
Author: Achuith Bhandarkar <achuith@chromium.org>
Date: Mon Apr 09 15:30:04 2018

cros_vm: Support for specifying cache directory.

BUG= chromium:828589 
TEST=manual

Change-Id: Ic11ec947ba202acf1dba87655ed44ea34f34f95e
Reviewed-on: https://chromium-review.googlesource.com/997552
Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>

[modify] https://crrev.com/02ef76b018ac321d5ac7e2b068823dbf177b522f/scripts/cros_vm.py

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/17c889fe6afb8e5296aa019f24440eb6965c3972

commit 17c889fe6afb8e5296aa019f24440eb6965c3972
Author: chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Mon Apr 09 18:08:48 2018

Roll src/third_party/chromite/ f10b48279..02ef76b01 (1 commit)

https://chromium.googlesource.com/chromiumos/chromite.git/+log/f10b482799b3..02ef76b018ac

$ git log f10b48279..02ef76b01 --date=short --no-merges --format='%ad %ae %s'
2018-04-05 achuith cros_vm: Support for specifying cache directory.

Created with:
  roll-dep src/third_party/chromite
BUG= chromium:828589 


The AutoRoll server is located here: https://chromite-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


TBR=chrome-os-gardeners@chromium.org

Change-Id: I19d919f4492b43e8ba784d67cab508848cc52eb3
Reviewed-on: https://chromium-review.googlesource.com/1002885
Reviewed-by: Chromite Chromium Autoroll <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: Chromite Chromium Autoroll <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#549225}
[modify] https://crrev.com/17c889fe6afb8e5296aa019f24440eb6965c3972/DEPS

Status: Fixed (was: Started)

Sign in to add a comment