summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2019-07-10 06:21:40 +0000
committermartin <martin@NetBSD.org>2019-07-10 06:21:40 +0000
commit5d05307442feaed72d2e8ac2f8a6d374a7b7c86a (patch)
treee033219d9e3a077b98bf1c131d8729b66698fc30 /tests
parent8cac8358cf6fdc0705d531299b5d0e206c5d4f77 (diff)
Gracefully skip test if not enough space in temporary directory.
Diffstat (limited to 'tests')
-rw-r--r--tests/dev/cgd/t_cgd_aes.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/dev/cgd/t_cgd_aes.c b/tests/dev/cgd/t_cgd_aes.c
index edda1eb71aa..6028e90a898 100644
--- a/tests/dev/cgd/t_cgd_aes.c
+++ b/tests/dev/cgd/t_cgd_aes.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cgd_aes.c,v 1.6 2017/01/13 21:30:39 christos Exp $ */
+/* $NetBSD: t_cgd_aes.c,v 1.7 2019/07/10 06:21:40 martin Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
* Copyright (c) 2007 The Institute of Electrical and Electronics Engineers, Inc
@@ -3565,7 +3565,12 @@ ATF_TC_BODY(cgd_aes_xts_512, tc)
rump_init();
- RL(dkfd = open_disk(dkpath, imgpath, dksize));
+ dkfd = open_disk(dkpath, imgpath, dksize);
+ if (dkfd == -1 && errno == ENOSPC) {
+ atf_tc_skip("not enough space");
+ } else {
+ ATF_CHECK_MSG(dkfd != -1, "open_disk: %s", strerror(errno));
+ }
RL(cgdfd = open_cgd(0));
RL(configure_cgd(cgdfd, dkpath, "aes-xts", "encblkno1",