On Wed, 26 Nov 2025, Nemanja Simonovic wrote:

I am stuck trying to create new ATF test case. Hitting "Unexpected token
`<<EOF>>'; expected a header name" but can't figure out where error is.
[...]
Content of testa -------------------------------------------------------

#!/bin/sh

atf_test_case testa
testa_head(){
       atf_set "descr" "Test for ATF tests"
}

testa_body(){
        atf_check -s eq:1 -o empty -e empty test -d a
        atf_check -s eq:0 -o empty -e empty mkdir a
        atf_check -s eq:0 -o empty -e empty test -d a
}

-----------------------------------------------------------------------


```
qemu# diff -u testa.orig testa
--- testa.orig  2025-11-26 20:53:44.337225576 +0000
+++ testa       2025-11-26 20:55:02.895978825 +0000
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/atf-sh

 atf_test_case testa
 testa_head(){
@@ -10,3 +10,7 @@
        atf_check -s eq:0 -o empty -e empty mkdir a
        atf_check -s eq:0 -o empty -e empty test -d a
 }
+
+atf_init_test_cases() {
+       atf_add_test_case testa
+}
qemu#
```

-RVP

Reply via email to