]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: update default lsmem output
authorKarel Zak <kzak@redhat.com>
Fri, 3 Nov 2017 18:19:21 +0000 (19:19 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 3 Nov 2017 18:19:21 +0000 (19:19 +0100)
The commit 96cbe362c034305e5f12a912b4247b3321420ee7 forces lsmem to
follow output column for split policy.

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/nsenter.c
tests/expected/lsmem/lsmem-s390-zvm-6g

index 9c452c1d145e3cfbaf2ac559f34960c0813a1408..464f9f98c74aaab9d55982e923d56899e035cd71 100644 (file)
@@ -238,6 +238,7 @@ int main(int argc, char *argv[])
        int do_fork = -1; /* unknown yet */
        uid_t uid = 0;
        gid_t gid = 0;
+       const char *rd_path = NULL, *wd_path = NULL;
 #ifdef HAVE_LIBSELINUX
        bool selinux = 0;
 #endif
@@ -318,13 +319,13 @@ int main(int argc, char *argv[])
                        break;
                case 'r':
                        if (optarg)
-                               open_target_fd(&root_fd, "root", optarg);
+                               rd_path = optarg;
                        else
                                do_rd = true;
                        break;
                case 'w':
                        if (optarg)
-                               open_target_fd(&wd_fd, "cwd", optarg);
+                               wd_path = optarg;
                        else
                                do_wd = true;
                        break;
@@ -433,6 +434,11 @@ int main(int argc, char *argv[])
                }
        }
 
+       if (wd_path)
+               open_target_fd(&wd_fd, "cwd", wd_path);
+       if (rd_path)
+               open_target_fd(&root_fd, "root", rd_path);
+
        /* Remember the current working directory if I'm not changing it */
        if (root_fd >= 0 && wd_fd < 0) {
                wd_fd = open(".", O_RDONLY);
index 02a9ddc9ac00a6b565ed3f3158edbf58243b8b7d..4cbf7f42cd4f83c0d5f2c2fd8696d4fbeb56c662 100644 (file)
@@ -139,10 +139,8 @@ RANGE                                  SIZE   STATE REMOVABLE BLOCK
 0x00000000c0000000-0x00000000dfffffff  512M  online       yes 12-13
 0x00000000e0000000-0x00000000efffffff  256M offline         -    14
 0x00000000f0000000-0x00000000ffffffff  256M  online       yes    15
-0x0000000100000000-0x000000010fffffff  256M  online        no    16
-0x0000000110000000-0x000000011fffffff  256M  online        no    17
-0x0000000120000000-0x000000012fffffff  256M  online       yes    18
-0x0000000130000000-0x000000013fffffff  256M  online       yes    19
+0x0000000100000000-0x000000011fffffff  512M  online        no 16-17
+0x0000000120000000-0x000000013fffffff  512M  online       yes 18-19
 0x0000000140000000-0x000000017fffffff    1G offline         - 20-23
 
 Memory block size:       256M