unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
To: 38860@debbugs.gnu.org
Subject: [bug#38860] [PATCH 6/7] tests: install: Test a JFS root file system.
Date: Thu,  2 Jan 2020 01:39:01 +0100	[thread overview]
Message-ID: <20200102003902.15205-6-me@tobias.gr> (raw)
In-Reply-To: <20200102003902.15205-1-me@tobias.gr>

* gnu/tests/install.scm (%jfs-root-os, %jfs-root-installation-script)
(%test-jfs-root-os): New variables.
---
 gnu/tests/install.scm | 78 +++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 76 insertions(+), 2 deletions(-)

diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index bce4c4b9d4..8842d48df8 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,7 +43,8 @@
             %test-separate-home-os
             %test-raid-root-os
             %test-encrypted-root-os
-            %test-btrfs-root-os))
+            %test-btrfs-root-os
+            %test-jfs-root-os))
 
 ;;; Commentary:
 ;;;
@@ -810,4 +811,77 @@ build (current-guix) and then store a couple of full system images.")
                          (command (qemu-command/writable-image image)))
       (run-basic-test %btrfs-root-os command "btrfs-root-os")))))
 
+\f
+;;;
+;;; JFS root file system.
+;;;
+
+(define-os-with-source (%jfs-root-os %jfs-root-os-source)
+  ;; The OS we want to install.
+  (use-modules (gnu) (gnu tests) (srfi srfi-1))
+
+  (operating-system
+    (host-name "liberigilo")
+    (timezone "Europe/Paris")
+    (locale "en_US.UTF-8")
+
+    (bootloader (bootloader-configuration
+                 (bootloader grub-bootloader)
+                 (target "/dev/vdb")))
+    (kernel-arguments '("console=ttyS0"))
+    (file-systems (cons (file-system
+                          (device (file-system-label "my-root"))
+                          (mount-point "/")
+                          (type "jfs"))
+                        %base-file-systems))
+    (users (cons (user-account
+                  (name "charlie")
+                  (group "users")
+                  (supplementary-groups '("wheel" "audio" "video")))
+                 %base-user-accounts))
+    (services (cons (service marionette-service-type
+                             (marionette-configuration
+                              (imported-modules '((gnu services herd)
+                                                  (guix combinators)))))
+                    %base-services))))
+
+(define %jfs-root-installation-script
+  ;; Shell script of a simple installation.
+  "\
+. /etc/profile
+set -e -x
+guix --version
+
+export GUIX_BUILD_OPTIONS=--no-grafts
+ls -l /run/current-system/gc-roots
+parted --script /dev/vdb mklabel gpt \\
+  mkpart primary ext2 1M 3M \\
+  mkpart primary ext2 3M 2G \\
+  set 1 boot on \\
+  set 1 bios_grub on
+jfs_mkfs -L my-root -q /dev/vdb2
+mount /dev/vdb2 /mnt
+herd start cow-store /mnt
+mkdir /mnt/etc
+cp /etc/target-config.scm /mnt/etc/config.scm
+guix system build /mnt/etc/config.scm
+guix system init /mnt/etc/config.scm /mnt --no-substitutes
+sync
+reboot\n")
+
+(define %test-jfs-root-os
+  (system-test
+   (name "jfs-root-os")
+   (description
+    "Test basic functionality of an OS installed like one would do by hand.
+This test is expensive in terms of CPU and storage usage since we need to
+build (current-guix) and then store a couple of full system images.")
+   (value
+    (mlet* %store-monad ((image   (run-install %jfs-root-os
+                                               %jfs-root-os-source
+                                               #:script
+                                               %jfs-root-installation-script))
+                         (command (qemu-command/writable-image image)))
+      (run-basic-test %jfs-root-os command "jfs-root-os")))))
+
 ;;; install.scm ends here
-- 
2.23.0

  parent reply	other threads:[~2020-01-02  0:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02  0:27 [bug#38860] Support JFS! Tobias Geerinckx-Rice via Guix-patches via
2020-01-02  0:38 ` [bug#38860] [PATCH 1/7] file-systems: Add support for JFS Tobias Geerinckx-Rice via Guix-patches via
2020-01-02  0:38   ` [bug#38860] [PATCH 2/7] uuid: " Tobias Geerinckx-Rice via Guix-patches via
2020-01-02  0:38   ` [bug#38860] [PATCH 3/7] gnu: Add jfsutils-static Tobias Geerinckx-Rice via Guix-patches via
2020-01-02  0:38   ` [bug#38860] [PATCH 4/7] gnu: Add jfs_fsck-static Tobias Geerinckx-Rice via Guix-patches via
2020-01-02  0:39   ` [bug#38860] [PATCH 5/7] linux-initrd: Add support for JFS Tobias Geerinckx-Rice via Guix-patches via
2020-01-02  0:39   ` Tobias Geerinckx-Rice via Guix-patches via [this message]
2020-01-02  0:39   ` [bug#38860] [PATCH 7/7] install: Add jfsutils to the installation image Tobias Geerinckx-Rice via Guix-patches via
2020-01-02 14:35 ` [bug#38860] Support JFS! Danny Milosavljevic
2020-01-03 12:56   ` bug#38860: " Tobias Geerinckx-Rice via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200102003902.15205-6-me@tobias.gr \
    --to=guix-patches@gnu.org \
    --cc=38860@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).