NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: misc/58565: lib/libcurses/t_curses writes to /tmp and doesn't clean up



The following reply was made to PR misc/58565; it has been noted by GNATS.

From: Sunil Nimmagadda <sunil%nimmagadda.net@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: misc/58565: lib/libcurses/t_curses writes to /tmp and doesn't
 clean up
Date: Sat, 10 Aug 2024 14:27:53 +0530

 campbell+netbsd%mumble.net@localhost writes:
 
 >>Number:         58565
 >>Category:       misc
 >>Synopsis:       lib/libcurses/t_curses writes to /tmp and doesn't clean up
 >>Confidential:   no
 >>Severity:       serious
 >>Priority:       medium
 >>Responsible:    misc-bug-people
 >>State:          open
 >>Class:          sw-bug
 >>Submitter-Id:   net
 >>Arrival-Date:   Sat Aug 10 02:45:00 +0000 2024
 >>Originator:     Taylor R Campbell
 >>Release:        current, ...
 >>Organization:
 > The /tmp/NetBSD.windation
 >>Environment:
 >>Description:
 > After `cd /usr/tests/lib/libcurses && atf-run', a file called /tmp/getwin.win remains.
 >>How-To-Repeat:
 > cd /usr/tests/lib/libcurses && atf-run
 >>Fix:
 > Yes, please!
 >
 > Ideally, it should use the atf work directory.
 >
 > Failing that, it should respect $TMPDIR instead of having /tmp hard-coded.
 >
 > And in any case it should clean up after itself.
 
 This diff lets the test create its temp file in the working directory
 which is subsequently cleared by atf.
 
 PS: New to atf(7) and tests(7) part of the tree.
 
 diff --git a/tests/lib/libcurses/tests/getwin b/tests/lib/libcurses/tests/getwin
 --- a/tests/lib/libcurses/tests/getwin
 +++ b/tests/lib/libcurses/tests/getwin
 @@ -1,7 +1,7 @@
  include window
  call OK mvwaddch $win1 2 3 `\001a` 
  call OK wrefresh $win1
 -assign FILE "/tmp/getwin.win" 
 +assign FILE "getwin.win"
  call OK putwin $win1 $FILE
  call win2 getwin $FILE
  check win2 NON_NULL
 


Home | Main Index | Thread Index | Old Index