Changeset 065441d8 in rtems


Ignore:
Timestamp:
Jan 30, 2013, 4:01:07 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
2e0177d8
Parents:
334222f0
git-author:
Sebastian Huber <sebastian.huber@…> (01/30/13 16:01:07)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/30/13 16:08:05)
Message:

fstests: Use global environment and clean up

This releases all resources acquired by the chroot().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/fstests/support/fstest_support.c

    r334222f0 r065441d8  
    1717#include <string.h>
    1818#include <unistd.h>
    19 #include <stdlib.h> /* exit */
     19#include <stdlib.h>
    2020#include <sys/stat.h>
    2121#include <sys/types.h>
    2222
    23 #include "rtems.h"
     23#include <rtems.h>
     24#include <rtems/userenv.h>
    2425
    2526#include "fstest_support.h"
     
    3233static void break_out_of_chroot(void)
    3334{
    34   chroot("/");
     35  int rv;
     36  struct stat st;
     37
     38  rtems_libio_use_global_env();
     39
     40  /* Perform deferred global location releases */
     41  rv = stat(".", &st);
     42  rtems_test_assert(rv == 0);
     43
     44  /* Perform deferred memory frees */
     45  free(malloc(1));
    3546}
    3647
Note: See TracChangeset for help on using the changeset viewer.