aboutsummaryrefslogtreecommitdiffstats
path: root/libtest/libtest_stop_tracking.c
blob: 5faddb27d44b2f6e5ce8098145d9bb14ab667246 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST


void
libtest_stop_tracking(void)
{
	libtest_malloc_accept_leakage = 1;
	libtest_fd_tracking(0);
}


#else


int
main(void)
{
	SET_UP_ALARM();

	EXPECT(libtest_malloc_accept_leakage == 1);

	libtest_malloc_accept_leakage = 0;

	EXPECT(libtest_malloc_accept_leakage == 0);

	libtest_stop_tracking();
	EXPECT(libtest_malloc_accept_leakage == 1);

	return 0;
}


#endif