diff options
| author | David Bright <dab@FreeBSD.org> | 2019-11-18 13:31:16 +0000 |
|---|---|---|
| committer | David Bright <dab@FreeBSD.org> | 2019-11-18 13:31:16 +0000 |
| commit | 2d5603fe6507ec4d773de4f37d61bd6187e42208 (patch) | |
| tree | 3a29672a8e8f2bc5b31262a828871ec75ce9f50e /tests | |
| parent | d2e690132e5a9b7a955c34ced3fdd08064b77285 (diff) | |
Notes
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/sys/posixshm/posixshm_test.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index c75d9679b994..2bc59807d83f 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -53,7 +53,7 @@ static unsigned int test_path_idx = 0; static void gen_a_test_path(char *path) { - snprintf(path, TEST_PATH_LEN, "%s/tmp.XXXXXX%d", + snprintf(path, TEST_PATH_LEN, "/%s/tmp.XXXXXX%d", getenv("TMPDIR") == NULL ? "/tmp" : getenv("TMPDIR"), test_path_idx); @@ -232,12 +232,14 @@ ATF_TC_BODY(rename_from_nonexisting, tc) int rc; gen_test_path(); + gen_test_path2(); rc = shm_rename(test_path, test_path2, 0); if (rc != -1) atf_tc_fail("shm_rename of nonexisting shm succeeded unexpectedly"); if (errno != ENOENT) - atf_tc_fail("Expected ENOENT to rename of nonexistent shm"); + atf_tc_fail("Expected ENOENT to rename of nonexistent shm; got %d", + errno); } ATF_TC_WITHOUT_HEAD(rename_to_anon); |
