Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: try to install clang-tidy package explicitly #2042

Merged
merged 1 commit into from
Aug 13, 2020

Conversation

KumanekoSakura
Copy link

Commit 43f1389 ("Makefile: enable clang-tidy in presubmit tests") added clang-tidy to only tools/docker/env/Dockerfile file.
We should try to explicitly install clang-tidy in Makefile for those who don't use docker.

@KumanekoSakura
Copy link
Author

I made this commit because docs/contributing.md says

Run tests locally (make install_prerequisites followed by make presubmit).

and "make presubmit" failed due to lack of clang-tidy command. After applying this commit, "make presubmit" survives up to start testing on current kernel.

But it is annoying that current kernel crashes during "make presubmit" because I don't mean to crash current kernel; I just want to confirm that I'm following right steps for making pull requests. Is there a better command instead of "make presubmit" ?

[ 640.060691] [drm:vmw_cmdbuf_work_func [vmwgfx]] ERROR Command "SVGA_3D_CMD_BIND_GB_SURFACE" causing device error.
[ 640.061640] [drm:vmw_cmdbuf_work_func [vmwgfx]] ERROR Command buffer offset is 0
[ 640.062141] [drm:vmw_cmdbuf_work_func [vmwgfx]] ERROR Command size is 16
[ 640.113796] [drm:vmw_cmdbuf_work_func [vmwgfx]] ERROR Command "SVGA_3D_CMD_DESTROY_GB_SURFACE" causing device error.
[ 640.118213] [drm:vmw_cmdbuf_work_func [vmwgfx]] ERROR Command buffer offset is 0
[ 640.120093] [drm:vmw_cmdbuf_work_func [vmwgfx]] ERROR Command size is 12
[ 640.123028] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
[ 640.124918] IP: vmw_otables_takedown+0x66/0x100 [vmwgfx]
[ 640.126716] PGD 8000000133d31067 P4D 8000000133d31067 PUD 133712067 PMD 0
[ 640.128524] Oops: 0000 [#1] SMP PTI
[ 640.130324] Modules linked in: nfc llc2 hci_vhci fcrypt pcbc rxrpc pptp gre l2tp_ppp l2tp_netlink pppoe pppox pn_pep phonet xfrm_user nfnetlink crypto_user l2tp_ip6 l2tp_ip l2tp_core ip6_udp_tunnel udp_tunnel af_key xfrm_algo kcm ipx p8023 psnap p8022 llc smc sctp dccp_ipv6 dccp_ipv4 dccp can_raw can_bcm can caif_socket caif rfcomm hidp cmtp kernelcapi bnep bluetooth ecdh_generic af_alg vhost_net tap vmw_vsock_virtio_transport_common vhost vfio_iommu_type1 vfio userio uhid hid snd_seq snd_seq_device snd_timer snd soundcore cuse vmw_vsock_vmci_transport vsock binfmt_misc crct10dif_pclmul crc32_pclmul ghash_clmulni_intel vmw_balloon joydev input_leds intel_rapl_perf serio_raw shpchp vmw_vmci mac_hid sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi
[ 640.141519] ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear aesni_intel aes_x86_64 crypto_simd vmwgfx cryptd glue_helper psmouse ttm drm_kms_helper syscopyarea sysfillrect ahci e1000 libahci sysimgblt mptspi fb_sys_fops mptscsih drm mptbase scsi_transport_spi i2c_piix4 pata_acpi
[ 640.147905] CPU: 1 PID: 8961 Comm: host.test Not tainted 4.15.0-112-generic #113-Ubuntu
[ 640.149266] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 02/27/2020
[ 640.151830] RIP: 0010:vmw_otables_takedown+0x66/0x100 [vmwgfx]
[ 640.153095] RSP: 0000:ffffb9db10f6fa90 EFLAGS: 00010246
[ 640.154625] RAX: 0000000000000000 RBX: 0000000000000006 RCX: 0000000000000000
[ 640.156134] RDX: ffff90ce6aa40380 RSI: 0000000000000005 RDI: ffff90ce6aa00000
[ 640.157467] RBP: ffffb9db10f6faa8 R08: ffff90ce6a9f54d0 R09: ffff90ce6aa00090
[ 640.158746] R10: 0000000000000000 R11: 00000000ffffffff R12: ffff90ce6aa00000
[ 640.160064] R13: 0000000000000000 R14: 0000000000000000 R15: ffffb9db10f6fb8c
[ 640.161312] FS: 000000c000034410(0000) GS:ffff90ce79640000(0000) knlGS:0000000000000000
[ 640.162296] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 640.163083] CR2: 0000000000000030 CR3: 0000000131fbc003 CR4: 00000000001606e0
[ 640.163898] Call Trace:
[ 640.164695] vmw_release_device_early+0x7d/0xa0 [vmwgfx]
[ 640.165572] vmwgfx_pm_notifier+0x61/0xb0 [vmwgfx]
[ 640.166404] notifier_call_chain+0x4c/0x70
[ 640.167360] __blocking_notifier_call_chain+0x4b/0x70
[ 640.168276] __pm_notifier_call_chain+0x1f/0x40
[ 640.169042] snapshot_open+0x164/0x230
[ 640.169797] misc_open+0xff/0x170
[ 640.170585] chrdev_open+0xc4/0x1b0
[ 640.171322] do_dentry_open+0x21d/0x370
[ 640.172045] ? __inode_permission+0x5b/0x160
[ 640.172751] ? cdev_put.part.2+0x20/0x20
[ 640.173440] vfs_open+0x4f/0x80
[ 640.174108] path_openat+0x6bf/0x18b0
[ 640.174762] ? __switch_to_asm+0x35/0x70
[ 640.175398] ? __kprobes_text_end+0x3dcd0/0x3dcd0
[ 640.176003] do_filp_open+0x9b/0x110
[ 640.176606] ? __check_object_size+0xc8/0x1b0
[ 640.177203] ? __alloc_fd+0x46/0x170
[ 640.177757] do_sys_open+0x1ba/0x2c0
[ 640.178314] ? do_sys_open+0x1ba/0x2c0
[ 640.178853] ? _cond_resched+0x19/0x40
[ 640.179350] SyS_openat+0x14/0x20
[ 640.179851] do_syscall_64+0x73/0x130
[ 640.180310] entry_SYSCALL_64_after_hwframe+0x41/0xa6
[ 640.180789] RIP: 0033:0x4778fa
[ 640.181240] RSP: 002b:000000c000093bb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
[ 640.181688] RAX: ffffffffffffffda RBX: 000000c000022000 RCX: 00000000004778fa
[ 640.182163] RDX: 0000000000000000 RSI: 000000c0006975c0 RDI: ffffffffffffff9c
[ 640.182610] RBP: 000000c000093c28 R08: 0000000000000000 R09: 0000000000000000
[ 640.183084] R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000015d
[ 640.183529] R13: 000000000000015c R14: 0000000000000200 R15: ffffffffffffffff
[ 640.184001] Code: 84 24 90 cf 02 00 48 8d 14 d0 80 7a 10 00 74 db 48 83 c2 08 89 de 4c 89 e7 e8 87 f9 ff ff 83 c3 01 41 3b 9c 24 88 cf 02 00 72 cd <41> 8b 45 30 85 c0 74 7c 49 8b bd d0 01 00 00 e8 06 fc fe c9 85
[ 640.185597] RIP: vmw_otables_takedown+0x66/0x100 [vmwgfx] RSP: ffffb9db10f6fa90
[ 640.186194] CR2: 0000000000000030
[ 640.186912] ---[ end trace 7496302d24b3a81a ]---
[ 640.187602] [drm:vmw_cmdbuf_work_func [vmwgfx]] ERROR Command "SVGA_3D_CMD_DESTROY_GB_MOB" causing device error.
[ 640.188858] [drm:vmw_cmdbuf_work_func [vmwgfx]] ERROR Command buffer offset is 0
[ 640.189475] [drm:vmw_cmdbuf_work_func [vmwgfx]] ERROR Command size is 12

Commit 43f1389 ("Makefile: enable clang-tidy in presubmit tests")
added clang-tidy to only tools/docker/env/Dockerfile file. We should try to
explicitly install clang-tidy in Makefile for those who don't use docker.

  /bin/sh: 1: clang-tidy: not found
  (...snipped...)
  Makefile:250: recipe for target 'tidy' failed
  make[2]: *** [tidy] Error 127
  make[2]: *** Waiting for unfinished jobs....
  (...snipped...)
  Makefile:269: recipe for target 'presubmit_smoke' failed
  make[1]: *** [presubmit_smoke] Error 2
  Makefile:264: recipe for target 'presubmit' failed
  make: *** [presubmit] Error 2
@codecov
Copy link

codecov bot commented Aug 13, 2020

Codecov Report

Merging #2042 into master will not change coverage.
The diff coverage is n/a.

@dvyukov dvyukov merged commit ee7cb8b into google:master Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants