• B
    selftests/powerpc: Skip test instead of failing · 5aba7739
    Breno Leitao 提交于
    [ Upstream commit eafcd8e3fbad4f426a40ed2b6a8c697c3a4ef36a ]
    
    Current core-pkey selftest fails if the test runs without privileges to
    write into the core pattern file (/proc/sys/kernel/core_pattern). This
    causes the test to fail and give the impression that the subsystem being
    tested is broken, when, in fact, the test is being executed without the
    proper privileges. This is the current error:
    
    	test: core_pkey
    	tags: git_version:v4.19-3-g9e3363be9bce-dirty
    	Error writing to core_pattern file: Permission denied
    	failure: core_pkey
    
    This patch simply skips this test if it runs without the proper privileges,
    avoiding this undesired failure.
    
    CC: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
    CC: Thiago Jung Bauermann <bauerman@linux.ibm.com>
    Signed-off-by: NBreno Leitao <leitao@debian.org>
    Reviewed-by: NThiago Jung Bauermann <bauerman@linux.ibm.com>
    Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: NSasha Levin <sashal@kernel.org>
    5aba7739
core-pkey.c 9.9 KB