Skip to content

tests: fix exec fails when grep exists with status other than 0#9066

Merged
oranagra merged 1 commit intoredis:unstablefrom
Super-long:fix_exec_grep
Jul 25, 2021
Merged

tests: fix exec fails when grep exists with status other than 0#9066
oranagra merged 1 commit intoredis:unstablefrom
Super-long:fix_exec_grep

Conversation

@Super-long
Copy link
Contributor

This will exit abnormally when the exec search fails, so you need to catch the exception here to prevent the test from exiting abnormally, and return a valid value to the caller.

If we have another tcl statement as follows: exec grep "hello world" < hello.txt
but there is no "hello world" in the hello.txt file

We will get the following output:
child process exited abnormally while executing "exec grep "hello" < hello.txt"

@oranagra oranagra changed the title fix exec fails when grep exists with status other than 0 tests: fix exec fails when grep exists with status other than 0 Jul 25, 2021
@oranagra oranagra merged commit 8d00493 into redis:unstable Jul 25, 2021
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Sep 8, 2021
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

Successfully merging this pull request may close these issues.

2 participants