From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129223 invoked by alias); 5 Jul 2018 16:50:50 -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 129191 invoked by uid 89); 5 Jul 2018 16:50:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=privileges, struggling X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Jul 2018 16:50:46 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 753B081A438A; Thu, 5 Jul 2018 16:50:45 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA6DD2026D74; Thu, 5 Jul 2018 16:50:44 +0000 (UTC) Subject: Re: [PATCH v3] Allow using special files with File I/O functions To: Julio Guerra , "gdb-patches@sourceware.org" References: <20180628192635.44056-1-julio@farjump.io> <0102016447dcf9e9-3989bcd9-1272-4a05-93c5-77823c7a0921-000000@eu-west-1.amazonses.com> <3c1caf7f-f50f-a8d7-43f3-f8fa8eca663d@redhat.com> <79758ca1-2541-9ae6-d793-b367d6094468@farjump.io> <010201644bd94c4b-0d8759a9-5625-4773-a858-6e218d4fc9db-000000@eu-west-1.amazonses.com> <9e53034b-7e28-625e-ad70-fbb53863c7e1@redhat.com> <6ea235bf-bc87-256a-e745-e54f5e97bf5c@farjump.io> <010201644bfcc9f7-34e2955f-fdda-460d-9ffd-f03a76b20d30-000000@eu-west-1.amazonses.com> <817850f4-7ee1-6301-2256-a85b7a9edb02@farjump.io> <0102016464ad8f06-3019c95a-a2d1-4294-a360-6b436618ea6e-000000@eu-west-1.amazonses.com> From: Pedro Alves Message-ID: <526beccc-4274-288d-f5d9-929d136c0d48@redhat.com> Date: Thu, 05 Jul 2018 16:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <0102016464ad8f06-3019c95a-a2d1-4294-a360-6b436618ea6e-000000@eu-west-1.amazonses.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-07/txt/msg00123.txt.bz2 On 07/04/2018 10:44 AM, Julio Guerra wrote: >> You can run the testsuite against other remote stubs, not just gdbserver. >> Ideally, you'd set up the testsuite to against your stub. Did you try >> that? I'd recommend that regardless. >> >> Otherwise, even if we only test it when natively run, other folks that have >> embedded stubs that support fileio will end up exercising the test. > > I have almost finished writing the tests, but I am struggling on how to > create some special files: > - Creating block or character devices require mknod with root privileges. > - Creating a unix socket is not supported by the TCL library, and > require extra tools (netcat, socat...) to create one from the command line. > > Here is what I use for now for the other types: > - Link: TCL function `file link` > - Regular: TCL function `open` > - FIFO pipe command line: `mknod myfifo p` or `mkfifo myfifo` which > doesn't exist on Windows. > > What do you suggest? Should I avoid every non portable test cases, which > limits the tests only to links, regular files and directories? Yeah, as long as we test at least one "special" file, I think it's OK. Thanks, Pedro Alves