Skip to contentSkip to conversation

Pre-release tests

DISCUSSION Jean Delvare 3 participants 9 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

I've finished testing I2C and LM Sensors CVS on three out of my four systems (last is left for tomorrow) and here is my report:

1* We'll have trouble with i2c bus drivers from outside our package. Those who won't load at all aren't the main problem IMHO (we'll just get dozens of complaints stating that since the user installed I2C 2.8.0, his/her video card doesn't work anymore). The real problem is those who still load but crash upon scanning. I have old Matrox video cards in two of my machines, and sensors-detect says I should load i2c-matroxfb. The module loads properly, but sensors-detect crashes as soon as it tries to scan this device. What's more, any subsequent load of a chip driver will crash too (because this will scan all I2C busses, including i2c-matroxfb).

So, what can we do? The very least we can do is add a BIG WARNING on our news page at the time we release, stating that any other I2C-related module (most of which are video-related) should not be loaded anymore after I2C 2.8.0 is installed. The message would explain that we plan to submit a patch to the Linux kernel so that all devices are back with the next Linux version. A second thing I'd suggest is commenting out in sensors-detect all such devices. I now it sounds crazy because we'll have to reenable them right after the release, but I think that if we don't do that, we'll have hundreds of people complaining about system crashes. Remember that FB modules, such as i2c-matroxfb, cannot be unloaded. So, loading the module from sensors-detect while the user never used it before, then crashing the system and finally give him/her no other choice but to reboot probably won't make the user happy.

2* We should warn the user that /etc/sensors.conf never gets overwritten. I agree that we shouldn't overwrite it, but the user should be told about this, so that he/she can copy and edit the new file if he/she wants.

3* At the end of sensors-detect, we should tell the user to run the commands he/she is told to add to /etc/rc.*. Two reasons for that. First, he/she can make sure it works well before editing his/her init scripts. Second, he/she can use sensors right away, without having to restart the system or run the init scripts by himself/herself. I had users complaining that sensors wouldn't work right after sensors-detect being ran.

4* What's that "sleep 3" sensors-detect suggests adding between modules load and sensors -s? I have no sleep between these two steps in my own scripts, and I never had any problem. I would replace this block:
# Next 2 lines are optional
sleep 3
/usr/local/bin/sensors -s
with this one:

  # sleep 2 # optional
  /usr/local/bin/sensors -s # recommended
It should work for most people. Waiting for 3 seconds can represent 5 or
10% of the total boot time! Too much for what it's worth IMHO.

5* The "you must run ldconfig" message at the end of a lm_sensors2's make install still doesn't please me. I'd replace "libsensors.so*" by "libsensors.so.2" (well, the file name as it actually is), or I fear the users won't understand why we say there were no libsensors ever in /usr/local/lib, while there may be.

This five points can be left to me, but I want to hear you about them before I do anything.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#1 lore raw
Quoted 3 lines · Jean Delvare

The message would explain that we plan to submit a patch to the Linux kernel so that all devices are back with the next Linux version.

Hm, I've asked for such a patch already, but I'll do it again before it's too late for 2.4.22. Anyone want to make this up and send it to me?

thanks,

greg k-h

#2 lore raw
In reply to Jean Delvare
Quoted 4 lines

Hm, I've asked for such a patch already, but I'll do it again before it's too late for 2.4.22. Anyone want to make this up and send it to me?

I'm supposed to be the one on it :) But any help will be of course greatly appreciated. The only two drivers I'll be able to test with my hardware are zoran and bttv (if I can get my hands on my old german TV card again). Well I should also be able to try i2c-matroxfb but since I never understood what the driver was supposed to do, I'll just test that it compiles and load, no more.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#3 lore raw
In reply to Jean Delvare
Quoted 2 lines

First of all, sensors-detect tests OK for me now. Good job.

Great. I only hope the UTF-8 systems will enjoy it as much as you seem to do ;) I really think they will.

Quoted 2 lines

On #1-5 below, I don't feel strongly either way about any of these issues, feel free to do what you propose if you want.

OK, I've commited everything to CVS. You are all welcome to tell me if you like the texts I added at the end of both "make install". The great thing is that we know have these texts as placeholders for anything we want to say to the users for either release or CVS testers.

I then tested on my fourth system, works like a charm.

Quoted 3 lines

I note that we do have some Big Fat Warnings in the CVS part of the download page, we can copy those up after the release and enhance if necessary.

I think that we should rather base our release warning on the text I used at the end of i2c "make install". The text for CVS seems to warn more about the fact that it is CVS and thus possibly unstable than about anything else.

I finally add a sixth point to be discussed about:

6* Our installation process leaves the old i2c-pcf-epp.o and i2c-elektor.o (as is or possibly compressed) modules. These drivers are marked as "will not build outside kernel tree" in i2c's makefile. What's the idea? Are these modules included by mkpatch? These old modules are likely to crash the system since they will not be compatible with our new I2C structures. I guess the safe way would be to delete them.

I don't know enough about these two modules, what they are used for and the reason why they are not part of our build process to decide what to do. Comments and explanations wanted!

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#4 lore raw
In reply to Jean Delvare
Quoted 3 lines

I don't know much about #6 below but it seems like a minor issue we can defer until next time.

I don't think so. Old modules are not compatible, so loading them could have unpredictable results. Let's have them deleted at install time, for this release at least. This is the same kind of safety measure I took as the resolution of problem #1. It just can't hurt, and should lower the severity, if not number, of reports. And I prefer by far having reports saying "hey, where have these module gone?" than ones saying "hey, lm sensors crashed my system".

We'll take some time after the release to see why theses modules are so special and what we should do with them.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#5 lore raw
In reply to Jean Delvare
Quoted 8 lines
Quoted 4 lines

The message would explain that we plan to submit a patch to the Linux kernel so that all devices are back with the next Linux version.

Hm, I've asked for such a patch already, but I'll do it again before it's too late for 2.4.22. Anyone want to make this up and send it to me?

Hi Greg,

I just finished the patch. It is of course based on the patch generated by mkpatch from i2c-2.8.0. I checked and converted all kernel drivers that make use of our i2c structures. Here is the list:

drivers/acorn/char/i2c.c
drivers/acorn/char/pcf8583.c
drivers/i2c/i2c-adap-ite.c
drivers/i2c/i2c-keywest.c
drivers/i2c/scx200_acb.c
drivers/i2c/scx200_i2c.c
drivers/ieee1394/pcilynx.c
drivers/media/video/bt832.c
drivers/media/video/bttv-if.c
drivers/media/video/i2c-old.c
drivers/media/video/msp3400.c
drivers/media/video/saa5249.c
drivers/media/video/tda7432.c
drivers/media/video/tda9875.c
drivers/media/video/tda9887.c
drivers/media/video/tuner-3036.c
drivers/media/video/tuner.c
drivers/media/video/tvaudio.c
drivers/media/video/tvmixer.c
drivers/pcmcia/sa1100_stork.c
drivers/sound/dmasound/dac3550a.c
drivers/sound/dmasound/tas3001c.c
drivers/video/matrox/i2c-matroxfb.c
drivers/video/matrox/matroxfb_maven.c

I then had to modify the support files of the i2c directory to integrate our new drivers. Mkpatch is supposed to do so, but it doesn't.

patching file drivers/i2c/Config.in
patching file drivers/i2c/Makefile

I also modified the two following files because I believe they contained errors.

drivers/media/video/Makefile
drivers/media/video/saa7146.h

For clarity, I represented the changes in the i2c directory in the array below. First column shows the files we have in i2c-2.8.0. Second column shows files present in the Linux 2.4.21 drivers/i2c directory. Third column shows the merge result (where + means the file was added, - means it was deleted and U means it was updated.)

* I2C 2.8.0 ************* LINUX 2.4.21 *********** LINUX 2.4.22 ******

i2c-adap-ibm_ocp.c + i2c-adap-ibm_ocp.c
i2c-adap-ite.c i2c-adap-ite.c

i2c-algo-8xx.c                                  + i2c-algo-8xx.c
i2c-algo-8xx.h                                  + i2c-algo-8xx.h
i2c-algo-bit.c          i2c-algo-bit.c          U i2c-algo-bit.c
i2c-algo-bit.h          i2c-algo-bit.h          U i2c-algo-bit.h

i2c-algo-biths.c
i2c-algo-biths.h
i2c-algo-ibm_ocp.c + i2c-algo-ibm_ocp.c
i2c-algo-ibm_ocp.h + i2c-algo-ibm_ocp.h
i2c-algo-ite.c i2c-algo-ite.c
i2c-algo-ite.h i2c-algo-ite.h

i2c-algo-pcf.c          i2c-algo-pcf.c          U i2c-algo-pcf.c
i2c-algo-pcf.h          i2c-algo-pcf.h          U i2c-algo-pcf.h
i2c-core.c              i2c-core.c              U i2c-core.c
i2c-dev.c               i2c-dev.c               U i2c-dev.c
i2c-dev.h               i2c-dev.h               U i2c-dev.h
i2c-elektor.c           i2c-elektor.c           U i2c-elektor.c
                        i2c-elektor.h           -
i2c-elv.c               i2c-elv.c               U i2c-elv.c
i2c-frodo.c                                     + i2c-frodo.c
i2c-id.h                i2c-id.h                U i2c-id.h
                        i2c-ite.h                 i2c-ite.h
                        i2c-keywest.c             i2c-keywest.c
                        i2c-keywest.h             i2c-keywest.h
i2c-pcf-epp.c                                   + i2c-pcf-epp.c
i2c-pcf8584.h           i2c-pcf8584.h           U i2c-pcf8584.h
i2c-philips-par.c       i2c-philips-par.c       U i2c-philips-par.c
i2c-pport.c                                     + i2c-pport.c
i2c-proc.c              i2c-proc.c              U i2c-proc.c
i2c-proc.h              i2c-proc.h              U i2c-proc.h
i2c-rpx.c                                       + i2c-rpx.c
i2c-velleman.c          i2c-velleman.c          U i2c-velleman.c
i2c.h                   i2c.h                   U i2c.h
                        scx200.h                  scx200.h
                        scx200_acb.c              scx200_acb.c
                        scx200_gpio.h             scx200_gpio.h
                        scx200_i2c.c              scx200_i2c.c

**********************************************************************

For files that were updated, we should make sure we are not undoing some changes that would have occured in the kernel. Or are the two trees so different that my remark doesn't even make sense?

The changeset is composed of 14 diff files, the bigger one being of course the core i2c-2.8.0 patch (230k). The 13 other patches are the fixes I added, and range from 450 bytes to 9.9k. Total size 254k.

Do you prefer a single patch or individual diffs? Do you want me to generate the core patch against 2.4.21, 2.4.21-bk7 or 2.4.22-pre4? (or you can do it yourself)

A few questions just to make sure I understood everything (well, as far as this patch is concerned ;)):

1* I left all drivers using i2c-old untouched. It looks like they are not concerned by our changes.

2* I fixed i2c_adapter and i2c_driver, but left i2c_client and i2c_algorithm untouched (actually I did exactly what MDS told me, no more, no less). It looks like the i2c_algorithm structure as a new owner field, just as i2c_adapter and i2c_driver do. Is it safe not to fill it?

I tested my work as much as possible, but I of course don't have all the hardware I would need to test everything completely.

Patches available on request (or should I post them on the list?) Comments welcome. Testers welcome too.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#6 lore raw
In reply to Jean Delvare
Quoted 4 lines · Jean Delvare

Do you prefer a single patch or individual diffs? Do you want me to generate the core patch against 2.4.21, 2.4.21-bk7 or 2.4.22-pre4? (or you can do it yourself)

Individual diffs are good. In an incremental fashion is even better (this one fixes up the core files to match cvs, this one adds one driver, etc...)

Always against the latest kernel is the best, 2.4.22-preX or 2.4.21-bkX is fine, I should be able to handle either of them.

I can imagine that we aren't going to just be able to drop in the cvs version into the kernel, due to some cleanups that we might want to do (along the lines of what's happened in 2.5 before I did the sysfs changes.) So this will be an iterative process.

Sound ok?

thanks,

greg k-h

#7 lore raw
In reply to Jean Delvare

First of all, sensors-detect tests OK for me now. Good job.

On #1-5 below, I don't feel strongly either way about any of these issues, feel free to do what you propose if you want.

I note that we do have some Big Fat Warnings in the CVS part of the download page, we can copy those up after the release and enhance if necessary.

Quoted 62 lines · Jean Delvare

I've finished testing I2C and LM Sensors CVS on three out of my four systems (last is left for tomorrow) and here is my report:

1* We'll have trouble with i2c bus drivers from outside our package. Those who won't load at all aren't the main problem IMHO (we'll just get dozens of complaints stating that since the user installed I2C 2.8.0, his/her video card doesn't work anymore). The real problem is those who still load but crash upon scanning. I have old Matrox video cards in two of my machines, and sensors-detect says I should load i2c-matroxfb. The module loads properly, but sensors-detect crashes as soon as it tries to scan this device. What's more, any subsequent load of a chip driver will crash too (because this will scan all I2C busses, including i2c-matroxfb).

So, what can we do? The very least we can do is add a BIG WARNING on our news page at the time we release, stating that any other I2C-related module (most of which are video-related) should not be loaded anymore after I2C 2.8.0 is installed. The message would explain that we plan to submit a patch to the Linux kernel so that all devices are back with the next Linux version. A second thing I'd suggest is commenting out in sensors-detect all such devices. I now it sounds crazy because we'll have to reenable them right after the release, but I think that if we don't do that, we'll have hundreds of people complaining about system crashes. Remember that FB modules, such as i2c-matroxfb, cannot be unloaded. So, loading the module from sensors-detect while the user never used it before, then crashing the system and finally give him/her no other choice but to reboot probably won't make the user happy.

2* We should warn the user that /etc/sensors.conf never gets overwritten. I agree that we shouldn't overwrite it, but the user should be told about this, so that he/she can copy and edit the new file if he/she wants.

3* At the end of sensors-detect, we should tell the user to run the commands he/she is told to add to /etc/rc.*. Two reasons for that. First, he/she can make sure it works well before editing his/her init scripts. Second, he/she can use sensors right away, without having to restart the system or run the init scripts by himself/herself. I had users complaining that sensors wouldn't work right after sensors-detect being ran.

4* What's that "sleep 3" sensors-detect suggests adding between modules load and sensors -s? I have no sleep between these two steps in my own scripts, and I never had any problem. I would replace this block:
# Next 2 lines are optional
sleep 3
/usr/local/bin/sensors -s
with this one:

  # sleep 2 # optional
  /usr/local/bin/sensors -s # recommended
It should work for most people. Waiting for 3 seconds can represent 5 or
10% of the total boot time! Too much for what it's worth IMHO.

5* The "you must run ldconfig" message at the end of a lm_sensors2's make install still doesn't please me. I'd replace "libsensors.so*" by "libsensors.so.2" (well, the file name as it actually is), or I fear the users won't understand why we say there were no libsensors ever in /usr/local/lib, while there may be.

This five points can be left to me, but I want to hear you about them before I do anything.

#8 lore raw
In reply to Jean Delvare

I think we are done and Phil you can do a release at any time. I don't know much about #6 below but it seems like a minor issue we can defer until next time.
mds

Quoted 42 lines · Jean Delvare
Quoted 1 line

First of all, sensors-detect tests OK for me now. Good job.

Great. I only hope the UTF-8 systems will enjoy it as much as you seem to do ;) I really think they will.

Quoted 2 lines

On #1-5 below, I don't feel strongly either way about any of these issues, feel free to do what you propose if you want.

OK, I've commited everything to CVS. You are all welcome to tell me if you like the texts I added at the end of both "make install". The great thing is that we know have these texts as placeholders for anything we want to say to the users for either release or CVS testers.

I then tested on my fourth system, works like a charm.

Quoted 3 lines

I note that we do have some Big Fat Warnings in the CVS part of the download page, we can copy those up after the release and enhance if necessary.

I think that we should rather base our release warning on the text I used at the end of i2c "make install". The text for CVS seems to warn more about the fact that it is CVS and thus possibly unstable than about anything else.

I finally add a sixth point to be discussed about:

6* Our installation process leaves the old i2c-pcf-epp.o and i2c-elektor.o (as is or possibly compressed) modules. These drivers are marked as "will not build outside kernel tree" in i2c's makefile. What's the idea? Are these modules included by mkpatch? These old modules are likely to crash the system since they will not be compatible with our new I2C structures. I guess the safe way would be to delete them.

I don't know enough about these two modules, what they are used for and the reason why they are not part of our build process to decide what to do. Comments and explanations wanted!