---
name: "ATF_CHECK"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/ATF_CHECK"
---

# ATF\_CHECK(3)

C API to write ATF-based test programs

## NAME

**atf-c**, **ATF\_CHECK**, **ATF\_CHECK\_MSG**, **ATF\_CHECK\_EQ**, **ATF\_CHECK\_EQ\_MSG**, **ATF\_CHECK\_MATCH**, **ATF\_CHECK\_MATCH\_MSG**, **ATF\_CHECK\_STREQ**, **ATF\_CHECK\_STREQ\_MSG**, **ATF\_CHECK\_INTEQ**, **ATF\_CHECK\_INTEQ\_MSG**, **ATF\_CHECK\_ERRNO**, **ATF\_REQUIRE**, **ATF\_REQUIRE\_MSG**, **ATF\_REQUIRE\_EQ**, **ATF\_REQUIRE\_EQ\_MSG**, **ATF\_REQUIRE\_MATCH**, **ATF\_REQUIRE\_MATCH\_MSG**, **ATF\_REQUIRE\_STREQ**, **ATF\_REQUIRE\_STREQ\_MSG**, **ATF\_REQUIRE\_INTEQ**, **ATF\_REQUIRE\_INTEQ\_MSG**, **ATF\_REQUIRE\_ERRNO**, **ATF\_TC**, **ATF\_TC\_BODY**, **ATF\_TC\_BODY\_NAME**, **ATF\_TC\_CLEANUP**, **ATF\_TC\_CLEANUP\_NAME**, **ATF\_TC\_HEAD**, **ATF\_TC\_HEAD\_NAME**, **ATF\_TC\_NAME**, **ATF\_TC\_WITH\_CLEANUP**, **ATF\_TC\_WITHOUT\_HEAD**, **ATF\_TP\_ADD\_TC**, **ATF\_TP\_ADD\_TCS**, **atf\_tc\_get\_config\_var**, **atf\_tc\_get\_config\_var\_wd**, **atf\_tc\_get\_config\_var\_as\_bool**, **atf\_tc\_get\_config\_var\_as\_bool\_wd**, **atf\_tc\_get\_config\_var\_as\_long**, **atf\_tc\_get\_config\_var\_as\_long\_wd**, **atf\_no\_error**, **atf\_tc\_expect\_death**, **atf\_tc\_expect\_exit**, **atf\_tc\_expect\_fail**, **atf\_tc\_expect\_pass**, **atf\_tc\_expect\_signal**, **atf\_tc\_expect\_timeout**, **atf\_tc\_fail**, **atf\_tc\_fail\_nonfatal**, **atf\_tc\_pass**, **atf\_tc\_require\_kmod**, **atf\_tc\_require\_prog**, **atf\_tc\_skip**, **atf\_utils\_cat\_file**, **atf\_utils\_compare\_file**, **atf\_utils\_copy\_file**, **atf\_utils\_create\_file**, **atf\_utils\_file\_exists**, **atf\_utils\_fork**, **atf\_utils\_free\_charpp**, **atf\_utils\_grep\_file**, **atf\_utils\_grep\_string**, **atf\_utils\_readline**, **atf\_utils\_redirect**, **atf\_utils\_wait** – C API to write ATF-based test programs

## SYNOPSIS

**#include \<atf-c.h\>**

**ATF\_CHECK**(*expression*);

**ATF\_CHECK\_MSG**(*expression*, *fail\_msg\_fmt*, *...*);

**ATF\_CHECK\_EQ**(*expected\_expression*, *actual\_expression*);

**ATF\_CHECK\_EQ\_MSG**(*expected\_expression*, *actual\_expression*, *fail\_msg\_fmt*, *...*);

**ATF\_CHECK\_MATCH**(*regexp*, *string*);

**ATF\_CHECK\_MATCH\_MSG**(*regexp*, *string*, *fail\_msg\_fmt*, *...*);

**ATF\_CHECK\_STREQ**(*expected\_string*, *actual\_string*);

**ATF\_CHECK\_STREQ\_MSG**(*expected\_string*, *actual\_string*, *fail\_msg\_fmt*, *...*);

**ATF\_CHECK\_INTEQ**(*expected\_int*, *actual\_int*);

**ATF\_CHECK\_INTEQ\_MSG**(*expected\_int*, *actual\_int*, *fail\_msg\_fmt*, *...*);

**ATF\_CHECK\_ERRNO**(*expected\_errno*, *bool\_expression*);

**ATF\_REQUIRE**(*expression*);

**ATF\_REQUIRE\_MSG**(*expression*, *fail\_msg\_fmt*, *...*);

**ATF\_REQUIRE\_EQ**(*expected\_expression*, *actual\_expression*);

**ATF\_REQUIRE\_EQ\_MSG**(*expected\_expression*, *actual\_expression*, *fail\_msg\_fmt*, *...*);

**ATF\_REQUIRE\_MATCH**(*regexp*, *string*);

**ATF\_REQUIRE\_MATCH\_MSG**(*regexp*, *string*, *fail\_msg\_fmt*, *...*);

**ATF\_REQUIRE\_STREQ**(*expected\_string*, *actual\_string*);

**ATF\_REQUIRE\_STREQ\_MSG**(*expected\_string*, *actual\_string*, *fail\_msg\_fmt*, *...*);

**ATF\_REQUIRE\_INTEQ**(*expected\_int*, *actual\_int*);

**ATF\_REQUIRE\_INTEQ\_MSG**(*expected\_int*, *actual\_int*, *fail\_msg\_fmt*, *...*);

**ATF\_REQUIRE\_ERRNO**(*expected\_errno*, *bool\_expression*);

**ATF\_TC**(*name*);

**ATF\_TC\_BODY**(*name*, *tc*);

**ATF\_TC\_BODY\_NAME**(*name*);

**ATF\_TC\_CLEANUP**(*name*, *tc*);

**ATF\_TC\_CLEANUP\_NAME**(*name*);

**ATF\_TC\_HEAD**(*name*, *tc*);

**ATF\_TC\_HEAD\_NAME**(*name*);

**ATF\_TC\_NAME**(*name*);

**ATF\_TC\_WITH\_CLEANUP**(*name*);

**ATF\_TC\_WITHOUT\_HEAD**(*name*);

**ATF\_TP\_ADD\_TC**(*tp\_name*, *tc\_name*);

**ATF\_TP\_ADD\_TCS**(*tp\_name*);

*const* *char\**\

**atf\_tc\_get\_config\_var**(*const atf\_tc\_t \*tc*, *const char \*name*);

*const* *char\**\

**atf\_tc\_get\_config\_var\_wd**(*const atf\_tc\_t \*tc*, *const char \*name*, *const char \*defval*);

*bool*\

**atf\_tc\_get\_config\_var\_as\_bool**(*const atf\_tc\_t \*tc*, *const char \*name*);

*bool*\

**atf\_tc\_get\_config\_var\_as\_bool\_wd**(*const atf\_tc\_t \*tc*, *const char \*name*, *const bool defval*);

*long*\

**atf\_tc\_get\_config\_var\_as\_long**(*const atf\_tc\_t \*tc*, *const char \*name*);

*long*\

**atf\_tc\_get\_config\_var\_as\_long\_wd**(*const atf\_tc\_t \*tc*, *const char \*name*, *const long defval*);

*void*\

**atf\_no\_error**(*void*);

*void*\

**atf\_tc\_expect\_death**(*const char \*reason*, *...*);

*void*\

**atf\_tc\_expect\_exit**(*const int exitcode*, *const char \*reason*, *...*);

*void*\

**atf\_tc\_expect\_fail**(*const char \*reason*, *...*);

*void*\

**atf\_tc\_expect\_pass**(*void*);

*void*\

**atf\_tc\_expect\_signal**(*const int signo*, *const char \*reason*, *...*);

*void*\

**atf\_tc\_expect\_timeout**(*const char \*reason*, *...*);

*void*\

**atf\_tc\_fail**(*const char \*reason*);

*void*\

**atf\_tc\_fail\_nonfatal**(*const char \*reason*);

*void*\

**atf\_tc\_pass**(*void*);

*void*\

**atf\_tc\_require\_kmod**(*const char \*kmod*);

*void*\

**atf\_tc\_require\_prog**(*const char \*prog*);

*void*\

**atf\_tc\_skip**(*const char \*reason*);

*void*\

**atf\_utils\_cat\_file**(*const char \*file*, *const char \*prefix*);

*bool*\

**atf\_utils\_compare\_file**(*const char \*file*, *const char \*contents*);

*void*\

**atf\_utils\_copy\_file**(*const char \*source*, *const char \*destination*);

*void*\

**atf\_utils\_create\_file**(*const char \*file*, *const char \*contents*, *...*);

*bool*\

**atf\_utils\_file\_exists**(*const char \*file*);

*pid\_t*\

**atf\_utils\_fork**(*void*);

*void*\

**atf\_utils\_free\_charpp**(*char \*\*argv*);

*bool*\

**atf\_utils\_grep\_file**(*const char \*regexp*, *const char \*file*, *...*);

*bool*\

**atf\_utils\_grep\_string**(*const char \*regexp*, *const char \*str*, *...*);

*char* *\**\

**atf\_utils\_readline**(*int fd*);

*void*\

**atf\_utils\_redirect**(*const int fd*, *const char \*file*);

*void*\

**atf\_utils\_wait**(*const pid\_t pid*, *const int expected\_exit\_status*, *const char \*expected\_stdout*, *const char \*expected\_stderr*);

## DESCRIPTION

ATF provides a C programming interface to implement test programs. C-based test programs follow this template:

```
... C-specific includes go here ...
#include <atf-c.h>
ATF_TC(tc1);
ATF_TC_HEAD(tc1, tc)
{
    ... first test case's header ...
}
ATF_TC_BODY(tc1, tc)
{
    ... first test case's body ...
}
ATF_TC_WITH_CLEANUP(tc2);
ATF_TC_HEAD(tc2, tc)
{
    ... second test case's header ...
}
ATF_TC_BODY(tc2, tc)
{
    ... second test case's body ...
}
ATF_TC_CLEANUP(tc2, tc)
{
    ... second test case's cleanup ...
}
ATF_TC_WITHOUT_HEAD(tc3);
ATF_TC_BODY(tc3, tc)
{
    ... third test case's body ...
}
... additional test cases ...
ATF_TP_ADD_TCS(tp)
{
    ATF_TP_ADD_TC(tp, tc1);
    ATF_TP_ADD_TC(tp, tc2);
    ATF_TP_ADD_TC(tp, tc3);
    ... add additional test cases ...
    return atf_no_error();
}
```

### Definition of test cases

Test cases have an identifier and are composed of three different parts: the header, the body and an optional cleanup routine, all of which are described in [atf-test-case(4)](/atf-test-case/4.md). To define test cases, one can use the **ATF\_TC**(), **ATF\_TC\_WITH\_CLEANUP**() or the **ATF\_TC\_WITHOUT\_HEAD**() macros, which take a single parameter specifying the test case's name. **ATF\_TC**(), requires to define a head and a body for the test case, **ATF\_TC\_WITH\_CLEANUP**() requires to define a head, a body and a cleanup for the test case and **ATF\_TC\_WITHOUT\_HEAD**() requires only a body for the test case. It is important to note that these *do* *not* set the test case up for execution when the program is run. In order to do so, a later registration is needed with the **ATF\_TP\_ADD\_TC**() macro detailed in Program initialization.

Later on, one must define the three parts of the body by means of three functions. Their headers are given by the **ATF\_TC\_HEAD**(), **ATF\_TC\_BODY**() and **ATF\_TC\_CLEANUP**() macros, all of which take the test case name provided to the **ATF\_TC**() **ATF\_TC\_WITH\_CLEANUP**(), or **ATF\_TC\_WITHOUT\_HEAD**() macros and the name of the variable that will hold a pointer to the test case data. Following each of these, a block of code is expected, surrounded by the opening and closing brackets.

### Program initialization

The library provides a way to easily define the test program's **main**() function. You should never define one on your own, but rely on the library to do it for you. This is done by using the **ATF\_TP\_ADD\_TCS**() macro, which is passed the name of the object that will hold the test cases, i.e., the test program instance. This name can be whatever you want as long as it is a valid variable identifier.

After the macro, you are supposed to provide the body of a function, which should only use the **ATF\_TP\_ADD\_TC**() macro to register the test cases the test program will execute and return a success error code. The first parameter of this macro matches the name you provided in the former call. The success status can be returned using the **atf\_no\_error**() function.

### Header definitions

The test case's header can define the meta-data by using the **atf\_tc\_set\_md\_var**() method, which takes three parameters: the first one points to the test case data, the second one specifies the meta-data variable to be set and the third one specifies its value. Both of them are strings.

### Configuration variables

The test case has read-only access to the current configuration variables by means of the *bool* **atf\_tc\_has\_config\_var**(), *const* *char* *\** **atf\_tc\_get\_config\_var**(), *const* *char* *\** **atf\_tc\_get\_config\_var\_wd**(), *bool* **atf\_tc\_get\_config\_var\_as\_bool**(), *bool* **atf\_tc\_get\_config\_var\_as\_bool\_wd**(), *long* **atf\_tc\_get\_config\_var\_as\_long**(), and the *long* **atf\_tc\_get\_config\_var\_as\_long\_wd**() functions, which can be called in any of the three parts of a test case.

The ‘\_wd’ variants take a default value for the variable which is returned if the variable is not defined. The other functions without the ‘\_wd’ suffix *require* the variable to be defined.

### Access to the source directory

It is possible to get the path to the test case's source directory from any of its three components by querying the ‘srcdir’ configuration variable.

### Requiring kernel modules

Aside from the *require.kmods* meta-data variable available in the header only, one can also check for additional kernel modules in the test case's body by using the **atf\_tc\_require\_kmod**() function, which takes the name of a single kernel module. If it is not found, the test case will be automatically skipped. This feature is only available on FreeBSD.

### Requiring programs

Aside from the *require.progs* meta-data variable available in the header only, one can also check for additional programs in the test case's body by using the **atf\_tc\_require\_prog**() function, which takes the base name or full path of a single binary. Relative paths are forbidden. If it is not found, the test case will be automatically skipped.

### Test case finalization

The test case finalizes either when the body reaches its end, at which point the test is assumed to have *passed*, unless any non-fatal errors were raised using **atf\_tc\_fail\_nonfatal**(), or at any explicit call to **atf\_tc\_pass**(), **atf\_tc\_fail**() or **atf\_tc\_skip**(). These three functions terminate the execution of the test case immediately. The cleanup routine will be processed afterwards in a completely automated way, regardless of the test case's termination reason.

**atf\_tc\_pass**() does not take any parameters. **atf\_tc\_fail**(), **atf\_tc\_fail\_nonfatal**() and **atf\_tc\_skip**() take a format string and a variable list of parameters, which describe, in a user-friendly manner, why the test case failed or was skipped, respectively. It is very important to provide a clear error message in both cases so that the user can quickly know why the test did not pass.

### Expectations

Everything explained in the previous section changes when the test case expectations are redefined by the programmer.

Each test case has an internal state called ‘expect’ that describes what the test case expectations are at any point in time. The value of this property can change during execution by any of:

- **atf\_tc\_expect\_death**(*reason*, *...*)

  Expects the test case to exit prematurely regardless of the nature of the exit.

- **atf\_tc\_expect\_exit**(*exitcode*, *reason*, *...*)

  Expects the test case to exit cleanly. If *exitcode* is not ‘-1’, the runtime engine will validate that the exit code of the test case matches the one provided in this call. Otherwise, the exact value will be ignored.

- **atf\_tc\_expect\_fail**(*reason*, *...*)

  Any failure (be it fatal or non-fatal) raised in this mode is recorded. However, such failures do not report the test case as failed; instead, the test case finalizes cleanly and is reported as ‘expected failure’; this report includes the provided *reason* as part of it. If no error is raised while running in this mode, then the test case is reported as ‘failed’.

  This mode is useful to reproduce actual known bugs in tests. Whenever the developer fixes the bug later on, the test case will start reporting a failure, signaling the developer that the test case must be adjusted to the new conditions. In this situation, it is useful, for example, to set *reason* as the bug number for tracking purposes.

- **atf\_tc\_expect\_pass**()

  This is the normal mode of execution. In this mode, any failure is reported as such to the user and the test case is marked as ‘failed’.

- **atf\_tc\_expect\_signal**(*signo*, *reason*, *...*)

  Expects the test case to terminate due to the reception of a signal. If *signo* is not ‘-1’, the runtime engine will validate that the signal that terminated the test case matches the one provided in this call. Otherwise, the exact value will be ignored.

- **atf\_tc\_expect\_timeout**(*reason*, *...*)

  Expects the test case to execute for longer than its timeout.

### Helper macros for common checks

The library provides several macros that are very handy in multiple situations. These basically check some condition after executing a given statement or processing a given expression and, if the condition is not met, they report the test case as failed.

The ‘REQUIRE’ variant of the macros immediately abort the test case as soon as an error condition is detected by calling the **atf\_tc\_fail**() function. Use this variant whenever it makes no sense to continue the execution of a test case when the checked condition is not met. The ‘CHECK’ variant, on the other hand, reports a failure as soon as it is encountered using the **atf\_tc\_fail\_nonfatal**() function, but the execution of the test case continues as if nothing had happened. Use this variant whenever the checked condition is important as a result of the test case, but there are other conditions that can be subsequently checked on the same run without aborting.

Additionally, the ‘MSG’ variants take an extra set of parameters to explicitly specify the failure message. This failure message is formatted according to the [printf(3)](/printf/3.md) formatters.

**ATF\_CHECK**(), **ATF\_CHECK\_MSG**(), **ATF\_REQUIRE**() and **ATF\_REQUIRE\_MSG**() take an expression and fail if the expression evaluates to false.

**ATF\_CHECK\_EQ**(), **ATF\_CHECK\_EQ\_MSG**(), **ATF\_REQUIRE\_EQ**() and **ATF\_REQUIRE\_EQ\_MSG**() take two expressions and fail if the two evaluated values are not equal. The common style is to put the expected value in the first parameter and the observed value in the second parameter.

**ATF\_CHECK\_MATCH**(), **ATF\_CHECK\_MATCH\_MSG**(), **ATF\_REQUIRE\_MATCH**() and **ATF\_REQUIRE\_MATCH\_MSG**() take a regular expression and a string and fail if the regular expression does not match the given string. Note that the regular expression is not anchored, so it will match anywhere in the string.

**ATF\_CHECK\_STREQ**(), **ATF\_CHECK\_STREQ\_MSG**(), **ATF\_REQUIRE\_STREQ**() and **ATF\_REQUIRE\_STREQ\_MSG**() take two strings and fail if the two are not equal character by character. The common style is to put the expected string in the first parameter and the observed string in the second parameter.

**ATF\_CHECK\_INTEQ**(), **ATF\_CHECK\_INTEQ\_MSG**(), **ATF\_REQUIRE\_INTEQ**() and **ATF\_REQUIRE\_INTQ\_MSG**() take two integers and fail if the two are not equal. The common style is to put the expected integer in the first parameter and the observed integer in the second parameter.

**ATF\_CHECK\_ERRNO**() and **ATF\_REQUIRE\_ERRNO**() take an expected error code and a boolean expression, and fail the test if either the expression is false or *errno* is not equal to the expected error code.

### Utility functions

The following functions are provided as part of the **atf-c** API to simplify the creation of a variety of tests. In particular, these are useful to write tests for command-line interfaces.

*void* **atf\_utils\_cat\_file**(*const char \*file*, *const char \*prefix*)

Prints the contents of *file* to the standard output, prefixing every line with the string in *prefix*.

*bool* **atf\_utils\_compare\_file**(*const char \*file*, *const char \*contents*)

Returns true if the given *file* matches exactly the expected inlined *contents*.

*void* **atf\_utils\_copy\_file**(*const char \*source*, *const char \*destination*)

Copies the file *source* to *destination*. The permissions of the file are preserved during the code.

*void* **atf\_utils\_create\_file**(*const char \*file*, *const char \*contents*, *...*)

Creates *file* with the text given in *contents*, which is a formatting string that uses the rest of the variable arguments.

*void* **atf\_utils\_file\_exists**(*const char \*file*)

Checks if *file* exists.

*pid\_t* **atf\_utils\_fork**(*void*)

Forks a process and redirects the standard output and standard error of the child to files for later validation with **atf\_utils\_wait**(). Fails the test case if the fork fails, so this does not return an error.

*void* **atf\_utils\_free\_charpp**(*char \*\*argv*)

Frees a dynamically-allocated array of dynamically-allocated strings.

*bool* **atf\_utils\_grep\_file**(*const char \*regexp*, *const char \*file*, *...*)

Searches for the *regexp*, which is a formatting string representing the regular expression, in the *file*. The variable arguments are used to construct the regular expression.

*bool* **atf\_utils\_grep\_string**(*const char \*regexp*, *const char \*str*, *...*)

Searches for the *regexp*, which is a formatting string representing the regular expression, in the literal string *str*. The variable arguments are used to construct the regular expression.

*char* *\** **atf\_utils\_readline**(*int fd*)

Reads a line from the file descriptor *fd*. The line, if any, is returned as a dynamically-allocated buffer that must be released with [free(3)](/free/3.md). If there was nothing to read, returns ‘NULL’.

*void* **atf\_utils\_redirect**(*const int fd*, *const char \*file*)

Redirects the given file descriptor *fd* to *file*. This function exits the process in case of an error and does not properly mark the test case as failed. As a result, it should only be used in subprocesses of the test case; specially those spawned by **atf\_utils\_fork**().

*void* **atf\_utils\_wait**(*const pid\_t pid*, *const int expected\_exit\_status*, *const char \*expected\_stdout*, *const char \*expected\_stderr*)

Waits and validates the result of a subprocess spawned with **atf\_utils\_wait**(). The validation involves checking that the subprocess exited cleanly and returned the code specified in *expected\_exit\_status* and that its standard output and standard error match the strings given in *expected\_stdout* and *expected\_stderr*.

If any of the *expected\_stdout* or *expected\_stderr* strings are prefixed with ‘save:’, then they specify the name of the file into which to store the stdout or stderr of the subprocess, and no comparison is performed.

## ENVIRONMENT

The following variables are recognized by **atf-c** but should not be overridden other than for testing purposes:

- *ATF\_BUILD\_CC*

  Path to the C compiler.

- *ATF\_BUILD\_CFLAGS*

  C compiler flags.

- *ATF\_BUILD\_CPP*

  Path to the C/C++ preprocessor.

- *ATF\_BUILD\_CPPFLAGS*

  C/C++ preprocessor flags.

- *ATF\_BUILD\_CXX*

  Path to the C++ compiler.

- *ATF\_BUILD\_CXXFLAGS*

  C++ compiler flags.

## EXAMPLES

The following shows a complete test program with a single test case that validates the addition operator:

```
#include <atf-c.h>
ATF_TC(addition);
ATF_TC_HEAD(addition, tc)
{
    atf_tc_set_md_var(tc, "descr",
                      "Sample tests for the addition operator");
}
ATF_TC_BODY(addition, tc)
{
    ATF_CHECK_EQ(0, 0 + 0);
    ATF_CHECK_EQ(1, 0 + 1);
    ATF_CHECK_EQ(1, 1 + 0);
    ATF_CHECK_EQ(2, 1 + 1);
    ATF_CHECK_EQ(300, 100 + 200);
}
ATF_TC(string_formatting);
ATF_TC_HEAD(string_formatting, tc)
{
    atf_tc_set_md_var(tc, "descr",
                      "Sample tests for the snprintf");
}
ATF_TC_BODY(string_formatting, tc)
{
    char buf[1024];
    snprintf(buf, sizeof(buf), "a %s", "string");
    ATF_CHECK_STREQ_MSG("a string", buf, "%s is not working");
}
ATF_TC(open_failure);
ATF_TC_HEAD(open_failure, tc)
{
    atf_tc_set_md_var(tc, "descr",
                      "Sample tests for the open function");
}
ATF_TC_BODY(open_failure, tc)
{
    ATF_CHECK_ERRNO(ENOENT, open("non-existent", O_RDONLY) == -1);
}
ATF_TC(known_bug);
ATF_TC_HEAD(known_bug, tc)
{
    atf_tc_set_md_var(tc, "descr",
                      "Reproduces a known bug");
}
ATF_TC_BODY(known_bug, tc)
{
    atf_tc_expect_fail("See bug number foo/bar");
    ATF_CHECK_EQ(3, 1 + 1);
    atf_tc_expect_pass();
    ATF_CHECK_EQ(3, 1 + 2);
}
ATF_TP_ADD_TCS(tp)
{
    ATF_TP_ADD_TC(tp, addition);
    ATF_TP_ADD_TC(tp, string_formatting);
    ATF_TP_ADD_TC(tp, open_failure);
    ATF_TP_ADD_TC(tp, known_bug);
    return atf_no_error();
}
```

## SEE ALSO

[atf-test-program(1)](/atf-test-program/1.md), [atf-test-case(4)](/atf-test-case/4.md)
