[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/11: tests: openvswitch: Check whether ovs0 is up.
From: |
guix-commits |
Subject: |
03/11: tests: openvswitch: Check whether ovs0 is up. |
Date: |
Fri, 10 Dec 2021 05:49:27 -0500 (EST) |
civodul pushed a commit to branch wip-networking-netlink
in repository guix.
commit 38a28d22e5a41ba19b2a4db9aa301007913ce479
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Oct 23 15:04:58 2021 +0200
tests: openvswitch: Check whether ovs0 is up.
* gnu/tests/networking.scm (run-openvswitch-test)["ovs0 is up"]: New test.
---
gnu/tests/networking.scm | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/gnu/tests/networking.scm b/gnu/tests/networking.scm
index 5da1c91..131428c 100644
--- a/gnu/tests/networking.scm
+++ b/gnu/tests/networking.scm
@@ -286,12 +286,15 @@ port 7, and a dict service on port 2628."
(define (run-openvswitch-test)
(define os
(marionette-operating-system %openvswitch-os
- #:imported-modules '((gnu services herd))))
+ #:imported-modules '((gnu services herd)
+ (guix build syscalls))))
(define test
- (with-imported-modules '((gnu build marionette))
+ (with-imported-modules '((gnu build marionette)
+ (guix build syscalls))
#~(begin
(use-modules (gnu build marionette)
+ (guix build syscalls)
(ice-9 popen)
(ice-9 rdelim)
(srfi srfi-64))
@@ -339,6 +342,18 @@ port 7, and a dict service on port 2628."
(current-services))))
marionette))
+ (test-equal "ovs0 is up"
+ IFF_UP
+ (marionette-eval
+ '(begin
+ (use-modules (guix build syscalls))
+
+ (let* ((sock (socket AF_INET SOCK_STREAM 0))
+ (flags (network-interface-flags sock "ovs0")))
+ (close-port sock)
+ (logand flags IFF_UP)))
+ marionette))
+
(test-end)
(exit (= (test-runner-fail-count (test-runner-current)) 0)))))
- branch wip-networking-netlink created (now 0534058), guix-commits, 2021/12/10
- 02/11: tests: Add 'static-networking' test., guix-commits, 2021/12/10
- 03/11: tests: openvswitch: Check whether ovs0 is up.,
guix-commits <=
- 04/11: doc: Add new "Networking Setup" node for the main setup options., guix-commits, 2021/12/10
- 01/11: shell: Fix '--file' description in '--help' output., guix-commits, 2021/12/10
- 08/11: services: static-networking: Change interface to mimic netlink., guix-commits, 2021/12/10
- 10/11: services: Define '%loopback-static-networking'., guix-commits, 2021/12/10
- 07/11: services: secret-service: Turn into a Shepherd service., guix-commits, 2021/12/10
- 11/11: tests: Replace uses of deprecated 'static-networking-service'., guix-commits, 2021/12/10
- 05/11: gnu: guile-netlink: Allow cross-compilation., guix-commits, 2021/12/10
- 09/11: services: Define '%qemu-static-networking'., guix-commits, 2021/12/10
- 06/11: services: static-networking: Use Guile-Netlink on GNU/Linux., guix-commits, 2021/12/10