From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18174 invoked by alias); 8 Nov 2016 17:38:55 -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 18149 invoked by uid 89); 8 Nov 2016 17:38:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=checkpoint, UD:gdb.reverse, gdbreverse, gdb.reverse X-HELO: mail-qk0-f179.google.com Received: from mail-qk0-f179.google.com (HELO mail-qk0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Nov 2016 17:38:44 +0000 Received: by mail-qk0-f179.google.com with SMTP id q130so225915912qke.1 for ; Tue, 08 Nov 2016 09:38:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=X1y1b+W0Ao83lzH5KxS6jWzhKdpCFQC2JFLPyfZ6ILg=; b=dUNIdKUEdl1y8Qyb3SGxjgrhby1CWg5jJ7uhzZF5NX1pi8s/xTn4ftkQIs2l6pThMb 2SRwTem/kMhVu39UP4w8sLHjVaLEclzOJvwsQaG5vtTYfq33lYHPpVdLiAdv0BrWfP1z GFD1j/6oWVvtzJ3+6hiCPBN+2Yh2piMiASRQr0P9pJgQigrjdDemGRgp+uFVd6Wz8K9+ oceByZEEN3qTZ2gRFJF1QN78HkWUVUQrZ7XUZ6kAZBmnDo6NwqCM0wfIi32wRv1bCwA1 0jm7ux34aPEQ6+zlCMYQ92HRlpc89P4kgipmDOe0hggoBt3UK2dzm2nQpuhlzaC8pA7x QnmA== X-Gm-Message-State: ABUngve8hIUCE/WKLTMKHoqS2IguchJ7Sz+3iKQuAx3wn5s5rwBTbohQc6HSEKnX2RrfSzmFcpIqyGIWhWAArA== X-Received: by 10.55.101.151 with SMTP id z145mr12871267qkb.35.1478626722303; Tue, 08 Nov 2016 09:38:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.149.55 with HTTP; Tue, 8 Nov 2016 09:38:41 -0800 (PST) From: Yao Qi Date: Tue, 08 Nov 2016 17:38:00 -0000 Message-ID: Subject: GDB test coverage To: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00174.txt.bz2 Hi, We had the doc on wiki about doing coverage tests to GDB, https://sourceware.org/gdb/wiki/TestingGDB#Coverage_Testing and I give it a try last week. Get some interesting results to share now, http://people.linaro.org/~yao.qi/gdb/coverage/20161102/ In general, the coverage is better than I expected :-). Some initial analysis to the coverage data, - the coverage in linux-record.c is low, because we don't test many syscalls in gdb.reverse, - the coverage in *-lang.c is low. Looks we are still lack of language related tests. - we don't test all the start options in gdb, see the coverage in main.c:captured_main_1 - we don't test "set cp-abi", "set extension-language", "delete checkpoint" "detach checkpopint", - here is a list of functions are never used, main.c:get_gdb_program_name, corefile.c:read_stack, valarith.c:value_in, - linux_gdb_signal_from_target and linux_gdb_signal_to_target are not well covered, I am sure we can still get more from these coverage results. How do we make full use of coverage tests? What I can think of are - we can find some never-used functions, and remove some of them, - add more test cases to address some low-coverage areas, --=20 Yao (=E9=BD=90=E5=B0=A7)