From patchwork Thu Jan 2 00:39:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 19521 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 52C87179CA; Thu, 2 Jan 2020 00:40:41 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id E9189179BD for ; Thu, 2 Jan 2020 00:40:40 +0000 (GMT) Received: from localhost ([::1]:35020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imoXY-0007hT-HL for patchwork@mira.cbaines.net; Wed, 01 Jan 2020 19:40:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35082) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imoWz-00073u-M8 for guix-patches@gnu.org; Wed, 01 Jan 2020 19:40:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imoWy-00040t-Gm for guix-patches@gnu.org; Wed, 01 Jan 2020 19:40:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1imoWy-00040N-D6 for guix-patches@gnu.org; Wed, 01 Jan 2020 19:40:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1imoWy-0003et-C5 for guix-patches@gnu.org; Wed, 01 Jan 2020 19:40:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38860] [PATCH 6/7] tests: install: Test a JFS root file system. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Jan 2020 00:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 38860@debbugs.gnu.org Received: via spool by 38860-submit@debbugs.gnu.org id=B38860.157792555913963 (code B ref 38860); Thu, 02 Jan 2020 00:40:04 +0000 Received: (at 38860) by debbugs.gnu.org; 2 Jan 2020 00:39:19 +0000 Received: from localhost ([127.0.0.1]:37813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imoWF-0003d2-1b for submit@debbugs.gnu.org; Wed, 01 Jan 2020 19:39:19 -0500 Received: from tobias.gr ([80.241.217.52]:39910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imoWD-0003bs-Iv for 38860@debbugs.gnu.org; Wed, 01 Jan 2020 19:39:18 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id 7b95b530 for <38860@debbugs.gnu.org>; Thu, 2 Jan 2020 00:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=2018; i=me@tobias.gr; bh=yZK4TRJ1AE43gs4tEI5RwfpojbQtMi4MAFZRWzUEVYM=; b=E8HVTGE4VOgl G9/kGs2FU87g8AE+EXcuE2SGP0IPOVp6/fapuYxVXLWPPQALuIK61U/vv5M0nEOH Z7IIQtZLbC76+Hfc1GgAU0nIwrqdpHnhaIX442blEm+b12+hqmwkE8Tkhp+yvsiu D/+YvMB2ErFxmW6I/UX8oAtl9rPzJlAgtiPqACME1SdFdaf4i77HS6BRJ7BvioCC zGmLLG2OSH27hoW5IU3FBlbAOxVyfPSoCi4TSLXbutgpqF+2baB2YWwu7g+pf51r ZJtJ7zOiSfQhANfDEMQKOMZthm/lAOIS/IKLvQzTYaPBIq4wx3MYxHcQH4/B/pLB xXy75mS5Pg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 8b7362c2 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <38860@debbugs.gnu.org>; Thu, 2 Jan 2020 00:39:13 +0000 (UTC) Date: Thu, 2 Jan 2020 01:39:01 +0100 Message-Id: <20200102003902.15205-6-me@tobias.gr> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200102003902.15205-1-me@tobias.gr> References: <20200102003902.15205-1-me@tobias.gr> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches X-Patchwork-Original-From: Tobias Geerinckx-Rice via Guix-patches via From: "ashish.is--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches * 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 -;;; Copyright © 2017 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice ;;; ;;; 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"))))) + +;;; +;;; 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