mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	add a small test program for pa_close_all()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2467 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									ef4c6bf9d2
								
							
						
					
					
						commit
						b467791b07
					
				
					 2 changed files with 26 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -231,6 +231,7 @@ noinst_PROGRAMS = \
 | 
			
		|||
		pacat-simple \
 | 
			
		||||
		parec-simple \
 | 
			
		||||
		strlist-test \
 | 
			
		||||
		close-test \
 | 
			
		||||
		voltest \
 | 
			
		||||
		memblockq-test \
 | 
			
		||||
		sync-playback \
 | 
			
		||||
| 
						 | 
				
			
			@ -356,6 +357,11 @@ strlist_test_CFLAGS = $(AM_CFLAGS)
 | 
			
		|||
strlist_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore.la libstrlist.la
 | 
			
		||||
strlist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
 | 
			
		||||
 | 
			
		||||
close_test_SOURCES = tests/close-test.c
 | 
			
		||||
close_test_CFLAGS = $(AM_CFLAGS)
 | 
			
		||||
close_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) libpulsecore.la libstrlist.la
 | 
			
		||||
close_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
 | 
			
		||||
 | 
			
		||||
voltest_SOURCES = tests/voltest.c
 | 
			
		||||
voltest_CFLAGS = $(AM_CFLAGS)
 | 
			
		||||
voltest_LDADD = $(AM_LDADD) libpulse.la
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										20
									
								
								src/tests/close-test.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								src/tests/close-test.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
#ifdef HAVE_CONFIG_H
 | 
			
		||||
#include <config.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
 | 
			
		||||
#include <pulsecore/core-util.h>
 | 
			
		||||
 | 
			
		||||
int main(int argc, char *argv[]) {
 | 
			
		||||
 | 
			
		||||
    open("/dev/null", O_RDONLY);
 | 
			
		||||
    open("/dev/null", O_RDONLY);
 | 
			
		||||
    open("/dev/null", O_RDONLY);
 | 
			
		||||
    open("/dev/null", O_RDONLY);
 | 
			
		||||
 | 
			
		||||
    pa_close_all(5, -1);
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue