Date: Sat, 7 Apr 2007 09:53:39 GMT From: Michael Bushkov <bushman@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 117575 for review Message-ID: <200704070953.l379rdaM093359@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=117575 Change 117575 by bushman@bushman_sh on 2007/04/07 09:53:04 + usage() cleanups in nsswitch regression tests + README file for regression tests added Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/README#1 add .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getaddr.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getaddr.t#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getgr.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-gethostby.c#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getproto.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getpw.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getrpc.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getserv.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getusershell.c#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getusershell.t#2 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getaddr.c#2 (text+ko) ==== @@ -50,7 +50,7 @@ static int debug = 0; static struct addrinfo hints; -static enum test_methods method = TEST_BUILD_SNAPSHOT; +static enum test_methods method = TEST_GETADDRINFO; DECLARE_TEST_DATA(addrinfo) DECLARE_TEST_FILE_SNAPSHOT(addrinfo) @@ -423,7 +423,7 @@ usage(void) { (void)fprintf(stderr, - "Usage: %s [-n] [-d] [-46] [-s <file>] -f <file>\n", + "Usage: %s [-d] [-46] [-s <file]> -f <file>\n", getprogname()); exit(1); } @@ -451,14 +451,12 @@ case '6': hints.ai_family = PF_INET6; break; - case 'n': - method = TEST_GETADDRINFO; - break; case 'd': debug = 1; break; case 's': snapshot_file = strdup(optarg); + method = TEST_BUILD_SNAPSHOT; break; case 'f': hostlist_file = strdup(optarg); @@ -481,9 +479,6 @@ usage(); } - if ((snapshot_file == NULL) && (method == TEST_BUILD_SNAPSHOT)) - usage(); - if (debug) printf("building host lists from %s\n", hostlist_file); ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getaddr.t#2 (text+ko) ==== @@ -20,13 +20,14 @@ echo 1..6 #Tests with hints.ai_family is set to PF_UNSPEC -do_test 1 'getaddrinfo() (PF_UNSPEC)' '-n -f mach' -do_test 2 'getaddrinfo() snapshot (PF_UNSPEC)' '-n -f mach -s snapshot_ai' +do_test 1 'getaddrinfo() (PF_UNSPEC)' '-f mach' +do_test 2 'getaddrinfo() snapshot (PF_UNSPEC)' '-f mach -s snapshot_ai' #Tests with hints.ai_family is set to PF_INET -do_test 3 'getaddrinfo() (PF_INET)' '-n -f mach' -do_test 4 'getaddrinfo() snapshot (PF_INET)' '-4 -n -f mach -s snapshot_ai4' +do_test 3 'getaddrinfo() (PF_INET)' '-f mach' +do_test 4 'getaddrinfo() snapshot (PF_INET)' '-4 -f mach -s snapshot_ai4' #Tests with hints.ai_family is set to PF_INET6 -do_test 5 'getaddrinfo() (PF_INET6)' '-n -f mach' -do_test 6 'getaddrinfo() snapshot (PF_INET6)' '-6 -n -f mach -s snapshot_ai6' +do_test 5 'getaddrinfo() (PF_INET6)' '-f mach' +do_test 6 'getaddrinfo() snapshot (PF_INET6)' '-6 -f mach -s snapshot_ai6' + ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getgr.c#5 (text+ko) ==== @@ -414,7 +414,7 @@ usage(void) { (void)fprintf(stderr, - "Usage: %s [-dnge2] [-s <file>]\n", + "Usage: %s -nge2 [-d] [-s <file>]\n", getprogname()); exit(1); } ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-gethostby.c#4 (text+ko) ==== @@ -869,7 +869,7 @@ usage(void) { (void)fprintf(stderr, - "Usage: %s [-na2i] [-d] [-46] [-s <file>] -f <file>\n", + "Usage: %s -na2i [-o] [-d] [-m46] [-s <file>] -f <file>\n", getprogname()); exit(1); } ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getproto.c#2 (text+ko) ==== @@ -415,7 +415,7 @@ usage(void) { (void)fprintf(stderr, - "Usage: %s [-dnve2] [-s <file>]\n", + "Usage: %s -nve2 [-d] [-s <file>]\n", getprogname()); exit(1); } ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getpw.c#5 (text+ko) ==== @@ -368,7 +368,7 @@ usage(void) { (void)fprintf(stderr, - "Usage: %s [-dnue2] [-s <file>]\n", + "Usage: %s -nue2 [-d] [-s <file>]\n", getprogname()); exit(1); } ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getrpc.c#2 (text+ko) ==== @@ -415,7 +415,7 @@ usage(void) { (void)fprintf(stderr, - "Usage: %s [-dnve2] [-s <file>]\n", + "Usage: %s -nve2 [-d] [-s <file>]\n", getprogname()); exit(1); } ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getserv.c#7 (text+ko) ==== @@ -431,7 +431,7 @@ usage(void) { (void)fprintf(stderr, - "Usage: %s [-dnpe2] [-s <file>]\n", + "Usage: %s -npe2 [-d] [-s <file>]\n", getprogname()); exit(1); } ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getusershell.c#2 (text+ko) ==== @@ -139,7 +139,7 @@ usage(void) { (void)fprintf(stderr, - "Usage: %s [-s <file>]\n", + "Usage: %s [-d] -s <file>\n", getprogname()); exit(1); } @@ -153,6 +153,9 @@ int rv; int c; + if (argc < 2) + usage(); + rv = 0; snapshot_file = NULL; while ((c = getopt(argc, argv, "ds:")) != -1) { ==== //depot/projects/soc2006/nss_ldap_cached/src/tools/regression/lib/libc/nss/test-getusershell.t#2 (text+ko) ==== @@ -18,6 +18,5 @@ make $executable 2>&1 > /dev/null -echo 1..2 -do_test 1 'getusershell()' '' -do_test 2 'getusershell() snapshot' '-s snapshot_usershell' +echo 1..1 +do_test 1 'getusershell() snapshot' '-s snapshot_usershell'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704070953.l379rdaM093359>