From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17764 invoked by alias); 29 Apr 2016 17:29:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 17748 invoked by uid 89); 29 Apr 2016 17:29:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=qiyaoltc@gmail.com, qiyaoltcgmailcom X-HELO: mail-io0-f172.google.com Received: from mail-io0-f172.google.com (HELO mail-io0-f172.google.com) (209.85.223.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 29 Apr 2016 17:29:25 +0000 Received: by mail-io0-f172.google.com with SMTP id f89so114198310ioi.0 for ; Fri, 29 Apr 2016 10:29:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dnERFCK0PCASB+eyxfjRmxw0EHOlGa2LsL0e94zEPRk=; b=dsggdGs1t37O9v1JpFMFrpTRqQRVHaSHFRKtfzfQzHzf1h3JEOY7nZiVfYh3wfnHry M9e2UCOFgEKnvH9JZ7p1xELP/awBNJbx1c2W6tiMkE+Z2cSnOqExsnt8qbpG+Fnm81Ie YcSUw5kxQHGI8IgS6TYfcmEeJTIJEOCOv029svI5Dd068YMOL06mj5PEYsIhEOTo09xN S3l6MfzNHCchKB60hria8dZGEqRXSDYHBVKxnTcztCknoJ67INZrM6mI/c8wEe7QSG0o usZm2tEVVOWsBDUU2oWlgeSjn7pVaqHuKrBgAN6yeB8YQr1rLlC35VhyFU4k6IlhyH2W K+0A== X-Gm-Message-State: AOPr4FUpoJytMElZzPRfN4L8BJSc1okmnVJAwSuKCNajrB7wD5mxAKYSmg4RY8D6qMZvAJoZRteLHWwrnmGK25fh X-Received: by 10.107.35.3 with SMTP id j3mr29352606ioj.119.1461950963185; Fri, 29 Apr 2016 10:29:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.136.75 with HTTP; Fri, 29 Apr 2016 10:28:43 -0700 (PDT) In-Reply-To: <868tzwe8n7.fsf@gmail.com> References: <1461789279-15996-1-git-send-email-tom@tromey.com> <1461789279-15996-4-git-send-email-tom@tromey.com> <86wpnido3w.fsf@gmail.com> <877ffgbg8h.fsf@tromey.com> <868tzwe8n7.fsf@gmail.com> From: Doug Evans Date: Fri, 29 Apr 2016 17:29:00 -0000 Message-ID: Subject: Re: [PATCH v2 3/8] Add self-test framework to gdb To: Yao Qi Cc: Tom Tromey , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00659.txt.bz2 On Fri, Apr 29, 2016 at 8:29 AM, Yao Qi wrote: > Tom Tromey writes: > >> It would also be possible to use exceptions rather than asserts. >> Then the current single command could be kept, since gdb wouldn't abort >> on failure. >> >> Let me know which you'd prefer. > > Using exceptions is fine to me. On a separate note, where do we, in the long term, want tests to live? I'm wondering about the scalability of having tests in the same source file reducing the readability, and whether we want conventions to avoid this. I'm not saying 100% of tests have to, say, live in separate files (e.g. foo.c tests -> foo-test.c or some such). I'm just paranoid about having a repeat of the massive readability reduction from the adding of record support to *-tdep.c files. [Imagine how the sources will look 5 years from now.]