From owner-freebsd-hackers@freebsd.org Thu Apr 15 00:23:54 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6FD65D684F for ; Thu, 15 Apr 2021 00:23:54 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail02.asahi-net.or.jp (mail02.asahi-net.or.jp [202.224.55.14]) by mx1.freebsd.org (Postfix) with ESMTP id 4FLKp04GQpz4dQK for ; Thu, 15 Apr 2021 00:23:52 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from vmware12.advok.com (cpe-184-152-96-96.nj.res.rr.com [184.152.96.96]) (Authenticated sender: NR2Y-OOT) by mail02.asahi-net.or.jp (Postfix) with ESMTPSA id ECFBC7EE8D for ; Thu, 15 Apr 2021 09:23:48 +0900 (JST) Date: Wed, 14 Apr 2021 19:02:52 -0400 From: Yoshihiro Ota To: freebsd-hackers@freebsd.org Subject: How do I write test cases for interactive commands? Message-Id: <20210414190252.69d4bb503fafc73ca1721eb2@j.email.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; i386-portbld-freebsd12.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4FLKp04GQpz4dQK X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ota@j.email.ne.jp designates 202.224.55.14 as permitted sender) smtp.mailfrom=ota@j.email.ne.jp X-Spamd-Result: default: False [0.19 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:202.224.55.0/24]; TO_DN_NONE(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; RCVD_IN_DNSWL_LOW(-0.10)[202.224.55.14:from]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[202.224.55.14:from]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:4685, ipnet:202.224.32.0/19, country:JP]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[email.ne.jp]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[202.224.55.14:from:127.0.2.255]; RECEIVED_SPAMHAUS_PBL(0.00)[184.152.96.96:received]; NEURAL_SPAM_LONG(0.99)[0.989]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 00:23:54 -0000 Hi, I'm interested in writing some test cases for lldb and clang. How can I write interactive command in/out in Kyua? Does anyone have some examples? I'm also interested in writing test programs to compile again clang to find compiler/linker bugs. Where do we use for temporary files and how do we clean up? Thanks, Hiro