1. 30 3月, 2016 1 次提交
  2. 23 3月, 2016 1 次提交
    • A
      qemu-log: new option -dfilter to limit output · 3514552e
      Alex Bennée 提交于
      When debugging big programs or system emulation sometimes you want both
      the verbosity of cpu,exec et all but don't want to generate lots of logs
      for unneeded stuff. This patch adds a new option -dfilter which allows
      you to specify interesting address ranges in the form:
      
        -dfilter 0x8000..0x8fff,0xffffffc000080000+0x200,...
      
      Then logging code can use the new qemu_log_in_addr_range() function to
      decide if it will output logging information for the given range.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <1458052224-9316-7-git-send-email-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3514552e
  3. 22 3月, 2016 1 次提交
  4. 17 3月, 2016 5 次提交
  5. 05 3月, 2016 1 次提交
  6. 19 2月, 2016 1 次提交
    • E
      qapi: Forbid 'any' inside an alternate · 46534309
      Eric Blake 提交于
      The whole point of an alternate is to allow some type-safety while
      still accepting more than one JSON type.  Meanwhile, the 'any'
      type exists to bypass type-safety altogether.  The two are
      incompatible: you can't accept every type, and still tell which
      branch of the alternate to use for the parse; fix this to give a
      sane error instead of a Python stack trace.
      
      Note that other types that can't be alternate members are caught
      earlier, by check_type().
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1455778109-6278-4-git-send-email-eblake@redhat.com>
      [Commit message tweaked]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      46534309
  7. 17 2月, 2016 1 次提交
    • D
      nbd: convert block client to use I/O channels for connection setup · 064097d9
      Daniel P. Berrange 提交于
      This converts the NBD block driver client to use the QIOChannelSocket
      class for initial connection setup. The NbdClientSession struct has
      two pointers, one to the master QIOChannelSocket providing the raw
      data channel, and one to a QIOChannel which is the current channel
      used for I/O. Initially the two point to the same object, but when
      TLS support is added, they will point to different objects.
      
      The qemu-img & qemu-io tools now need to use MODULE_INIT_QOM to
      ensure the QIOChannel object classes are registered. The qemu-nbd
      tool already did this.
      
      In this initial conversion though, all I/O is still actually done
      using the raw POSIX sockets APIs.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1455129674-17255-4-git-send-email-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      064097d9
  8. 16 2月, 2016 1 次提交
  9. 26 1月, 2016 1 次提交
  10. 23 12月, 2015 1 次提交
  11. 19 12月, 2015 2 次提交
    • D
      crypto: add QCryptoSecret object class for password/key handling · ac1d8878
      Daniel P. Berrange 提交于
      Introduce a new QCryptoSecret object class which will be used
      for providing passwords and keys to other objects which need
      sensitive credentials.
      
      The new object can provide secret values directly as properties,
      or indirectly via a file. The latter includes support for file
      descriptor passing syntax on UNIX platforms. Ordinarily passing
      secret values directly as properties is insecure, since they
      are visible in process listings, or in log files showing the
      CLI args / QMP commands. It is possible to use AES-256-CBC to
      encrypt the secret values though, in which case all that is
      visible is the ciphertext.  For ad hoc developer testing though,
      it is fine to provide the secrets directly without encryption
      so this is not explicitly forbidden.
      
      The anticipated scenario is that libvirtd will create a random
      master key per QEMU instance (eg /var/run/libvirt/qemu/$VMNAME.key)
      and will use that key to encrypt all passwords it provides to
      QEMU via '-object secret,....'.  This avoids the need for libvirt
      (or other mgmt apps) to worry about file descriptor passing.
      
      It also makes life easier for people who are scripting the
      management of QEMU, for whom FD passing is significantly more
      complex.
      
      Providing data inline (insecure, only for ad hoc dev testing)
      
        $QEMU -object secret,id=sec0,data=letmein
      
      Providing data indirectly in raw format
      
        printf "letmein" > mypasswd.txt
        $QEMU -object secret,id=sec0,file=mypasswd.txt
      
      Providing data indirectly in base64 format
      
        $QEMU -object secret,id=sec0,file=mykey.b64,format=base64
      
      Providing data with encryption
      
        $QEMU -object secret,id=master0,file=mykey.b64,format=base64 \
              -object secret,id=sec0,data=[base64 ciphertext],\
      	           keyid=master0,iv=[base64 IV],format=base64
      
      Note that 'format' here refers to the format of the ciphertext
      data. The decrypted data must always be in raw byte format.
      
      More examples are shown in the updated docs.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ac1d8878
    • D
      util: add base64 decoding function · 89bc0b6c
      Daniel P. Berrange 提交于
      The standard glib provided g_base64_decode doesn't provide any
      kind of sensible error checking on its input. Add a QEMU custom
      wrapper qbase64_decode which can be used with untrustworthy
      input that can contain invalid base64 characters, embedded
      NUL characters, or not be NUL terminated at all.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      89bc0b6c
  12. 18 12月, 2015 6 次提交
    • D
      io: add QIOChannelBuffer class · d98e4eb7
      Daniel P. Berrange 提交于
      Add a QIOChannel subclass that is capable of performing I/O
      to/from a memory buffer. This implementation does not attempt
      to support concurrent readers & writers. It is designed for
      serialized access where by a single thread at a time may write
      data, seek and then read data back out.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d98e4eb7
    • D
      io: add QIOChannelCommand class · 195e14d0
      Daniel P. Berrange 提交于
      Add a QIOChannel subclass that is capable of performing I/O
      to/from a separate process, via a pair of pipes. The command
      can be used for unidirectional or bi-directional I/O.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      195e14d0
    • D
      io: add QIOChannelTLS class · ed8ee42c
      Daniel P. Berrange 提交于
      Add a QIOChannel subclass that can run the TLS protocol over
      the top of another QIOChannel instance. The object provides a
      simplified API to perform the handshake when starting the TLS
      session. The layering of TLS over the underlying channel does
      not have to be setup immediately. It is possible to take an
      existing QIOChannel that has done some handshake and then swap
      in the QIOChannelTLS layer. This allows for use with protocols
      which start TLS right away, and those which start plain text
      and then negotiate TLS.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ed8ee42c
    • D
      io: add QIOChannelFile class · d6e48869
      Daniel P. Berrange 提交于
      Add a QIOChannel subclass that is capable of operating on things
      that are files, such as plain files, pipes, character/block
      devices, but notably not sockets.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d6e48869
    • D
      io: add QIOChannelSocket class · 559607ea
      Daniel P. Berrange 提交于
      Implement a QIOChannel subclass that supports sockets I/O.
      The implementation is able to manage a single socket file
      descriptor, whether a TCP/UNIX listener, TCP/UNIX connection,
      or a UDP datagram. It provides APIs which can listen and
      connect either asynchronously or synchronously. Since there
      is no asynchronous DNS lookup API available, it uses the
      QIOTask helper for spawning a background thread to ensure
      non-blocking operation.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      559607ea
    • D
      io: add QIOTask class for async operations · b02db2d9
      Daniel P. Berrange 提交于
      A number of I/O operations need to be performed asynchronously
      to avoid blocking the main loop. The caller of such APIs need
      to provide a callback to be invoked on completion/error and
      need access to the error, if any. The small QIOTask provides
      a simple framework for dealing with such probes. The API
      docs inline provide an outline of how this is to be used.
      
      Some functions don't have the ability to run asynchronously
      (eg getaddrinfo always blocks), so to facilitate their use,
      the task class provides a mechanism to run a blocking
      function in a thread, while triggering the completion
      callback in the main event loop thread. This easily allows
      any synchronous function to be made asynchronous, albeit
      at the cost of spawning a thread.
      
      In this series, the QIOTask class will be used for things like
      the TLS handshake, the websockets handshake and TCP connect()
      progress.
      
      The concept of QIOTask is inspired by the GAsyncResult
      interface / GTask class in the GIO libraries. The min
      version requirements on glib don't allow those to be
      used from QEMU, so QIOTask provides a facsimilie which
      can be easily switched to GTask in the future if the
      min version is increased.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b02db2d9
  13. 17 12月, 2015 6 次提交
    • E
      qapi: Detect base class loops · bac5429c
      Eric Blake 提交于
      It should be fairly obvious that qapi base classes need to
      form an acyclic graph, since QMP cannot specify the same
      key more than once, while base classes are included as flat
      members alongside other members added by the child.  But the
      old check_member_clash() parser function was not prepared to
      check for this, and entered an infinite recursion (at least
      until Python gives up, complaining about nesting too deep).
      
      Now that check_member_clash() has been recently removed,
      attempts at self-inheritance trigger an assertion failure
      introduced by commit ac88219a.  The obvious fix is to turn
      the assertion into a conditional.
      
      This patch includes both the tests (base-cycle-direct and
      base-cycle-indirect) and the fix, since the .err file output
      for the unfixed case is not useful (particularly when it was
      warning about unbounded recursion, as that limit may be
      platform-specific).
      
      We don't need to worry about cycles in flat unions (neither
      the base type nor the type of a variant can be a union) nor
      in alternates (alternate branches cannot themselves be an
      alternate).  But if we later allow a union type as a variant,
      we will still be okay, as QAPISchemaObjectTypeVariants.check()
      triggers the same QAPISchemaObjectType.check() that will
      detect any loops.
      
      Likewise, we need not worry about the case of diamond
      inheritance where the same class is used for a flat union base
      class and one of its variants; either both uses will introduce
      a collision in trying to insert the same member name twice, or
      the shared type is empty and changes nothing.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1449033659-25497-16-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      bac5429c
    • E
      qapi: Move duplicate collision checks to schema check() · 01cfbaa4
      Eric Blake 提交于
      With the recent commit 'qapi: Detect collisions in C member
      names', we have two different locations for detecting clashes -
      one at parse time, and another at QAPISchema*.check() time.
      Remove all of the ad hoc parser checks, and delete associated
      code (for example, the global check_member_clash() method is
      no longer needed).
      
      Testing this showed that the test union-bad-branch wasn't adding
      much: union-clash-branches also exposes the error message when
      branches collide, and we've recently fixed things to avoid an
      implicit collision with max.  Likewise, the error for
      enum-clash-member changes to report our new detection of
      upper case in a value name, unless we modify the test to use
      all lower case.
      
      The wording of several error messages has changed, but the
      change is generally an improvement rather than a regression.
      
      No change to generated code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1449033659-25497-15-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      01cfbaa4
    • E
      qapi: Enforce (or whitelist) case conventions on qapi members · 893e1f2c
      Eric Blake 提交于
      We document that members of enums and objects should be
      'lower-case', although we were not enforcing it.  We have to
      whitelist a few pre-existing entities that violate the norms.
      Add three new tests to expose the new error message, each of
      which first uses the whitelisted name 'UuidInfo' to prove the
      whitelist works, then triggers the failure (this is the same
      pattern used in the existing returns-whitelist.json test).
      
      Note that by adding this check, we have effectively forbidden
      an entity with a case-insensitive clash of member names, for
      any entity that is not on the whitelist (although there is
      still the possibility to clash via '-' vs. '_').
      
      Not done here: a future patch should also add naming convention
      support and whitelist exceptions for command, event, and type
      names.
      
      The additions to QAPISchemaMember.check_clash() check whether
      info['name'] is in the whitelist (the top-most entity name at
      the point 'info' tracks), rather than self.owner (the type,
      possibly implicit, that directly owns the member), because it
      is easier to maintain the whitelist by the names actually in
      the user's .json file, rather than worrying about the names
      of implicit types.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1449033659-25497-14-git-send-email-eblake@redhat.com>
      [Simplified a bit as per discussion with Eric]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      893e1f2c
    • E
      qapi: Remove obsolete tests for MAX collision · 04e0639d
      Eric Blake 提交于
      Now that we no longer collide with an implicit _MAX enum member,
      we no longer need to reject it in the ad hoc parser, and can
      remove several tests that are no longer needed.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-24-git-send-email-eblake@redhat.com>
      [Commit message tweaked]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      04e0639d
    • E
      qapi: Tighten the regex on valid names · 59a92fee
      Eric Blake 提交于
      We already documented that qapi names should match specific
      patterns (such as starting with a letter unless it was an enum
      value or a downstream extension).  Tighten that from a suggestion
      into a hard requirement, which frees up names beginning with a
      single underscore for qapi internal usage.
      
      The tighter regex doesn't forbid everything insane that a user
      could provide (for example, a user could name a type 'Foo-lookup'
      to collide with the generated 'Foo_lookup[]' for an enum 'Foo'),
      but does a good job at protecting the most obvious uses, and
      also happens to reserve single leading underscore for later use.
      
      The handling of enum values starting with a digit is tricky:
      commit 9fb081e0 introduced a subtle bug by using c_name() on
      a munged value, which would allow an enum to include the
      member 'q-int' in spite of our reservation.  Furthermore,
      munging with a leading '_' would fail our tighter regex.  So
      fix it by only munging for leading digits (which are never
      ticklish in c_name()) and by using a different prefix (I
      picked 'D', although any letter should do).
      
      Add new tests, reserved-member-underscore and reserved-enum-q,
      to demonstrate the tighter checking.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-22-git-send-email-eblake@redhat.com>
      Message-Id: <1447883135-18020-1-git-send-email-eblake@redhat.com>
      [Eric's fixup squashed in]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      59a92fee
    • E
      qapi: Remove outdated tests related to QMP/branch collisions · 61a94661
      Eric Blake 提交于
      Now that branches are in a separate C namespace, we can remove
      the restrictions in the parser that claim a branch name would
      collide with QMP, and delete the negative tests that are no
      longer problematic.  A separate patch can then add positive
      tests to qapi-schema-test to test that any corner cases will
      compile correctly.
      
      This reverts the scripts/qapi.py portion of commit 7b2a5c2f,
      now that the assertions that it plugged are no longer possible.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-15-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      61a94661
  14. 04 12月, 2015 1 次提交
  15. 25 11月, 2015 1 次提交
  16. 19 11月, 2015 1 次提交
  17. 12 11月, 2015 2 次提交
  18. 02 11月, 2015 3 次提交
    • E
      qapi: Reserve 'u' member name · 5e59baf9
      Eric Blake 提交于
      Now that we have separated union tag values from colliding with
      non-variant C names, by naming the union 'u', we should reserve
      this name for our use.  Note that we want to forbid 'u' even in
      a struct with no variants, because it is possible for a future
      qemu release to extend QMP in a backwards-compatible manner while
      converting from a struct to a flat union.  Fortunately, no
      existing clients were using this member name.  If we ever find
      the need for QMP to have a member 'u', we could at that time
      relax things, perhaps by having c_name() munge the QMP member to
      'q_u'.
      
      Note that we cannot forbid 'u' everywhere (by adding the
      rejection code to check_name()), because the existing QKeyCode
      enum already uses it; therefore we only reserve it as a struct
      type member name.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1445898903-12082-24-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      5e59baf9
    • E
      qapi: Unbox base members · ddf21908
      Eric Blake 提交于
      Rather than storing a base class as a pointer to a box, just
      store the fields of that base class in the same order, so that
      a child struct can be directly cast to its parent.  This gives
      less malloc overhead, less pointer dereferencing, and even less
      generated code.  Compare to the earlier commit 1e6c1616 "qapi:
      Generate a nicer struct for flat unions" (although that patch
      had fewer places to change, as less of qemu was directly using
      qapi structs for flat unions).  It also allows us to turn on
      automatic type-safe wrappers for upcasting to the base class
      of a struct.
      
      Changes to the generated code look like this in qapi-types.h:
      
      | struct SpiceChannel {
      |-    SpiceBasicInfo *base;
      |+    /* Members inherited from SpiceBasicInfo: */
      |+    char *host;
      |+    char *port;
      |+    NetworkAddressFamily family;
      |+    /* Own members: */
      |     int64_t connection_id;
      
      as well as additional upcast functions like qapi_SpiceChannel_base().
      Meanwhile, changes to qapi-visit.c look like:
      
      | static void visit_type_SpiceChannel_fields(Visitor *v, SpiceChannel **obj, Error **errp)
      | {
      |     Error *err = NULL;
      |
      |-    visit_type_implicit_SpiceBasicInfo(v, &(*obj)->base, &err);
      |+    visit_type_SpiceBasicInfo_fields(v, (SpiceBasicInfo **)obj, &err);
      |     if (err) {
      
      (the cast is necessary, since our upcast wrappers only deal with a
      single pointer, not pointer-to-pointer); plus the wholesale
      elimination of some now-unused visit_type_implicit_FOO() functions.
      
      Without boxing, the corner case of one empty struct having
      another empty struct as its base type now requires inserting a
      dummy member (previously, the 'Base *base' member sufficed).
      
      And now that we no longer consume a 'base' member in the generated
      C struct, we can delete the former negative struct-base-clash-base
      test.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1445898903-12082-11-git-send-email-eblake@redhat.com>
      [Commit message tweaked slightly]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      ddf21908
    • E
      tests/qapi-schema: Test for reserved names, empty struct · 19767083
      Eric Blake 提交于
      Add some testsuite coverage to ensure future patches are on
      the right track:
      
      Our current C representation of qapi arrays is done by appending
      'List' to the element name; but we are not preventing the
      creation of an object type with the same name.  Add
      reserved-type-list.json to test this.  Then rename
      enum-union-clash.json to reserved-type-kind.json to cover the
      reservation that we DO detect, and shorten it to match the fact
      that the name is reserved even if there is no clash.
      
      We are failing to detect a collision between a dictionary member
      and the implicit 'has_*' flag for another optional member. The
      easiest fix would be for a future patch to reserve the entire
      "has[-_]" namespace for member names (the collision is also
      possible for branch names within flat unions, but only as long as
      branch names can collide with (non-variant) members; however,
      since future patches are about to remove that, it is not worth
      testing here). Add reserved-member-has.json to test this.
      
      A similar collision exists between a dictionary member where
      c_name() munges what might otherwise be a reserved name to start
      with 'q_', and another member explicitly starts with "q[-_]".
      Again, the easiest solution for a future patch will be reserving
      the entire namespace, but here for commands as well as members.
      Add reserved-member-q.json and reserved-command-q.json to test
      this; separate tests since arguably our munging of command 'unix'
      to 'qmp_q_unix()' could be done without a q_, which is different
      than the munging of a member 'unix' to 'foo.q_unix'.
      
      Finally, our testsuite does not have any compilation coverage
      of struct inheritance with empty qapi structs.  Update
      qapi-schema-test.json to test this.
      
      Note that there is currently no technical reason to forbid type
      name patterns from member names, or member name patterns from
      types, since the two are not in the same namespace in C and
      won't collide; but it's not worth adding positive tests of these
      corner cases at this time, especially while there is other churn
      pending in patches that rearrange which collisions actually
      happen.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1445898903-12082-2-git-send-email-eblake@redhat.com>
      [Commit message tweaked slightly]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      19767083
  19. 29 10月, 2015 1 次提交
    • V
      tests/vhost-user-bridge: add vhost-user bridge application · 3595e2eb
      Victor Kaplansky 提交于
      The test existing in QEMU for vhost-user feature is good for
      testing the management protocol, but does not allow actual
      traffic. This patch proposes Vhost-User Bridge application, which
      can serve the QEMU community as a comprehensive test by running
      real internet traffic by means of vhost-user interface.
      
      Essentially the Vhost-User Bridge is a very basic vhost-user
      backend for QEMU. It runs as a standalone user-level process.
      For packet processing Vhost-User Bridge uses an additional QEMU
      instance with a backend configured by "-net socket" as a shared
      VLAN.  This way another QEMU virtual machine can effectively
      serve as a shared bus by means of UDP communication.
      
      For a more simple setup, the another QEMU instance running the
      SLiRP backend can be the same QEMU instance running vhost-user
      client.
      
      This Vhost-User Bridge implementation is very preliminary.  It is
      missing many features. I has been studying vhost-user protocol
      internals, so I've written vhost-user-bridge bit by bit as I
      progressed through the protocol.  Most probably its internal
      architecture will change significantly.
      
      To run Vhost-User Bridge application:
      
      1. Build vhost-user-bridge with a regular procedure. This will
      create a vhost-user-bridge executable under tests directory:
      
          $ configure; make tests/vhost-user-bridge
      
      2. Ensure the machine has hugepages enabled in kernel with
      command line like:
      
          default_hugepagesz=2M hugepagesz=2M hugepages=2048
      
      3. Run Vhost-User Bridge with:
      
          $ tests/vhost-user-bridge
      
      The above will run vhost-user server listening for connections
      on UNIX domain socket /tmp/vubr.sock, and will try to connect
      by UDP to VLAN bridge to localhost:5555, while listening on
      localhost:4444
      
      Run qemu with a virtio-net backed by vhost-user:
      
          $ qemu \
              -enable-kvm -m 512 -smp 2 \
              -object memory-backend-file,id=mem,size=512M,mem-path=/dev/hugepages,share=on \
              -numa node,memdev=mem -mem-prealloc \
              -chardev socket,id=char0,path=/tmp/vubr.sock \
              -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
              -device virtio-net-pci,netdev=mynet1 \
              -net none \
              -net socket,vlan=0,udp=localhost:4444,localaddr=localhost:5555 \
              -net user,vlan=0 \
              disk.img
      
      vhost-user-bridge was tested very lightly: it's able to bringup a
      linux on client VM with the virtio-net driver, and execute transmits
      and receives to the internet. I tested with "wget redhat.com",
      "dig redhat.com".
      
      PS. I've consulted DPDK's code for vhost-user during Vhost-User
      Bridge implementation.
      Signed-off-by: NVictor Kaplansky <victork@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      3595e2eb
  20. 26 10月, 2015 1 次提交
  21. 25 10月, 2015 1 次提交
  22. 23 10月, 2015 1 次提交
    • D
      configure: avoid polluting global CFLAGS with tasn1 flags · 90246037
      Daniel P. Berrange 提交于
      The previous commit
      
        commit 9a2fd434
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Mon Apr 13 14:01:39 2015 +0100
      
          crypto: add sanity checking of TLS x509 credentials
      
      defined new variables $TEST_LIBS and $TEST_CFLAGS and
      used them in tests/Makefile to augment $LIBS and $CFLAGS.
      
      Unfortunately this overlooks the fact that tests/Makefile
      is not executed via recursive-make, it is just pulled into
      the top level Makefile via an include statement. So rather
      than just augmenting the compiler/linker flags for tests
      it polluted the global flags.
      
      This is thought to be behind a reported failure when
      building the pixman module as a sub-module, since global
      $CFLAGS are passed down to configure in pixman.
      
      This change removes the $TEST_LIBS and $TEST_CFLAGS
      replacing them with $TASN1_LIBS and $TASN1_CFLAGS,
      setting only against specific objects/executables
      that need them.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      90246037