From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +Bw8J6ra/F50DAAA0tVLHw (envelope-from ) for ; Wed, 01 Jul 2020 18:49:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id eBj3Iqra/F6cQgAAbx9fmQ (envelope-from ) for ; Wed, 01 Jul 2020 18:49:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2359B940308 for ; Wed, 1 Jul 2020 18:49:14 +0000 (UTC) Received: from localhost ([::1]:40702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqhnF-0007qc-2i for larch@yhetil.org; Wed, 01 Jul 2020 14:49:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqhn4-0007pd-IC for guix-patches@gnu.org; Wed, 01 Jul 2020 14:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqhn4-0007yZ-8V for guix-patches@gnu.org; Wed, 01 Jul 2020 14:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jqhn4-00015Q-63 for guix-patches@gnu.org; Wed, 01 Jul 2020 14:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41820] [PATCH] file-systems: Add record type for a file system device. Resent-From: Stefan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jul 2020 18:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41820 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: Danny Milosavljevic , 41820@debbugs.gnu.org Received: via spool by 41820-submit@debbugs.gnu.org id=B41820.15936293394165 (code B ref 41820); Wed, 01 Jul 2020 18:49:02 +0000 Received: (at 41820) by debbugs.gnu.org; 1 Jul 2020 18:48:59 +0000 Received: from localhost ([127.0.0.1]:53744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqhn1-000156-66 for submit@debbugs.gnu.org; Wed, 01 Jul 2020 14:48:59 -0400 Received: from vsmx011.vodafonemail.xion.oxcs.net ([153.92.174.89]:16381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqhmy-00014n-JX for 41820@debbugs.gnu.org; Wed, 01 Jul 2020 14:48:58 -0400 Received: from vsmx003.vodafonemail.xion.oxcs.net (unknown [192.168.75.197]) by mta-5-out.mta.xion.oxcs.net (Postfix) with ESMTP id 6314559D4AC; Wed, 1 Jul 2020 18:48:50 +0000 (UTC) Received: from macbook-pro.kuh-wiese.my-router.de (unknown [145.254.41.123]) by mta-7-out.mta.xion.oxcs.net (Postfix) with ESMTPA id E154F539BE3; Wed, 1 Jul 2020 18:48:43 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Stefan In-Reply-To: <87tuz44v7k.fsf@gnu.org> Date: Wed, 1 Jul 2020 20:48:42 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <39F7973C-8A64-4B6D-9A26-D98AA7F37475@vodafonemail.de> References: <87tuz44v7k.fsf@gnu.org> X-Mailer: Apple Mail (2.3124) X-VADE-STATUS: LEGIT X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.51 X-TUID: qoBNcBjkSa8T Hi Mathieu! > * As you probably noticed the bootloading & system part of Guix is > moving a lot recently. This patch does not apply on master, so it = would > be nice if you could rebase it and pass "--base=3Dauto" option to "git > format-patch" so that it's easier to apply it. OK. > * It would be nice to have tests for this functionality. There's = already > a (gnu tests nfs) module, testing the NFS service. Maybe you could add = a > test case of a marionette booting from a local NFS share. I tried. Unfortunately on my little aarch64 SBC compiling the necessary = packages takes days =E2=80=93 there are no substitutes available =E2=80=93= and in the end qemu-5 has a failing test. I retried and rebased and = retried and wasted days in the end. I=E2=80=99m a bit frustrated. :-( TEST iotest-qcow2: 244 [fail] QEMU -- = "/tmp/guix-build-qemu-5.0.0.drv-0/qemu-5.0.0/tests/qemu-iotests/../../aarc= h64-softmmu/qemu-system-aarch64" -nodefaults -display none -machine virt -accel qtest QEMU_IMG -- = "/tmp/guix-build-qemu-5.0.0.drv-0/qemu-5.0.0/tests/qemu-iotests/../../qemu= -img" QEMU_IO -- = "/tmp/guix-build-qemu-5.0.0.drv-0/qemu-5.0.0/tests/qemu-iotests/../../qemu= -io" --cache writeback --aio threads -f qcow2 QEMU_NBD -- = "/tmp/guix-build-qemu-5.0.0.drv-0/qemu-5.0.0/tests/qemu-iotests/../../qemu= -nbd" IMGFMT -- qcow2 (compat=3D1.1) IMGPROTO -- file PLATFORM -- Linux/aarch64 5.5.9 TEST_DIR -- = /tmp/guix-build-qemu-5.0.0.drv-0/qemu-5.0.0/tests/qemu-iotests/scratch SOCK_DIR -- /tmp/guix-build-qemu-5.0.0.drv-0/tmp.qUme9gv2Jy SOCKET_SCM_HELPER -- = /tmp/guix-build-qemu-5.0.0.drv-0/qemu-5.0.0/tests/qemu-iotests/socket_scm_= helper --- = /tmp/guix-build-qemu-5.0.0.drv-0/qemu-5.0.0/tests/qemu-iotests/244.out = 2020-04-28 16:49:25.000000000 +0000 +++ = /tmp/guix-build-qemu-5.0.0.drv-0/qemu-5.0.0/tests/qemu-iotests/244.out.bad= 2020-06-29 10:27:02.036147483 +0000 @@ -74,6 +74,7 @@ 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 1048576/1048576 bytes at offset 1048576 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Pattern verification failed at offset 2097152, 2097152 bytes read 2097152/2097152 bytes at offset 2097152 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 1048576/1048576 bytes at offset 4194304 @@ -108,7 +109,7 @@ read 4194304/4194304 bytes at offset 2097152 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -Images are identical. +Content mismatch at offset 2097152! qcow2 file size after I/O: 327680 =3D=3D=3D bdrv_co_block_status test for file and offset=3D0 =3D=3D=3D This is the test that I wrote and wanted to try. Maybe you can pick it = up and give it a try. (define (run-nfs-root-fs-test) "Run a test of an OS mounting its root file system via NFS." (define nfs-root-server-os (marionette-operating-system (operating-system (inherit %nfs-os) (file-systems %base-file-systems) (services (modify-services (operating-system-user-services %nfs-os) (nfs-service-type config =3D> (nfs-configuration (debug '(nfs nfsd mountd)) (exports '(("/export" = "*(rw,insecure,no_subtree_check,crossmnt,fsid=3Droot,no_root_squash,insecu= re,async)")))))))) #:requirements '(nscd) #:imported-modules '((gnu services herd) (guix combinators)))) (define nfs-root-client-os (marionette-operating-system (operating-system (inherit %nfs-os) (kernel-arguments '("ip=3Ddhcp")) (file-systems (cons (file-system (type "nfs") (mount-point "/") (device (nfs-share ":/export")) (options "addr=3D0.0.0.0,vers=3D4.2")) %base-file-systems))) #:requirements '(nscd) #:imported-modules '((gnu services herd) (guix combinators)))) (define test (with-imported-modules '((gnu build marionette)) #~(begin (use-modules (gnu build marionette) (srfi srfi-64)) (define server-marionette (make-marionette (list #$(virtual-machine = nfs-root-server-os)))) (define client-marionette (make-marionette (list #$(virtual-machine = nfs-root-client-os)))) (mkdir #$output) (chdir #$output) (test-begin "start-nfs-root-server") (marionette-eval '(begin (use-modules (gnu services herd)) (current-output-port (open-file "/dev/console" "w0")) (chmod "/export" #o777) (symlink "/gnu" "/export/gnu") (start-service 'nscd)) (start-service 'networking) (start-service 'nfs) server-marionette) ;; Wait for the NFS services to be up and running. (test-assert "nfs services are running" (wait-for-file "/var/run/rpc.statd.pid" server-marionette)) (test-begin "boot-nfs-root-client") (marionette-eval '(begin (use-modules (gnu services herd)) (current-output-port (open-file "/dev/console" "w0")) (with-output-to-file "/var/run/mounts" (lambda () (system* "mount"))) (chmod "/var/run/mounts" #o777)) client-marionette) (test-assert "nfs-root-client booted") (marionelle-eval '(begin (and (file-exists? "/export/var/run/mounts") (system* "cat" "/export/var/run/mounts"))) server-marionette) (test-end) (exit (=3D (test-runner-fail-count (test-runner-current)) = 0))))) (gexp->derivation "nfs-server-test" test)) (define %test-nfs-root-fs (system-test (name "nfs-root-fs") (description "Test that an NFS server can be started and exported directories can be mounted.") (value (run-nfs-root-fs-test)))) Bye Stefan