bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43344: "basic" system tests fail (and all the other ones) on guix ma


From: Ludovic Courtès
Subject: bug#43344: "basic" system tests fail (and all the other ones) on guix master
Date: Wed, 16 Sep 2020 15:59:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> environment variable `PATH' set to 
> `/gnu/store/j3jlpncfqvykkq6sx7h4ly1rdcr2a8qq'
> creating partition table with 2 partitions (20.0 MiB, 40.0 MiB)...
> Error: Partition(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 
> 17, .

[...]

>   1. &invoke-error:
>       program: "parted"
>       arguments: ("--script" "/dev/vda" "mklabel" "msdos" "mkpart" "primary" 
> "e)
>       exit-status: 1
>       term-signal: #f
>       stop-signal: #f

The code in question in Parted:

--8<---------------cut here---------------start------------->8---
                if (!add_partition (disk, part)) {
                        ok[i - 1] = 0;
                        errnums[i - 1] = errno;
                }

[…]

        char *bad_part_list = NULL;
        /* now warn about any errors */
        for (i = 1; i <= lpn; i++) {
                if (ok[i - 1] || errnums[i - 1] == ENXIO)
                        continue;
                if (bad_part_list == NULL) {
                        bad_part_list = malloc (lpn * 5);
                        if (!bad_part_list)
                                goto cleanup;
                        bad_part_list[0] = 0;
                }
                sprintf (bad_part_list + strlen (bad_part_list), "%d, ", i);
        }
        if (bad_part_list == NULL)
                ret = 1;
        else {
                bad_part_list[strlen (bad_part_list) - 2] = 0;
                if (ped_exception_throw (
                        PED_EXCEPTION_ERROR,
                        PED_EXCEPTION_IGNORE_CANCEL,
                        _("Partition(s) %s on %s have been written, but we have 
"
                          "been unable to inform the kernel of the change, "
                          "probably because it/they are in use.  As a result, "
                          "the old partition(s) will remain in use.  You "
                          "should reboot now before making further changes."),
                        bad_part_list, disk->dev->path) == PED_EXCEPTION_IGNORE)
                        ret = 1;
                free (bad_part_list);
        }
--8<---------------cut here---------------end--------------->8---

With the patch below, I strace’d ‘parted’, which gives:

--8<---------------cut here---------------start------------->8---
$ make check-system TESTS=basic

[…]

ioctl(3, BLKPG, {op=BLKPG_DEL_PARTITION, flags=0, datalen=152, data={start=0, 
length=0, pno=253, devname="", volname=""}}) = -1 ENOMEM (Cannot allocate 
memory)
ioctl(3, BLKPG, {op=BLKPG_DEL_PARTITION, flags=0, datalen=152, data={start=0, 
length=0, pno=254, devname="", volname=""}}) = -1 ENOMEM (Cannot allocate 
memory)
ioctl(3, BLKPG, {op=BLKPG_DEL_PARTITION, flags=0, datalen=152, data={start=0, 
length=0, pno=255, devname="", volname=""}}) = -1 ENOMEM (Cannot allocate 
memory)
ioctl(3, BLKPG, {op=BLKPG_DEL_PARTITION, flags=0, datalen=152, data={start=0, 
length=0, pno=256, devname="", volname=""}}) = -1 ENOMEM (Cannot allocate 
memory)
write(2, "Error", 5Error)                    = 5
write(2, ": ", 2: )                       = 2
write(2, "Partition(s) 1, 2, 3, 4, 5, 6, 7"..., 495Partition(s) 1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 
47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 on 
/dev/vda have been written, but we have been unable to inform the kernel of the 
change, probably because it/they are in use.  As a result, the old partition(s) 
will remain in use.  You should reboot now before making further changes.) = 495
write(2, "\n", 1
)                       = 1
--8<---------------cut here---------------end--------------->8---

So I threw more virtual RAM at it:

diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
@@ -446,6 +450,7 @@ system that is passed to 'populate-root-file-system'."
                                      #:bootloader-installer
                                      #+(bootloader-installer bootloader)))))))
    #:system system
+   #:memory-size 1024
    #:make-disk-image? #t
    #:disk-image-size disk-image-size
    #:disk-image-format disk-image-format
… but that doesn’t help.

Ideas?

Thanks,
Ludo’.

diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 287d099f79..e793b5b518 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -297,7 +297,7 @@ actual /dev name based on DEVICE."
                                      partition-size)
                             partitions)
                        ", "))
-  (apply invoke "parted" "--script"
+  (apply invoke "strace" "parted" "--script"
          device "mklabel" label-type
          (options partitions offset))
 
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 59ffb334e0..72fb3ca49d 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -349,15 +349,15 @@ corresponding UPSTREAM-SOURCE (an origin), using the 
given DEBLOB-SCRIPTS."
 
 ;; The current "stable" kernel. That is, the most recently released major
 ;; version.
-(define-public linux-libre-5.8-version "5.8.7")
+(define-public linux-libre-5.8-version "5.8.8")
 (define deblob-scripts-5.8
   (linux-libre-deblob-scripts
-   linux-libre-5.8-version
+   "5.8.7"
    (base32 "07z7sglyrfh0706icqqf3shadf638pvyid9386r661ds5lbsa2mw")
    (base32 "0j6jba5fcddqlb42f95gjl78jisfla4nswqila074gglcrbnl9q7")))
 (define-public linux-libre-5.8-pristine-source
   (let ((version linux-libre-5.8-version)
-        (hash (base32 "1zhpzlhl2ykna2nc70m72wlgyv1pkvkpfssb4k8p5pwlkh1ga2vv")))
+        (hash (base32 "0xm901zvvrwsb9k88la6pb65nybi43bygiyz1z68njwsx6ripxik")))
    (make-linux-libre-source version
                             (%upstream-linux-source version hash)
                             deblob-scripts-5.8)))
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 80a8618729..49489b6159 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -376,6 +376,10 @@ system that is passed to 'populate-root-file-system'."
 
              (set-path-environment-variable "PATH" '("bin" "sbin") inputs)
 
+             (setenv "PATH"
+                     (string-append #+(file-append strace "/bin") ":"
+                                    (getenv "PATH")))
+
              (let* ((graphs     '#$(match inputs
                                      (((names . _) ...)
                                       names)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]