diff --git a/src/sattach/opt.c b/src/sattach/opt.c index a537aa0bb995881e66cded0f282f3b6ed351b2bc..4981733be670186c0d0e8de6953c559be37ca990 100644 --- a/src/sattach/opt.c +++ b/src/sattach/opt.c @@ -239,12 +239,13 @@ void set_options(const int argc, char **argv) int opt_char, option_index = 0; static struct option long_options[] = { {"help", no_argument, 0, 'h'}, - {"quiet", no_argument, 0, 'Q'}, + {"quiet", no_argument, 0, 'q'}, + {"usage", no_argument, 0, 'u'}, {"verbose", no_argument, 0, 'v'}, {"version", no_argument, 0, 'V'}, {NULL} }; - char *opt_string = "+hQvV"; + char *opt_string = "+hquvV"; opt.progname = xbasename(argv[0]); optind = 0; @@ -260,9 +261,12 @@ void set_options(const int argc, char **argv) case 'h': _help(); exit(0); - case 'Q': + case 'q': opt.quiet++; break; + case 'u': + _usage(); + exit(0); case 'v': opt.verbose++; break; @@ -391,8 +395,8 @@ static void _help(void) printf( "Help options:\n" -" -h, --help show this help message\n" -" --usage display brief usage message\n" +" -h, --help show this help message\n" +" -u, --usage display brief usage message\n" "\n" "Other options:\n" " -V, --version output version information and exit\n" diff --git a/testsuite/expect/test17.7 b/testsuite/expect/test17.7 index 9f2f3d08e5b477f02c25102aad049f9d304b2ef7..f24c924aa8c355b039759ec6febbbfeb1dae1689 100755 --- a/testsuite/expect/test17.7 +++ b/testsuite/expect/test17.7 @@ -53,7 +53,7 @@ make_bash_script $file_in " # Submit a slurm job that will execute 'pwd' # set job_id 0 -spawn $sbatch -N1 --output=$file_out --chdir=$tmp_dir -t1 $file_in +spawn $sbatch -N1 --output=$file_out --workdir=$tmp_dir -t1 $file_in expect { -re "Submitted batch job ($number)" { set job_id $expect_out(1,string) diff --git a/testsuite/expect/test18.10 b/testsuite/expect/test18.10 index b0d25625b3d4c3b50f2bed97c238d6939293fcc1..f0e5167c117228d5791250cbca4ef2cb750310ee 100755 --- a/testsuite/expect/test18.10 +++ b/testsuite/expect/test18.10 @@ -78,7 +78,7 @@ expect { # set job_id 0 set matches 0 -spawn $salloc -t1 -v $slaunch --slaunch-error=none -t1 $bin_sleep aaa +spawn $salloc -t1 -v $slaunch --task-error=/dev/null $bin_sleep aaa expect { -re "Pending job allocation ($number)" { set job_id $expect_out(1,string)