From owner-soc-status@freebsd.org Mon Jun 18 09:32:04 2018 Return-Path: Delivered-To: soc-status@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64A48101FA46 for ; Mon, 18 Jun 2018 09:32:04 +0000 (UTC) (envelope-from aniket.ezio41@gmail.com) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D358176ABA; Mon, 18 Jun 2018 09:32:03 +0000 (UTC) (envelope-from aniket.ezio41@gmail.com) Received: by mail-wm0-f46.google.com with SMTP id j15-v6so14253859wme.0; Mon, 18 Jun 2018 02:32:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=rjVbjQouQPT/mJ5lN3eiEBGLoDzZwBRnU/R1BDUr8Fk=; b=Wi0v/czJDNrcF7Xia7bcrmNafG0d81zmNIPwIG3reryJFUFleLZ6D1W5LrOT/PckqH IB1urFSIbNs8sSFjgOaSzWfEvujwEGq8dP3zlVKS6dA8KOux83R+HeuwYhsuQIngQfwf KEaFqP+KDvSiSh1sb3co04oUs6FBQTNDnXM4KMtTRQQxPD74oM7JcVWLko42do5WA0R6 vZ8WodTk7vO6ggLIZLf0xennfEf1PoXhcXT+jw3rh/JNSxwDO79ZtCC/nWgT6e0b9pPh IWE+nd4/M9Q5IP5pPp3pcew13kEQIy/ke4CxcxN8jVJtugxCXFhZ4Jx06qvqs93tmtI0 K+kg== X-Gm-Message-State: APt69E2j+Bu9DeAXNBabrigUzg6tHFTu5M2lfeuJoDtvbkUvY5OjBoSN oULrHWd6rPXnMjr1AisbScjS5Onn X-Google-Smtp-Source: ADUXVKLSmBGTgP7u3MtdQa9FWYlSIrn3gHqaC3CP2frhZ3IJKUgxll7/UIZ30fdds3hL8m1QAviwCQ== X-Received: by 2002:a50:8405:: with SMTP id 5-v6mr10368060edp.125.1529314317106; Mon, 18 Jun 2018 02:31:57 -0700 (PDT) Received: from mail-wr0-f181.google.com (mail-wr0-f181.google.com. [209.85.128.181]) by smtp.gmail.com with ESMTPSA id z44-v6sm7615803edb.72.2018.06.18.02.31.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jun 2018 02:31:56 -0700 (PDT) Received: by mail-wr0-f181.google.com with SMTP id d2-v6so16019791wrm.10; Mon, 18 Jun 2018 02:31:56 -0700 (PDT) X-Received: by 2002:adf:f112:: with SMTP id r18-v6mr9359722wro.134.1529314316527; Mon, 18 Jun 2018 02:31:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4146:0:0:0:0:0 with HTTP; Mon, 18 Jun 2018 02:31:56 -0700 (PDT) From: Aniket Pandey Date: Mon, 18 Jun 2018 15:01:56 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: [GSoC-18] Regression Test-Suite for Audit Framework [Week-5] To: soc-status@freebsd.org Cc: asomers@freebsd.org, George Neville-Neil , robert.watson@cl.cam.ac.uk, gavin@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2018 09:32:04 -0000 Hello All, This week, I was mostly involved in getting the tests merged with the FreeBSD src. In total, 18 differential revisions were accepted and committed by my mentor asomers@. The list would be too exhaustive so I'm refraining from posting them all here. However, I've compiled the list in my Project Wiki so if you're interested in the details, please feel free to check it out. [1] Apart from code-reviews, I encountered a few bugs and tried to fix them. Coverity, which is a static analysis tool used by FreeBSD, reported numerous memory leaks in my previously merged test cases. A brief report can be found here [2]. The leaks were all from the same origin, to get some of the system calls to execute successfully, I needed a path to a file which was created using open(2). Since open(2) returns a file-descriptor, it is recommended to close them at the end when the work is finished. Not doing that resulted in a bunch of reports. While working on creating regression tests for the audit viewer utility praudit(1), I encountered an unusual behavior. Kyua lets us specify the assertion for exit status in the atf-sh(3) tests, the default being 0 (for successful return). For example, the asserted failure for "r", "s" exclusion: atf_check -s exit:1 -e match:"usage: praudit" \ praudit -rs $(atf_get_srcdir)/trail However, this consistently failed the tests. On further inspection, it turned out that praudit(1) never returned 0. Although, as 0mp@ later mentioned, since this behaviour was not documented, it could not be considered as a bug. But to maintain the consistency with the other utlilities, (and to pass the tests) it was decided that returning 0 would indeed be a better option. I created a Pull request in OpenBSM which was merged by rwatson@ after the builds were verified. [3] I'm currently working on the issue of "-p" flag for praudit. This synchronises praudit invocation with the next legitimate audit record. However, with the default option, praudit would simply exit without doing any conversion. Since, it is expected that whatever record is present in trail should be considered, it makes sense to make "-p" option the default behaviour. The tests for praudit(1) were merged in r335290 [4]. With very few system calls left for review, I'll try to get them all merged in this week itself. Thank you, With best regards, Aniket Pandey [1] Project Wiki: https://wiki.freebsd.org/SummerOfCode2018Projects/RegressionTestSuiteForAuditFramework [2] https://github.com/aniketp/AuditTestSuite/issues/3 [3] https://github.com/openbsm/openbsm/pull/32 [4] https://reviews.freebsd.org/rS335290