Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2012-01-09 12:55:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
and /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2", Maintainer is "jsrain@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2011-11-05 12:14:36.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2012-01-09 12:55:43.000000000 +0100
@@ -1,0 +2,26 @@
+Fri Jan 6 15:06:00 CET 2012 - mvidner@suse.cz
+
+- Relicensed ConfigHistory from GPL-2.0 to GPL-2.0+
+ to match the rest of the package (bnc#728950).
+- 2.22.2
+
+-------------------------------------------------------------------
+Fri Jan 6 14:57:57 CET 2012 - jreidinger@suse.com
+
+- forbid appending to IPADDR additional suffix if there is already
+ one. Original name have preference (bnc#735109).
+
+-------------------------------------------------------------------
+Fri Jan 6 14:56:00 CET 2012 - mvidner@suse.cz
+
+- create user-unreadable ifcfg files without a race (bnc#713661, CVE-2011-3177)
+- 2.22.1
+
+-------------------------------------------------------------------
+Fri Jan 6 14:47:16 CET 2012 - mvidner@suse.cz
+
+- Moved NetworkStorage from yast2.rpm to yast2-network.rpm
+ (bnc#726057)
+- 2.22.0
+
+-------------------------------------------------------------------
Old:
----
yast2-2.21.25.tar.bz2
New:
----
yast2-2.22.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.ioW6wj/_old 2012-01-09 12:55:46.000000000 +0100
+++ /var/tmp/diff_new_pack.ioW6wj/_new 2012-01-09 12:55:46.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package yast2
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,11 +15,10 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
Name: yast2
-Version: 2.21.25
+Version: 2.22.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -36,8 +35,8 @@
# pre-requires for filling the sysconfig template (sysconfig.yast2)
PreReq: %fillup_prereq
-# float::tolstring builtin
-Requires: yast2-core >= 2.18.12
+# ag_ini section_private
+Requires: yast2-core >= 2.22.1
# Mod_UI
# new UI::OpenContextMenu
Requires: yast2-ycp-ui-bindings >= 2.18.4
@@ -137,7 +136,6 @@
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
-%{?suse_update_config:%{suse_update_config -f}}
./configure --libdir=%{_libdir} --prefix=%{_prefix} --mandir=%{_mandir}
# V=1: verbose build in case we used AM_SILENT_RULES(yes)
# so that RPM_OPT_FLAGS check works
++++++ yast2-2.21.25.tar.bz2 -> yast2-2.22.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.25/VERSION new/yast2-2.22.2/VERSION
--- old/yast2-2.21.25/VERSION 2011-11-02 14:51:09.000000000 +0100
+++ new/yast2-2.22.2/VERSION 2012-01-06 16:00:28.000000000 +0100
@@ -1 +1 @@
-2.21.25
+2.22.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.25/configure new/yast2-2.22.2/configure
--- old/yast2-2.21.25/configure 2011-11-02 14:52:25.000000000 +0100
+++ new/yast2-2.22.2/configure 2012-01-06 16:00:32.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for yast2 2.21.25.
+# Generated by GNU Autoconf 2.68 for yast2 2.22.2.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2'
PACKAGE_TARNAME='yast2'
-PACKAGE_VERSION='2.21.25'
-PACKAGE_STRING='yast2 2.21.25'
+PACKAGE_VERSION='2.22.2'
+PACKAGE_STRING='yast2 2.22.2'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -1232,7 +1232,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2 2.21.25 to adapt to many kinds of systems.
+\`configure' configures yast2 2.22.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1303,7 +1303,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2 2.21.25:";;
+ short | recursive ) echo "Configuration of yast2 2.22.2:";;
esac
cat <<\_ACEOF
@@ -1383,7 +1383,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2 configure 2.21.25
+yast2 configure 2.22.2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1400,7 +1400,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2 $as_me 2.21.25, which was
+It was created by yast2 $as_me 2.22.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2330,7 +2330,7 @@
# Define the identity of the package.
PACKAGE='yast2'
- VERSION='2.21.25'
+ VERSION='2.22.2'
cat >>confdefs.h <<_ACEOF
@@ -2452,7 +2452,7 @@
-VERSION="2.21.25"
+VERSION="2.22.2"
RPMNAME="yast2"
MAINTAINER="Jiri Srain "
@@ -3498,7 +3498,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2 $as_me 2.21.25, which was
+This file was extended by yast2 $as_me 2.22.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3551,7 +3551,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-yast2 config.status 2.21.25
+yast2 config.status 2.22.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.25/configure.in new/yast2-2.22.2/configure.in
--- old/yast2-2.21.25/configure.in 2011-11-02 14:52:21.000000000 +0100
+++ new/yast2-2.22.2/configure.in 2012-01-06 16:00:29.000000000 +0100
@@ -1,9 +1,9 @@
dnl configure.in for yast2
dnl
-dnl -- This file is generated by y2autoconf 2.21.2 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.21.7 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2, 2.21.25, http://bugs.opensuse.org/, yast2)
+AC_INIT(yast2, 2.22.2, http://bugs.opensuse.org/, yast2)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.21.25"
+VERSION="2.22.2"
RPMNAME="yast2"
MAINTAINER="Jiri Srain "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.25/library/modules/ConfigHistory.ycp new/yast2-2.22.2/library/modules/ConfigHistory.ycp
--- old/yast2-2.21.25/library/modules/ConfigHistory.ycp 2011-11-01 13:17:25.000000000 +0100
+++ new/yast2-2.22.2/library/modules/ConfigHistory.ycp 2012-01-06 16:00:25.000000000 +0100
@@ -3,8 +3,9 @@
*
*
* This program is free software; you can redistribute it and/or modify it under
- * the terms of version 2 of the GNU General Public License as published by the
- * Free Software Foundation.
+ * the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.25/library/modules/Version.ycp new/yast2-2.22.2/library/modules/Version.ycp
--- old/yast2-2.21.25/library/modules/Version.ycp 2011-11-02 14:52:31.000000000 +0100
+++ new/yast2-2.22.2/library/modules/Version.ycp 2012-01-06 16:00:40.000000000 +0100
@@ -20,7 +20,7 @@
/**
* Version of the yast2 package
*/
-global string yast2 = "2.21.25";
+global string yast2 = "2.22.2";
/* EOF */
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.25/library/network/src/NetworkInterfaces.ycp new/yast2-2.22.2/library/network/src/NetworkInterfaces.ycp
--- old/yast2-2.21.25/library/network/src/NetworkInterfaces.ycp 2011-11-01 13:17:21.000000000 +0100
+++ new/yast2-2.22.2/library/network/src/NetworkInterfaces.ycp 2012-01-06 16:00:22.000000000 +0100
@@ -750,9 +750,6 @@
});
Deleted = [];
- /* Devices with chmod=0600 */
- list<string> chmod = [];
-
/* write all devices */
maplist(string typ, map > devsmap, (map > >) Devs, {
maplist(string config, map devmap, devsmap, {
@@ -762,19 +759,21 @@
string p = ".network.value.\"" + config + "\".";
- if (size(devmap["IPADDR"]:"")>0 && size(devmap["NETMASK"]:"")>0){
- devmap["IPADDR"] = sformat("%1/%2", devmap["IPADDR"]:"", Netmask::ToBits(devmap["NETMASK"]:""));
- devmap=remove(devmap, "NETMASK");
- //TODO : delete NETMASK from config file
- } else {
- if (size(devmap["IPADDR"]:"")>0 && size(devmap["PREFIXLEN"]:"")>0){
- devmap["IPADDR"] = sformat("%1/%2", devmap["IPADDR"]:"", devmap["PREFIXLEN"]:"");
- devmap=remove(devmap, "PREFIXLEN");
- //TODO : delete PREFIXLEN from config file
- }
+ if (size(devmap["IPADDR"]:"")>0 && find(devmap["IPADDR"]:"","/") == -1)
+ {
+ if (size(devmap["IPADDR"]:"")>0 && size(devmap["NETMASK"]:"")>0){
+ devmap["IPADDR"] = sformat("%1/%2", devmap["IPADDR"]:"", Netmask::ToBits(devmap["NETMASK"]:""));
+ devmap=remove(devmap, "NETMASK");
+ //TODO : delete NETMASK from config file
+ } else {
+ if (size(devmap["IPADDR"]:"")>0 && size(devmap["PREFIXLEN"]:"")>0){
+ devmap["IPADDR"] = sformat("%1/%2", devmap["IPADDR"]:"", devmap["PREFIXLEN"]:"");
+ devmap=remove(devmap, "PREFIXLEN");
+ //TODO : delete PREFIXLEN from config file
+ }
+ }
}
-
/* write all keys to config */
maplist(string k, (list<string>) Map::Keys(devmap), {
/* Write aliases */
@@ -826,10 +825,9 @@
boolean has_key = find (string k, SensitiveFields,
``( devmap[k]:"" != "" )) != nil;
string file = "/etc/sysconfig/network/ifcfg-" + config;
- y2debug("Permission change: %1, %2", has_key, file);
if(has_key) {
- y2debug("CHANGED");
- chmod = add(chmod, file);
+ y2debug("Permission change: %1", config);
+ SCR::Write(add(.network.section_private, config), true);
}
if (OriginalDevices == nil) {
@@ -845,13 +843,6 @@
/* Finish him */
SCR::Write(.network, nil);
- /* CHMOD */
- y2debug("chmod=%1", chmod);
- maplist(string file, chmod, {
- y2debug("changing: %1", file);
- SCR::Execute(.target.bash, "/bin/chmod 0600 " + file);
- });
-
return true;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.25/library/network/src/NetworkStorage.ycp new/yast2-2.22.2/library/network/src/NetworkStorage.ycp
--- old/yast2-2.21.25/library/network/src/NetworkStorage.ycp 2011-11-01 13:17:21.000000000 +0100
+++ new/yast2-2.22.2/library/network/src/NetworkStorage.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,156 +0,0 @@
-/**
- * File: modules/NetworkStorage.ycp
- * Package: Network configuration
- * Summary: Networked disks
- * Authors: Martin Vidner
- *
- * $Id: NetworkStorage.ycp 38154 2007-05-28 08:20:39Z mzugec $
- *
- * #176804 - Root on iSCSI installation fails
- */
-
-{
-
-module "NetworkStorage";
-
-import "FileUtils";
-
-/**
- * Ask /proc/mounts what device a mount point is using.
- * @return e.g. /dev/sda2 (or just "nfs")
- */
-global string getDevice(string mount_point) {
- string cmd = sformat("grep ' %1 ' /proc/mounts|grep -v rootfs|tr -d '\n'", mount_point);
- map out = (map)SCR::Execute(.target.bash_output, cmd);
- y2milestone("mountpoint found %1", out);
- list<string> fields = splitstring(out["stdout"]:"", " ");
- string vfstype = fields[2]:"";
- string device = (vfstype == "nfs" || vfstype == "nfs4")? "nfs": fields[0]:"";
- y2milestone("%1 is on device: %2", mount_point, device);
- return device;
-}
-
-/**
- * If the disk is on a networked device (NFS, ISCSI),
- * the main NIC needs STARTMODE nfsroot instead of auto.
- * @return root dev over network: 1 iSCSI, 2 NFS
- */
-global integer isDiskOnNetwork(string device) {
- y2milestone("begin isDiskOnNetwork(%1) function", device);
- if (device=="nfs") {
- return 2;
- }
- if (size(device)==0) {
- y2error("Empty parameter for isDiskOnNetwork() function");
- return -1;
- }
- integer network_based=0;
-
- // test for multipath
- if (network_based==0 && issubstring(device, "/dev/dm-")) {
- y2warning("multipath detected!");
- string dev_name = splitstring(device, "/")[2]:"";
- y2milestone("Multipath device name %1", dev_name);
- map cmd = (map)SCR::Execute(.target.bash_output, sformat("ls /sys/block/%1/slaves/", dev_name));
- y2milestone("Show slaves command:%1", cmd);
- if (cmd["exit"]:-1==0){
- // FIXME: what about more slaves?
- list<string> slaves = splitstring(cmd["stdout"]:"", "\n");
- integer nb = isDiskOnNetwork(sformat("/dev/%1", slaves[0]:""));
- if (nb > 0) {
- network_based = nb;
- }
- }
- else {
- y2error("Error while executed show slaves commad:%1", cmd["stderr"]:"");
- }
- }
-
- // test for LVM
- if (network_based==0 && issubstring(device, "/dev/mapper/")) {
- y2warning("LVM detected!");
- string group_name = splitstring(splitstring(device, "/")[3]:"", "-")[0]:"";
- y2milestone("LVM group name %1", group_name);
- map command = (map)SCR::Execute(.target.bash_output, sformat("pvs 2>/dev/null|grep %1", group_name));
- foreach(string row, filter(string s, splitstring(command["stdout"]:"", "\n"), { return (size(s) > 0);}), {
- string lvm_device = filter(string s, splitstring(row, " "), { return (size(s)>0);})[0]:"";
- y2milestone("LVM physical device: %1", lvm_device);
- integer nb = isDiskOnNetwork(lvm_device);
- if (nb > 0) {
- network_based = nb;
- }
- });
- }
-
- // test for RAID
- if (network_based==0 && issubstring(device, "/dev/md")){
- y2warning("RAID detected!");
- string raid = splitstring(device, "/")[2]:"";
- y2milestone("RAID %1 detected", raid);
- map command = (map)SCR::Execute(.target.bash_output, sformat("cat /proc/mdstat |grep %1|tr -d '\\n'", raid));
- list<string> raid_devices = sublist(splitstring(command["stdout"]:"", " "), 4);
- foreach(string dev, raid_devices, {
- if (!issubstring(dev, "/dev/")) {
- dev = sformat("/dev/%1", dev);
- }
- string raid_device = substring(dev, 0, findfirstof(dev, "["));
- integer nb = isDiskOnNetwork(raid_device);
- if (nb > 0) {
- network_based = nb;
- }
- });
- }
-
- //test for iSCSI
- if (network_based==0){
- if (issubstring(device, "/dev/")){
- device = splitstring(device, "/")[2]:"";
- }
- string sys=sformat("/sys/class/block/%1", device);
- if (FileUtils::Exists(sys)){
- if ((integer)SCR::Execute(.target.bash, sformat("ls -la %1 | grep -q session", sys))==0){
- y2warning("iSCSI detected!");
- network_based = 1;
- }
- }
- }
-
- //test for FCoE
- if (network_based==0){
- if (issubstring(device, "/dev/")){
- device = splitstring(device, "/")[2]:"";
- }
-
- string sys=sformat("/sys/class/block/%1/device", device);
- if (FileUtils::Exists(sys) && FileUtils::IsDirectory(sys)){
- if ((integer)SCR::Execute(.target.bash, sformat("cd %1; pwd -P | grep -q target", sys))==0){
- y2warning("FCoE detected!");
- network_based = 3;
- }
- }
- }
-
- // test for nfs (bnc#384420)
- if (network_based==0) {
- string space="[[:space:]]";
- if (SCR::Execute(.target.bash, sformat("grep '%1%2%3*nfs%4' /proc/mounts ", space, device, space, space))==0){
- y2milestone("device %1 is network based : %2", device, network_based);
- network_based = 2;
- }
- }
- return network_based;
-}
-
-global list<string> getiBFTDevices() {
- if (SCR::Execute(.target.bash, "ls /sys/firmware/ibft")==0){
- map output = (map)SCR::Execute(.target.bash_output, "ls /sys/firmware/ibft/ethernet*/device/net/");
- list<string> ifaces = filter(string row, splitstring(output["stdout"]:"", "\n"), { return (size(row)>0);});
- return ifaces;
- }
- else {
- return [];
- }
-}
-
-/* EOF */
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.25/library/network/testsuite/tests/NetworkStorage.out new/yast2-2.22.2/library/network/testsuite/tests/NetworkStorage.out
--- old/yast2-2.21.25/library/network/testsuite/tests/NetworkStorage.out 2011-11-01 13:17:22.000000000 +0100
+++ new/yast2-2.22.2/library/network/testsuite/tests/NetworkStorage.out 1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-Read .target.tmpdir "/tmp"
-Execute .target.bash_output "grep ' / ' /proc/mounts|grep -v rootfs|tr -d '\n'" $["exit":0, "stderr":"", "stdout":"/dev/sda2 / ext3 rw,relatime,errors=continue,user_xattr,acl,commit=15,barrier=1,data=ordered 0 0"]
-Return PASS
-Execute .target.bash_output "grep ' /home ' /proc/mounts|grep -v rootfs|tr -d '\n'" $["exit":0, "stderr":"", "stdout":"nfs.example.com:/home/ /home nfs4 rw,relatime,vers=4,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=krb5i,clientaddr=10.0.2.2,minorversion=0,local_lock=none,addr=10.0.0.1 0 0"]
-Return PASS
-Read .target.stat "/sys/class/block/fc0" $["isdir":true]
-Execute .target.bash "ls -la /sys/class/block/fc0 | grep -q session" 1
-Read .target.stat "/sys/class/block/fc0/device" $["isdir":true]
-Read .target.stat "/sys/class/block/fc0/device" $["isdir":true]
-Execute .target.bash "cd /sys/class/block/fc0/device; pwd -P | grep -q target" 0
-Log FCoE detected!
-Return PASS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.25/library/network/testsuite/tests/NetworkStorage.ycp new/yast2-2.22.2/library/network/testsuite/tests/NetworkStorage.ycp
--- old/yast2-2.21.25/library/network/testsuite/tests/NetworkStorage.ycp 2011-11-01 13:17:22.000000000 +0100
+++ new/yast2-2.22.2/library/network/testsuite/tests/NetworkStorage.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,144 +0,0 @@
-//
-{
-
-include "testsuite.ycp";
-
-// FIXME: factor out as Assert::Equal(...);
-string AssertEqual(any expected, any actual, string fail_message) {
- if (expected == actual) {
- return "PASS";
- }
- else {
- if (fail_message == nil || fail_message == "") {
- fail_message = sformat ("assertion failure, expected '%1', got '%2'", expected, actual);
- }
- y2error ("%1", fail_message);
- return "FAIL";
- }
-}
-
-/* TODO
-void Mock(map & dummy, path where, any what) {
-...
-}
-Mock (EXECUTE, .target.bash_output, $["stdout": "O HAI!", ...]);
-*/
-map MockBash(string stdout) {
- return $[
- "target" : $[
- "bash_output" : $[
- "exit" : 0,
- "stdout" : stdout,
- "stderr" : "",
- ],
- ],
- ];
-}
-
-map MockExit(integer exit) {
- return $[
- "target" : $[
- "bash" : exit
- ],
- ];
-}
-
-map MockDir =
- $[
- "target" : $[
- "stat" : $[
- "isdir": true,
- ]
- ],
- ];
-
-map MockFileMissing =
- $[
- "target" : $[
- "stat" : $[]
- ],
- ];
-
-map Add(map a, map b) {
- map c = a;
- foreach(any k, any v, b, {
- if (is(v, map) && haskey(c, k) && is(c[k]:nil, map)) {
- v = Add ((map) v, c[k]:$[]);
- }
- c[k] = v;
- });
- return c;
-}
-
-map Adder(list<map> many) {
- map result = $[];
- foreach(map one, many, {
- result = Add (result, one);
- });
- return result;
-}
-
-map READ = $[
- "target" : $[
- "tmpdir" : "/tmp",
- ]
-];
-TESTSUITE_INIT([READ], nil);
-
-import "NetworkStorage";
-
-map WRITE = $[];
-map EXECUTE = $[];
-
-EXECUTE = MockBash ("/dev/sda2 / ext3 rw,relatime,errors=continue,user_xattr,acl,commit=15,barrier=1,data=ordered 0 0");
-TEST(``(
- AssertEqual("/dev/sda2", NetworkStorage::getDevice("/"), "")
- ), [READ, WRITE, EXECUTE], nil);
-
-EXECUTE = MockBash ("nfs.example.com:/home/ /home nfs4 rw,relatime,vers=4,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=krb5i,clientaddr=10.0.2.2,minorversion=0,local_lock=none,addr=10.0.0.1 0 0");
-TEST(``(
- AssertEqual("nfs", NetworkStorage::getDevice("/home"), "")
- ), [READ, WRITE, EXECUTE], nil);
-
- READ = MockFileMissing;
-
-/*
-FIXME polish it to really test it
-
-// pvs | grep foo
-// FIXME I have no idea how the actual output looks like
-EXECUTE = Adder([
- MockBash ("sda1 etc\nsda2 etc\n"),
- MockExit (1),
- ]);
-TEST(``(
- AssertEqual(7, NetworkStorage::isDiskOnNetwork("/dev/mapper/foo-bar"), "")
- ), [READ, WRITE, EXECUTE], nil);
-
-EXECUTE = Adder([
- MockBash ("A B C D E[i] F[j]"),
- MockExit (1),
- ]);
-TEST(``(
- AssertEqual(7, NetworkStorage::isDiskOnNetwork("/dev/md9"), "")
- ), [READ, WRITE, EXECUTE], nil);
-
-TEST(``(
- AssertEqual(7, NetworkStorage::isDiskOnNetwork("server:/export"), "")
- ), [READ, WRITE, EXECUTE], nil);
-
-TEST(``(
- AssertEqual(7, NetworkStorage::isDiskOnNetwork("server-v4:/"), "")
- ), [READ, WRITE, EXECUTE], nil);
-*/
-
-READ = MockDir;
-list EXECUTE2 = [
- MockExit (1), //grep session
- MockExit (0) //grep target
-];
-TEST(``(
- AssertEqual(3, NetworkStorage::isDiskOnNetwork("/dev/fc0"), "")
- ), [READ, WRITE, EXECUTE2], nil);
-
-}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org