diff options
author | Rainer Tammer <tammer@tammer.net> | 2010-05-16 11:37:57 +0200 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-05-18 01:11:02 +0100 |
commit | 2823ea9b50ecf90078608b65b330273292d4304e (patch) | |
tree | 498fd6c7b2c15f6cea2433842599a51e6875d20d /t/op | |
parent | c86ffc3299ed26fc3616b4d2bb0abdf2e70a0ad1 (diff) | |
download | perl-2823ea9b50ecf90078608b65b330273292d4304e.tar.gz |
Fix groups.t test on AIX
'id -a' doesn't work, so try it without the -a if that fails.
Diffstat (limited to 't/op')
-rw-r--r-- | t/op/groups.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/op/groups.t b/t/op/groups.t index c1cc889975..ed549a0b59 100644 --- a/t/op/groups.t +++ b/t/op/groups.t @@ -196,13 +196,14 @@ sub _system_groups { # prefer 'id' over 'groups' (is this ever wrong anywhere?) # and 'id -a' over 'id -Gn' (the former is good about spaces in group names) - $cmd = 'id -a 2>/dev/null'; + $cmd = 'id -a 2>/dev/null || id 2>/dev/null'; $str = `$cmd`; if ( $str && $str =~ /groups=/ ) { # $str is of the form: # uid=39957(gsar) gid=22(users) groups=33536,39181,22(users),0(root),1067(dev) # FreeBSD since 6.2 has a fake id -a: # uid=1001(tobez) gid=20(staff) groups=20(staff), 0(wheel), 68(dialer) + # On AIX it's id # # Linux may also have a context= field |