Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/dev/cgd Gracefully skip test if not enough space in te...



details:   https://anonhg.NetBSD.org/src/rev/2a749ec6f54e
branches:  trunk
changeset: 457649:2a749ec6f54e
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Jul 10 06:21:40 2019 +0000

description:
Gracefully skip test if not enough space in temporary directory.

diffstat:

 tests/dev/cgd/t_cgd_aes.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 2b1e7ca48f21 -r 2a749ec6f54e tests/dev/cgd/t_cgd_aes.c
--- a/tests/dev/cgd/t_cgd_aes.c Wed Jul 10 06:10:54 2019 +0000
+++ b/tests/dev/cgd/t_cgd_aes.c Wed Jul 10 06:21:40 2019 +0000
@@ -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 @@
 
        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",



Home | Main Index | Thread Index | Old Index