anchor.diff:              # assigned to testtarget2. testService3 must be assigned to both
               # machines. This test should succeed.
             
  -            my $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-maplistonattr.nix");
  -            my @distribution = split('\n', $machine->mustSucceed("cat $result"));
  -            
  -            if(@distribution[7] =~ /testtarget1/) {
  -                print "line 7 contains testtarget1!\n";
  -            } else {
  -                die "line 7 should contain testtarget1!\n";
  -            }
  -            
  -            if(@distribution[12] =~ /testtarget2/) {
  +            $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-maplistonattr.nix");
  +            @distribution = split('\n', $machine->mustSucceed("cat $result"));
  +            
  +            if($distribution[7] =~ /testtarget1/) {
  +                print "line 7 contains testtarget1!\n";
  +            } else {
  +                die "line 7 should contain testtarget1!\n";
  +            }
  +            
  +            if($distribution[12] =~ /testtarget2/) {
                   print "line 12 contains testtarget2!\n";
               } else {
                   die "line 12 should contain testtarget2!\n";
               }
             
  -            if(@distribution[17] =~ /testtarget1/) {
  +            if($distribution[17] =~ /testtarget1/) {
                   print "line 17 contains testtarget1!\n";
               } else {
                   die "line 17 should contain testtarget1!\n";
               }
               
  -            if(@distribution[18] =~ /testtarget2/) {
  +            if($distribution[18] =~ /testtarget2/) {
                   print "line 18 contains testtarget2!\n";
               } else {
                   die "line 18 should contain testtarget2!\n";
  
positive.code:             # testService3 should be assigned to testtarget2. This test should
              # succeed.
              
              my $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-mapattronattr.nix");
              my @distribution = split('\n', $machine->mustSucceed("cat $result"));
              
              if(@distribution[7] =~ /testtarget1/) {
                  print "line 7 contains testtarget1!\n";
              } else {
                  die "line 7 should contain testtarget1!\n";
              }
              
              if(@distribution[12] =~ /testtarget1/) {
                  print "line 12 contains testtarget1!\n";
              } else {
                  die "line 12 should contain testtarget1!\n";
              }
              
              if(@distribution[17] =~ /testtarget2/) {
                  print "line 17 contains testtarget2!\n";
              } else {
                  die "line 17 should contain testtarget2!\n";
  
negative.code: { nixpkgs ? <nixpkgs>
  , systems ? [ "i686-linux" "x86_64-linux" ]
  , disnixJobset ? import ../disnix/release.nix { inherit nixpkgs systems officialRelease; }
  , dydisnix ? {outPath = ./.; rev = 1234;}
  , officialRelease ? false
  }:
  
  let
    pkgs = import nixpkgs {};
    
    jobs = rec {
      tarball =
        let
          disnix = builtins.getAttr (builtins.currentSystem) (disnixJobset.build);
        in
        pkgs.releaseTools.sourceTarball {
          name = "dydisnix-tarball";
          version = builtins.readFile ./version;
          src = dydisnix;
          inherit officialRelease;
  
          buildInputs = [ pkgs.pkgconfig pkgs.getopt pkgs.libxml2 pkgs.glib disnix ]
            ++ pkgs.lib.optional (!pkgs.stdenv.isLinux) pkgs.libiconv
            ++ pkgs.lib.optional (!pkgs.stdenv.isLinux) pkgs.gettext;
        };
  
      build = pkgs.lib.genAttrs systems (system:
        let
          pkgs = import nixpkgs { inherit system; };
          
          disnix = builtins.getAttr system (disnixJobset.build);
        in
        pkgs.releaseTools.nixBuild {
          name = "dydisnix";
          src = tarball;
          
          buildInputs = [ pkgs.pkgconfig pkgs.getopt pkgs.libxml2 pkgs.glib disnix ]
            ++ pkgs.lib.optional (!pkgs.stdenv.isLinux) pkgs.libiconv
            ++ pkgs.lib.optional (!pkgs.stdenv.isLinux) pkgs.gettext;
        });
  
      tests = 
        let
          disnix = builtins.getAttr (builtins.currentSystem) (disnixJobset.build);
          dydisnix = builtins.getAttr (builtins.currentSystem) build;
          tests = ./tests;
        in
        with import "${nixpkgs}/nixos/lib/testing.nix" { system = builtins.currentSystem; };
        
        {
          install = simpleTest {
            nodes = {
              machine =
                {config, pkgs, ...}:
                
                {
                  virtualisation.writableStore = true;
                  environment.systemPackages = [
                    disnix dydisnix pkgs.stdenv
                    pkgs.busybox pkgs.paxctl pkgs.gnumake pkgs.patchelf pkgs.gcc pkgs.perlPackages.ArchiveCpio # Required to build something in the VM
                  ];
                };
            };
            testScript = ''
  