Commit 825842c
test: getgroups() may contain duplicate GIDs
Some systems may have multiple group names with the same group ID, in
which case getgroups() returns duplicate values, where `id -G` will
filter the duplicates. Unique and sort the arrays so they can be
compared.
PR-URL: #10389
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>1 parent c6618df commit 825842cCopy full SHA for 825842c
File tree
Expand file treeCollapse file tree
1 file changed
+11
-5
lines changedOpen diff view settings
Filter options
- test/parallel
Expand file treeCollapse file tree
1 file changed
+11
-5
lines changedOpen diff view settings
Collapse file
test/parallel/test-process-getgroups.js
Copy file name to clipboard+11-5Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | | - |
4 | | - |
| 3 | + |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
8 | 8 | |
9 | 9 | |
| 10 | + |
| 11 | + |
10 | 12 | |
11 | 13 | |
12 | | - |
| 14 | + |
13 | 15 | |
14 | 16 | |
15 | 17 | |
16 | 18 | |
17 | | - |
18 | | - |
| 19 | + |
| 20 | + |
19 | 21 | |
20 | 22 | |
21 | 23 | |
| ||
24 | 26 | |
25 | 27 | |
26 | 28 | |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
0 commit comments