Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bazel] bazelisk.sh unbound variable error when invoked with dvsim.py to run TLT #21823

Open
gdessouky opened this issue Mar 4, 2024 · 1 comment
Assignees
Labels
Help Wanted Hotlist for issues that requires extra attention SW:Build System

Comments

@gdessouky
Copy link
Contributor

gdessouky commented Mar 4, 2024

Description

dvsim.py invokes bazelisk.sh when running top-level-tests. When exercising a TLT, e.g. /util/dvsim/dvsim.py hw/top_earlgrey/dv/chip_sim_cfg.hjson -i chip_sw_hmac_smoketest, (or bazelisk.sh alone) this errors out with

./bazelisk.sh: line 172: pre_cmd_args[@]: unbound variable

I suspect this is a side effect of this last commit 4d88b95, since once I undo it, the test run proceeds further.

When cross-checking with @andreaskurth it works fine at their end (GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) and not at my end (GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)), until I revert that last commit.

@gdessouky gdessouky added the Component:DV DV issue: testbench, test case, etc. label Mar 4, 2024
@gdessouky gdessouky added Tool:dvsim Pertains to the dvsim and testplan tools and removed Component:DV DV issue: testbench, test case, etc. labels Mar 4, 2024
@gdessouky gdessouky changed the title [bazel] bazelisk.sh complains of unbound variable error when invoked with dvsim.py to run TLT [bazel] bazelisk.sh unbound variable error when invoked with dvsim.py to run TLT Mar 4, 2024
@jwnrt
Copy link
Contributor

jwnrt commented Mar 4, 2024

Thanks for flagging, I didn't expect these changes to break in an older Bash version.

I could reproduce this in Bash 4.2 but I'm not sure why. I've opened #21826 as a workaround but it doesn't fix the actual issue. Would be great to get some help from somebody who knows a bit more about Bash, but I'm not sure who that could be.

@jwnrt jwnrt added Help Wanted Hotlist for issues that requires extra attention SW:Build System and removed Tool:dvsim Pertains to the dvsim and testplan tools labels Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Hotlist for issues that requires extra attention SW:Build System
Projects
None yet
Development

No branches or pull requests

2 participants