build-your-own-shell
build-your-own-shell copied to clipboard
Test for shell's successful exit is implicit and confusing (was: Weird issue with tests?)
me@DebianXfce23F:~/projects/lsh-shell/build-your-own-shell$ ./validate ../lsh
stage_1: 01-fork-exec.t
→ /bin/echo foo bar⏎
↵ foo bar
→ tr a-z n-za-m⏎
→ foo bar baz⏎
↵ sbb one onm
→ ^D
→ ./helpers/echo-rot13 foo bar⏎
↵ sbb one
→ ./helpers/echo-exit ./helpers/successful-exit-status⏎
↵ 0
---------------------------
You still need to do stage_1
Keep working!
Unsure where I am actually going wrong here, I think I poorly understand your "validate".
I've attached my C source code if you'd like to look through any of it to detect where I've gone wrong. lsh.c.txt
(Caveat: I'm travelling presently so I may not be able to respond quickly or make a change here)
The problem is what your shell does on EOF: try running it interactively and hitting ^D. Let's leave this issue open though, because the test suite could be a lot clearer here: it should be explicit that we failed while trying to terminate the shell. (It isn't right now since the timeout is implemented separately from the harness).
Thanks for giving the workshop a try!