This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] Allow using special files with File I/O functions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]