Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-29 Thread Evgeniy Sadovnik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/
---

(Updated Sept. 29, 2016, 3:41 p.m.)


Status
--

This change has been marked as submitted.


Review request for KDE Frameworks and Gleb Popov.


Changes
---

Submitted with commit a68dbef08a070772449edb2ae7ea1849568162b7 by Gleb Popov on 
behalf of Evgeniy Sadovnik to branch master.


Repository: kconfig


Description
---

The test checks that saving a read-only config file fails. But because root can 
write into read-only files, the test is failing when running by root.
Check for uid when running the test and make it XFAIL if we are running as root.


Diffs
-

  autotests/kconfigtest.cpp 2b905b5 

Diff: https://git.reviewboard.kde.org/r/128916/diff/


Testing
---


Thanks,

Evgeniy Sadovnik



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-28 Thread David Faure

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/#review99644
---


Ship it!




Ship It!

- David Faure


On Sept. 19, 2016, 6:14 p.m., Evgeniy Sadovnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128916/
> ---
> 
> (Updated Sept. 19, 2016, 6:14 p.m.)
> 
> 
> Review request for KDE Frameworks and Gleb Popov.
> 
> 
> Repository: kconfig
> 
> 
> Description
> ---
> 
> The test checks that saving a read-only config file fails. But because root 
> can write into read-only files, the test is failing when running by root.
> Check for uid when running the test and make it XFAIL if we are running as 
> root.
> 
> 
> Diffs
> -
> 
>   autotests/kconfigtest.cpp 2b905b5 
> 
> Diff: https://git.reviewboard.kde.org/r/128916/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Evgeniy Sadovnik
> 
>



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-19 Thread Evgeniy Sadovnik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/
---

(Updated Sept. 19, 2016, 6:14 p.m.)


Review request for KDE Frameworks and Gleb Popov.


Repository: kconfig


Description
---

The test checks that saving a read-only config file fails. But because root can 
write into read-only files, the test is failing when running by root.
Check for uid when running the test and make it XFAIL if we are running as root.


Diffs (updated)
-

  autotests/kconfigtest.cpp 2b905b5 

Diff: https://git.reviewboard.kde.org/r/128916/diff/


Testing
---


Thanks,

Evgeniy Sadovnik



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-18 Thread Sune Vuorela


> On Sept. 16, 2016, 4:57 p.m., Sune Vuorela wrote:
> > autotests/kconfigtest.cpp, line 1376
> > 
> >
> > Isn't a QSKIP if user is root in the beginning of the test a better 
> > approach ?
> 
> Gleb Popov wrote:
> I think, XFAIL is better idea, because if anyone ever would want to 
> figure out why it is expected, it would instantly found out the cause.

XFAIL is usually for actual bugs. I'm not sure I'll consider 'how unix 
permissions have worked since the dawn of time' actual bugs.


- Sune


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/#review99231
---


On Sept. 16, 2016, 7:17 a.m., Evgeniy Sadovnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128916/
> ---
> 
> (Updated Sept. 16, 2016, 7:17 a.m.)
> 
> 
> Review request for KDE Frameworks and Gleb Popov.
> 
> 
> Repository: kconfig
> 
> 
> Description
> ---
> 
> The test checks that saving a read-only config file fails. But because root 
> can write into read-only files, the test is failing when running by root.
> Check for uid when running the test and make it XFAIL if we are running as 
> root.
> 
> 
> Diffs
> -
> 
>   autotests/kconfigtest.cpp 2b905b5 
> 
> Diff: https://git.reviewboard.kde.org/r/128916/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Evgeniy Sadovnik
> 
>



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-16 Thread Gleb Popov


> On Sept. 16, 2016, 7:57 p.m., Sune Vuorela wrote:
> > autotests/kconfigtest.cpp, line 1376
> > 
> >
> > Isn't a QSKIP if user is root in the beginning of the test a better 
> > approach ?

I think, XFAIL is better idea, because if anyone ever would want to figure out 
why it is expected, it would instantly found out the cause.


- Gleb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/#review99231
---


On Sept. 16, 2016, 10:17 a.m., Evgeniy Sadovnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128916/
> ---
> 
> (Updated Sept. 16, 2016, 10:17 a.m.)
> 
> 
> Review request for KDE Frameworks and Gleb Popov.
> 
> 
> Repository: kconfig
> 
> 
> Description
> ---
> 
> The test checks that saving a read-only config file fails. But because root 
> can write into read-only files, the test is failing when running by root.
> Check for uid when running the test and make it XFAIL if we are running as 
> root.
> 
> 
> Diffs
> -
> 
>   autotests/kconfigtest.cpp 2b905b5 
> 
> Diff: https://git.reviewboard.kde.org/r/128916/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Evgeniy Sadovnik
> 
>



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-16 Thread Sune Vuorela

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/#review99231
---




autotests/kconfigtest.cpp (line 1376)


Isn't a QSKIP if user is root in the beginning of the test a better 
approach ?


- Sune Vuorela


On Sept. 16, 2016, 7:17 a.m., Evgeniy Sadovnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128916/
> ---
> 
> (Updated Sept. 16, 2016, 7:17 a.m.)
> 
> 
> Review request for KDE Frameworks and Gleb Popov.
> 
> 
> Repository: kconfig
> 
> 
> Description
> ---
> 
> The test checks that saving a read-only config file fails. But because root 
> can write into read-only files, the test is failing when running by root.
> Check for uid when running the test and make it XFAIL if we are running as 
> root.
> 
> 
> Diffs
> -
> 
>   autotests/kconfigtest.cpp 2b905b5 
> 
> Diff: https://git.reviewboard.kde.org/r/128916/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Evgeniy Sadovnik
> 
>



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-16 Thread Gleb Popov

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/#review99227
---



I'd say ship it, but let's wait for someone else.

- Gleb Popov


On Sept. 16, 2016, 10:17 a.m., Evgeniy Sadovnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128916/
> ---
> 
> (Updated Sept. 16, 2016, 10:17 a.m.)
> 
> 
> Review request for KDE Frameworks and Gleb Popov.
> 
> 
> Repository: kconfig
> 
> 
> Description
> ---
> 
> The test checks that saving a read-only config file fails. But because root 
> can write into read-only files, the test is failing when running by root.
> Check for uid when running the test and make it XFAIL if we are running as 
> root.
> 
> 
> Diffs
> -
> 
>   autotests/kconfigtest.cpp 2b905b5 
> 
> Diff: https://git.reviewboard.kde.org/r/128916/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Evgeniy Sadovnik
> 
>



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-16 Thread Evgeniy Sadovnik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/
---

(Updated Sept. 16, 2016, 7:17 a.m.)


Review request for KDE Frameworks and Gleb Popov.


Repository: kconfig


Description
---

The test checks that saving a read-only config file fails. But because root can 
write into read-only files, the test is failing when running by root.
Check for uid when running the test and make it XFAIL if we are running as root.


Diffs (updated)
-

  autotests/kconfigtest.cpp 2b905b5 

Diff: https://git.reviewboard.kde.org/r/128916/diff/


Testing
---


Thanks,

Evgeniy Sadovnik



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-15 Thread Evgeniy Sadovnik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/
---

(Updated Sept. 15, 2016, 8:49 p.m.)


Review request for KDE Frameworks and Gleb Popov.


Repository: kconfig


Description
---

The test checks that saving a read-only config file fails. But because root can 
write into read-only files, the test is failing when running by root.
Check for uid when running the test and make it XFAIL if we are running as root.


Diffs (updated)
-

  autotests/kconfigtest.cpp 2b905b5 

Diff: https://git.reviewboard.kde.org/r/128916/diff/


Testing
---


Thanks,

Evgeniy Sadovnik



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-15 Thread Gleb Popov


> On Sept. 15, 2016, 3:01 p.m., Gleb Popov wrote:
> > autotests/kconfigtest.cpp, line 1378
> > 
> >
> > I'd put both `cgLocal.writeEntry("someLocalString", "whatever2");` and 
> > `QVERIFY(!cgLocal.sync());` inside else clause.

After looking at `QEXPECT_FAIL()` documentation, i've figured you are right.


- Gleb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/#review99210
---


On Sept. 15, 2016, 4:20 p.m., Evgeniy Sadovnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128916/
> ---
> 
> (Updated Sept. 15, 2016, 4:20 p.m.)
> 
> 
> Review request for KDE Frameworks and Gleb Popov.
> 
> 
> Repository: kconfig
> 
> 
> Description
> ---
> 
> The test checks that saving a read-only config file fails. But because root 
> can write into read-only files, the test is failing when running by root.
> Check for uid when running the test and make it XFAIL if we are running as 
> root.
> 
> 
> Diffs
> -
> 
>   autotests/kconfigtest.cpp 2b905b5 
> 
> Diff: https://git.reviewboard.kde.org/r/128916/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Evgeniy Sadovnik
> 
>



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-15 Thread Gleb Popov

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/#review99215
---




autotests/kconfigtest.cpp (line 1373)


getuid() isn't present on Windows. Guard this check with `#ifndef Q_OS_WIN`.


- Gleb Popov


On Sept. 15, 2016, 4:20 p.m., Evgeniy Sadovnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128916/
> ---
> 
> (Updated Sept. 15, 2016, 4:20 p.m.)
> 
> 
> Review request for KDE Frameworks and Gleb Popov.
> 
> 
> Repository: kconfig
> 
> 
> Description
> ---
> 
> The test checks that saving a read-only config file fails. But because root 
> can write into read-only files, the test is failing when running by root.
> Check for uid when running the test and make it XFAIL if we are running as 
> root.
> 
> 
> Diffs
> -
> 
>   autotests/kconfigtest.cpp 2b905b5 
> 
> Diff: https://git.reviewboard.kde.org/r/128916/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Evgeniy Sadovnik
> 
>



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-15 Thread Evgeniy Sadovnik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/
---

(Updated Sept. 15, 2016, 1:20 p.m.)


Review request for KDE Frameworks and Gleb Popov.


Repository: kconfig


Description
---

The test checks that saving a read-only config file fails. But because root can 
write into read-only files, the test is failing when running by root.
Check for uid when running the test and make it XFAIL if we are running as root.


Diffs (updated)
-

  autotests/kconfigtest.cpp 2b905b5 

Diff: https://git.reviewboard.kde.org/r/128916/diff/


Testing
---


Thanks,

Evgeniy Sadovnik



Re: Review Request 128916: kconfig: Make test XFAIL when running as root

2016-09-15 Thread Gleb Popov

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128916/#review99210
---




autotests/kconfigtest.cpp 


I'd put both `cgLocal.writeEntry("someLocalString", "whatever2");` and 
`QVERIFY(!cgLocal.sync());` inside else clause.


- Gleb Popov


On Sept. 15, 2016, 2:59 p.m., Evgeniy Sadovnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128916/
> ---
> 
> (Updated Sept. 15, 2016, 2:59 p.m.)
> 
> 
> Review request for KDE Frameworks and Gleb Popov.
> 
> 
> Repository: kconfig
> 
> 
> Description
> ---
> 
> The test checks that saving a read-only config file fails. But because root 
> can write into read-only files, the test is failing when running by root.
> Check for uid when running the test and make it XFAIL if we are running as 
> root.
> 
> 
> Diffs
> -
> 
>   autotests/kconfigtest.cpp 2b905b5 
> 
> Diff: https://git.reviewboard.kde.org/r/128916/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Evgeniy Sadovnik
> 
>