Skip to content

Debug failing bash scripts #144

@vidyalakshmir

Description

@vidyalakshmir

Debug failing bash tests.

Update 03/17/2026 :
Used flag -fpcast-emu for wasm-opt while building bash.cwasm
As of now we have only 6 failing.

Please refer to PR #141 for more details.

Included below are each test followed by its native output as well as lind-wasm output:

cat <(echo hello)

Running natively tests/bash/test89.sh
hello
Running with lind tests/bash/test89.sh
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Invalid argument
/bin/cat: /dev/fd/63: No such file or directory

printf "%.2f\n" 3.14159

Running natively tests/bash/test95.sh
3.14
Running with lind tests/bash/test95.sh
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Invalid argument
?.31

echo hi | cat >/dev/null; echo ${PIPESTATUS[0]}

Running natively tests/bash/test133.sh
0
Running with lind tests/bash/test133.sh
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Invalid argument

[ -n "$PWD" ] && echo 1

Running natively tests/bash/test161.sh
1
Running with lind tests/bash/test161.sh
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Invalid argument

[ -n "$HOME" ] && echo 1

Running natively tests/bash/test162.sh
1
Running with lind tests/bash/test162.sh
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Invalid argument

The following test seem to match native execution when run individually, but fails when run together in the test suite.

echo err >&2 2>/tmp/tmp.i3nR7wvelq; cat /tmp/tmp.i3nR7wvelq

Running natively tests/bash/test81.sh
err
Running with lind tests/bash/test81.sh
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Invalid argument
err

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions