This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 212311 - Permission denied on /TestFiles
Summary: Permission denied on /TestFiles
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: UnitTest Support (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-10 13:07 UTC by simonsays1980
Modified: 2015-07-21 01:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NB C++ project confirming bug (10.98 KB, application/octet-stream)
2014-08-08 07:24 UTC, techx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description simonsays1980 2012-05-10 13:07:00 UTC
When creating a new project all goes fine. When reopening a new session after closing the first one, I get a Permission denied exception and the Build fails: 

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
cd ../NUMAV && /usr/bin/make -I/usr/local/boost_1_49_0 -f Makefile CONF=Debug clean
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
rm -f -r build/Debug
rm -f /TestFiles/f1
rm -f -r build/Debug
rm -f dist/Debug/GNU-MacOSX/numavtest


CLEAN SUCCESSFUL (total time: 58ms)

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
cd ../NUMAV && /usr/bin/make -I/usr/local/boost_1_49_0 -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk /TestFiles/f1
mkdir -p build/Debug/GNU-MacOSX
rm -f build/Debug/GNU-MacOSX/main.o.d
g++ -I /usr/local/boost_1_49_0   -c -g -I. -I. -I. -I. -MMD -MP -MF build/Debug/GNU-MacOSX/main.o.d -o build/Debug/GNU-MacOSX/main.o main.cpp
mkdir -p /TestFiles
mkdir: /TestFiles: Permission denied
make[4]: *** [/TestFiles/f1] Error 1
make[3]: *** [.build-conf] Error 2
make[2]: *** [.build-impl] Error 2
make[1]: *** [.build-subprojects] Error 2
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 111ms)

The same happened also on a Linux Ubuntu 11 system:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/simon/NetBeansProjects/NUMATest'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk /TestFiles/f1
make[2]: Entering directory `/home/simon/NetBeansProjects/NUMATest'
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/main.o.d
g++    -c -g -I. -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp
mkdir -p /TestFiles
mkdir: cannot create directory `/TestFiles': Permission denied
make[2]: *** [/TestFiles/f1] Error 1
make[2]: Leaving directory `/home/simon/NetBeansProjects/NUMATest'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/simon/NetBeansProjects/NUMATest'
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 1s)
Comment 1 Vladimir Voskresensky 2012-05-10 14:13:58 UTC
Nik, it looks like incorrect generation make entries for tests
Comment 2 nnnnnk 2012-05-10 15:47:38 UTC
Hello,

I can not reproduce the issue.
Could you provide more details how do you create new project or provide sample project.

Regards,
Nikolay.
Comment 3 simonsays1980 2012-05-10 20:06:58 UTC
Hi Nikolay,

I ran several tests by building a C/C++ Application and then including the boost headers, as I did before. In this case everything was fine when restarting the NetBeans IDE. Then I tested it with restarting my work machine. Nothing. 
I was confused, could I have been so wrong? 
I thought about what could make the difference for having this issue on my Mac on my Linux machine at work......yeah at work. This must have been the difference! When I was at work I put my Laptop to the LAN of our institute. And at this LAN of course the Linux machine sits. Now what is the weird thing that happens, such that the compiler seems to have no executable permissions anymore to the nbproject folder.....as far as I understand, netbeans runs GNU make on the Makefile and make then creates inside of the nbproject folder a TestFiles folder which is afterwards removed again?

I don't know what this is. When I go home, I do take the issue with me. Then at home. I deleted my old project and created a new one from old sources. I restarted my computer.....and voila...it worked. So at my level of knowledge I do not know, if this is an issue of my settings of either system or GNU make, or if sth like this should be considered in the IDE, to avoid it, even if it occurs. 

Sorry for being of no more help here. If you tell me, what you wanna have I can attach it here. And if it happens again, I could e.g. attach the Makefile...?

Best 

Simon
Comment 4 dreid 2012-06-19 13:17:42 UTC
I also just encountered this problem. 

I found this problem occurred upon creating a test file and then removing it from the project. I created a "New Simple C++ Test" and upon using it, removed it from the project, and then deleted the file. The build files did not appear to updated with these changes. 

My solution was to create another "New Simple C++ Test" that is not really doing anything. This allowed me to build my project.
Comment 5 bertqwert 2013-10-20 15:00:25 UTC
--- Netbeans 7.4 ---
I also encountered the problem and remember that I recently deleted a "New Simple C++ Test".
Although in this case, creating the test again didn´t help, instead some curious build errors accured like "multiple definition of...".
There were also warnings about the makefile:

make[1]: Entering directory ...
nbproject/Makefile-Debug.mk:94: warning: overriding recipe for target `build/Debug/GNU-Linux-x86/tests/TestFiles/f1'
nbproject/Makefile-Debug.mk:70: warning: ignoring old recipe for target `build/Debug/GNU-Linux-x86/tests/TestFiles/f1'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk build/Debug/GNU-Linux-x86/tests/TestFiles/f1
make[2]: Entering directory ...
nbproject/Makefile-Debug.mk:94: warning: overriding recipe for target `build/Debug/GNU-Linux-x86/tests/TestFiles/f1'
nbproject/Makefile-Debug.mk:70: warning: ignoring old recipe for target `build/Debug/GNU-Linux-x86/tests/TestFiles/f1'

I created a new project and added the files...
Comment 6 techx 2014-08-08 07:24:34 UTC
Created attachment 148599 [details]
NB C++ project  confirming bug
Comment 7 techx 2014-08-08 07:35:14 UTC
Bug is still present in 8.0.

How to reproduce:

Create NB C/C++ application.

Build&Clean -> works.

Add "New C/C++ Simple Test..."

Build&Clean -> works.

Remove test.

Build&Clean -> works.

Close and re-open project.

Build&Clean -> fails.

How to fix:

Select your project -> find -> search for "/TestFiles"

In "configurations.xml":

Comment all <compileType> sections which include "/TestFiles".

I added a NB project which confirms the bug.

Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 2
Java: 1.8.0_11; Java HotSpot(TM) 64-Bit Server VM 25.11-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12
System: Linux version 3.13.0-32-generic running on amd64; UTF-8; de_AT (nb)
Comment 8 Alexander Simon 2015-07-20 16:46:28 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/95e918212315
Comment 9 Quality Engineering 2015-07-21 01:19:53 UTC
Integrated into 'main-silver', will be available in build *201507210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/95e918212315
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #212311 Permission denied on /TestFiles