s3:torture: add '-T 'option=value' this is similar to '--option='=value'
authorStefan Metzmacher <metze@samba.org>
Mon, 4 Mar 2024 14:27:24 +0000 (15:27 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Apr 2024 23:50:34 +0000 (23:50 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/torture/torture.c

index f036e0311e21e11f9139de688a2785bf5fd0c1c7..240934f8263ae951875179471ba669c2513b8bd4 100644 (file)
@@ -16294,6 +16294,7 @@ static void usage(void)
        printf("\t-b unclist_filename   specify multiple shares for multiple connections\n");
        printf("\t-f filename           filename to test\n");
        printf("\t-e                    encrypt\n");
+       printf("\t-T 'OPTION=VALUE'     smb.conf option line\n");
        printf("\n\n");
 
        printf("tests are:");
@@ -16380,7 +16381,7 @@ static void usage(void)
 
        fstrcpy(workgroup, lp_workgroup());
 
-       while ((opt = getopt(argc, argv, "p:hW:U:n:N:O:o:m:Ll:d:Aec:ks:b:B:f:"))
+       while ((opt = getopt(argc, argv, "p:hW:U:n:N:O:o:m:Ll:d:Aec:ks:b:B:f:T:"))
               != EOF) {
                switch (opt) {
                case 'p':
@@ -16453,6 +16454,9 @@ static void usage(void)
                case 'f':
                        test_filename = SMB_STRDUP(optarg);
                        break;
+               case 'T':
+                       lpcfg_set_option(lp_ctx, optarg);
+                       break;
                default:
                        printf("Unknown option %c (%d)\n", (char)opt, opt);
                        usage();