# Shell challenge in C. Stuck on Stage #NI6 due to a test error on #GP4

**URL:** <https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-stage-ni6-due-to-a-test-error-on-gp4/3897>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [January 2, 2025, 1:42pm UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-stage-ni6-due-to-a-test-error-on-gp4/3897 "2025-01-02T13:42:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarjen](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/amarjen/32/3916_2.png) [@amarjen](https://forum.codecrafters.io/u/amarjen)\
**Post date:** [January 2, 2025, 1:42pm UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-stage-ni6-due-to-a-test-error-on-gp4/3897/1 "2025-01-02T13:42:56Z")

</div>

I’m stuck on Stage #NI6 ,  
The tests pass for this stage, but failed on the previous one GP4 that was before passed. In my implementation it works ok, not sure if is related to some caching?

Here are my logs:

```auto
[your-program] $ cat '/tmp/bar/f 86' '/tmp/bar/f 41' '/tmp/bar/f 31'
[your-program] blueberry banana.pineapple blueberry.blueberry banana.
[tester::#NI6] ✓ Received expected response
[your-program] $
[tester::#NI6] Test passed.

[tester::#GP4] Running tests for Stage #GP4 (Navigation - The cd builtin: Home directory)
[tester::#GP4] Running ./your_program.sh
[your-program] $ cd /tmp/apple/blueberry/pear
[your-program] cd: /tmp/apple/blueberry/pear : No such file or directory
[tester::#GP4] Expected prompt ("$ ") but received "cd: /tmp/apple/blueberry/pear : No such file or directory"

```

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [January 2, 2025, 3:51pm UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-stage-ni6-due-to-a-test-error-on-gp4/3897/3 "2025-01-02T15:51:13Z")

</div>

Our tester is currently down. Once it’s back up, I’ll assist with debugging. Thank you for your patience!

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [January 3, 2025, 9:13pm UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-stage-ni6-due-to-a-test-error-on-gp4/3897/4 "2025-01-03T21:13:48Z")

</div>

Hi @amarjen, I tried running your code against the previous stages, but it’s actually no longer passing the stage **#MG5 (The type builtin: executable files)**.

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/4/45c83648df60fbbed424333983774d3e29bb800c.png)

Suggestions:

1. Use [our CLI](https://docs.codecrafters.io/cli/installation) to test against previous stages by running:

```auto
codecrafters test --previous

```

1. Focus on fixing the early stages first, as later stages depend on them.

---

<div class="post-metadata">

**Author:** ![amarjen](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/amarjen/32/3916_2.png) [@amarjen](https://forum.codecrafters.io/u/amarjen)\
**Post date:** [January 3, 2025, 9:47pm UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-stage-ni6-due-to-a-test-error-on-gp4/3897/6 "2025-01-03T21:47:40Z")

</div>

Ah… wrestling with malloc, now that is fixed. Tester went well with #GP4, and now working on #NI6. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [January 8, 2025, 9:47pm UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-stage-ni6-due-to-a-test-error-on-gp4/3897/7 "2025-01-08T21:47:43Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
