Changes to the fstest_*.c tests for reasons I have forgotten. I think they fix bugs that are not evident from the normal tests. Index: tests/fs/common/fstest_ffs.c =================================================================== RCS file: /cvsroot/src/tests/fs/common/fstest_ffs.c,v retrieving revision 1.5 diff -p -u -r1.5 fstest_ffs.c --- tests/fs/common/fstest_ffs.c 26 Jun 2011 13:06:00 -0000 1.5 +++ tests/fs/common/fstest_ffs.c 7 Apr 2012 21:19:57 -0000 @@ -104,8 +104,10 @@ ffs_fstest_delfs(const atf_tc_t *tc, voi struct ffstestargs *args = buf; res = rump_pub_etfs_remove(args->ta_devpath); - if (res != 0) - return res; + if (res != 0) { + errno = res; + return -1; + } res = unlink(args->ta_imgpath); if (res != 0) Index: tests/fs/common/fstest_puffs.c =================================================================== RCS file: /cvsroot/src/tests/fs/common/fstest_puffs.c,v retrieving revision 1.10 diff -p -u -r1.10 fstest_puffs.c --- tests/fs/common/fstest_puffs.c 10 Feb 2011 16:35:01 -0000 1.10 +++ tests/fs/common/fstest_puffs.c 7 Apr 2012 21:19:57 -0000 @@ -255,8 +255,6 @@ donewfs(const atf_tc_t *tc, void **argp, size_t len; ssize_t n; - *argp = NULL; - args = malloc(sizeof(*args)); if (args == NULL) return errno; @@ -317,7 +315,7 @@ donewfs(const atf_tc_t *tc, void **argp, args->pta_servfd = sv[1]; strlcpy(args->pta_dev, image, sizeof(args->pta_dev)); - *argp = theargs = args; + theargs = args; return 0; } @@ -378,7 +376,7 @@ p2k_ffs_fstest_newfs(const atf_tc_t *tc, int puffs_fstest_mount(const atf_tc_t *tc, void *arg, const char *path, int flags) { - struct puffstestargs *pargs = arg; + struct puffstestargs *pargs = theargs; int fd; rump_init(); @@ -420,8 +418,11 @@ puffs_fstest_delfs(const atf_tc_t *tc, v int p2k_ffs_fstest_delfs(const atf_tc_t *tc, void *arg) { + int rv; - return ffs_fstest_delfs(tc, arg); + rv = ffs_fstest_delfs(tc, arg); + free(theargs); + return rv; } int