On Tue, 2024-01-02 at 15:50 +0100, Alexander Kanavin wrote:
> Suppressing the error and returning None can result in a delayed failure:
> https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/6254/steps/14/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/6262/steps/14/logs/stdio
> 
> It is not clear why the os.stat() error occurs to begin with (it shouldn't), 
> so rather than
> adding further workarounds, let's get diagnostics at the source first, so we 
> understand
> what is going on.
> 
> Signed-off-by: Alexander Kanavin <[email protected]>
> ---
>  meta/lib/oe/sstatesig.py | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
> index 0342bcdc87a..6f124e4f59b 100644
> --- a/meta/lib/oe/sstatesig.py
> +++ b/meta/lib/oe/sstatesig.py
> @@ -357,10 +357,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
>              return siginfo.rpartition('.')[2]
>  
>      def get_time(fullpath):
> -        try:
> -            return os.stat(fullpath).st_mtime
> -        except OSError:
> -            return None
> +        return os.stat(fullpath).st_mtime
>  
>      # First search in stamps dir
>      localdata = d.createCopy()

FWIW, this comes from:

https://git.yoctoproject.org/poky/commit/meta/lib/oe/sstatesig.py?id=3df8773ed9301b0fc0e385e066a48110900136f7

I also suspect it is possible for a file to exist as a temp file but
get renamed into place while the test runs.

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193347): 
https://lists.openembedded.org/g/openembedded-core/message/193347
Mute This Topic: https://lists.openembedded.org/mt/103482180/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to