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

test -r followed by echo $? gives exit code 1 even though exit status shows 0 #390

Open
abrahamjoel opened this issue Nov 20, 2024 · 0 comments

Comments

@abrahamjoel
Copy link

Expected Behavior

root@435d13901d69:/# test -r test.txt ###file exists
root@435d13901d69:/# echo $?
0

Actual Behavior

root@435d13901d69:/# test -r test.txt ###file exists
root@435d13901d69:/# echo $?
1

Steps to Reproduce the Problem

  1. touch test.txt
  2. test -r test.txt
  3. echo $?

Specifications

  • Proot/Care version: v5.3.1-99a84175
  • Kernel version: 6.1.112-122.189.amzn2023.x86_64
  • Host distribution: Alpine
  • Guest distribution: Ubuntu

Command Output

root@435d13901d69:/# test -r $(pwd)/test.txt
proot info: vpid 3: pid 384proot info: vpid 3: sysenter start: newfstatat(0x1, 0x7f640ab0444f, 0x7fffa731a2f0, 0x1000, 0x7f640ab48a70, 0x5000001565e0) = 0xffffffffffffffda [0x7fffa731a2e8,
0]
proot info: vpid 1: sysenter start: wait4(0xffffffff, 0x7fffa731a570, 0xa, 0x0, 0x7fffa731a660, 0x1) = 0xffffffffffffffda [0x7fffa731a548, 0]
proot info: vpid 3: **exited with status 0**
proot info: vpid 1: sysenter start: wait4(0xffffffff, 0x7fffa7319f10, 0xb, 0x0, 0x7fffa731a5e0, 0x0) = 0xffffffffffffffda [0x7fffa7319ee8, 0]
root@435d13901d69:/# echo $?
proot info: vpid 1: sysenter start: newfstatat(0x1, 0x7f640ab0444f, 0x7fffa731a6d0, 0x1000, 0x7f640aafd460, 0x7fffffff) = 0xffffffffffffffda [0x7fffa731a6c8, 0]
1
root@435d13901d69:/#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant