Ever since pmap was refactored via the reference below
(and sprinkled with those damn tabs), the response for
the absence of any argument has been an error message.
This patch restores the proper behavior ('usage' text)
and updates the dejagnu 'no arguments' expect pattern.
Reference(s):
commit
d50884788df5a9706ecba6a0966f48ef8f213f41
Signed-off-by: Jim Warner <james.warner@comcast.net>
textdomain(PACKAGE);
atexit(close_stdout);
+ if (argc < 2)
+ usage(stderr);
+
while ((c = getopt_long(argc, argv, "xXrdqA:hVcC:nN:p", longopts, NULL)) != -1)
switch (c) {
case 'x':
set test "pmap with no arguments"
spawn $pmap
-expect_pass "$test" "^\(lt-\)\?pmap: argument missing"
-#expect_pass "$test" "^Usage: pmap \\\[-x | -d\\\] \\\[-q\\\] \\\[-A low,high\\\] pid\\.\\.\\.\\s+-x\\s+show details\\s+-d\\s+show offset and device number\\s+-q\\s+quiet; less header/footer info\\s+-V\\s+show the version number\\s+-A\\s+limit results to the given range\\s*"
+#expect_pass "$test" "^\(lt-\)\?pmap: argument missing"
+expect_pass "$test" "Usage:\\s+\(lt-\)?pmap \\\[options\\\] pid \\\[pid \.\.\.\\\]"
set test "pmap standard output"
spawn $pmap $mypid